[dpdk-dev] [PATCH v3 2/2] vhost: support requests only handled by external backend

Tiwei Bie tiwei.bie at intel.com
Wed Mar 20 05:54:48 CET 2019

On Tue, Mar 19, 2019 at 11:54:17AM +0100, Maxime Coquelin wrote:
> External backends may have specific requests to handle, and so
> we don't want the vhost-user lib to handle these requests as
> errors.
> This patch also changes the experimental API by introducing
> RTE_VHOST_MSG_RESULT_NOT_HANDLED so that vhost-user lib
> can report an error if a message is handled neither by
> the vhost-user library nor by the external backend.
> The logic changes a bit so that if the callback returns
> with ERR, OK or REPLY, it is considered the message
> is handled by the external backend so it won't be
> handled by the vhost-user library.
> It is still possible for an external backend to listen
> to requests that have to be handled by the vhost-user
> library like SET_MEM_TABLE, but the callback have to
> return NOT_HANDLED in that case.
> Vhost-crypto backend is ialso adapted to this API change.
> Suggested-by: Ilya Maximets <i.maximets at samsung.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> Tested-by: Darek Stojaczyk <dariusz.stojaczyk at intel.com>
> ---
>  lib/librte_vhost/rte_vhost.h    | 39 ++++++----------
>  lib/librte_vhost/vhost_crypto.c | 10 +++-
>  lib/librte_vhost/vhost_user.c   | 82 +++++++++++++++++++++------------
>  3 files changed, 73 insertions(+), 58 deletions(-)

Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>

More information about the dev mailing list