[dpdk-dev] [PATCH 1/2] vhost: add API to set protocol features flags

Tiwei Bie tiwei.bie at intel.com
Wed Mar 13 06:56:33 CET 2019


On Tue, Mar 12, 2019 at 03:54:09PM +0100, Maxime Coquelin wrote:
> rte_vhost_driver_set_protocol_features API is to be used
> by external backends to advertize vhost-user protocol
> features it supports.
> 
> It has to be called after rte_vhost_driver_register() and
> before rte_vhost_driver_start().
> 
> Example of usage to advertize VHOST_USER_PROTOCOL_F_FOOBAR
> protocol feature:
> 
> const char *path = "/tmp/vhost-user";
> uint64_t protocol_features;
> rte_vhost_driver_register(path, 0);
> rte_vhost_driver_get_protocol_features(path, &protocol_features);
> protocol_features |= VHOST_USER_PROTOCOL_F_FOOBAR;
> rte_vhost_driver_set_protocol_features(path, protocol_features);
> rte_vhost_driver_start(path);
> 
> 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           | 14 ++++++++++++++
>  lib/librte_vhost/rte_vhost_version.map |  1 +
>  lib/librte_vhost/socket.c              | 14 ++++++++++++++
>  3 files changed, 29 insertions(+)

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


More information about the dev mailing list