[dpdk-dev] [PATCH v2 3/5] vhost: enable promisc mode and config VMDQ offload register for multicast feature

Xie, Huawei huawei.xie at intel.com
Thu Jan 8 11:07:34 CET 2015


> diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c
> index 27ba175..744156c 100644
> --- a/lib/librte_vhost/virtio-net.c
> +++ b/lib/librte_vhost/virtio-net.c
> @@ -68,7 +68,9 @@ static struct virtio_net_device_ops const *notify_ops;
>  static struct virtio_net_config_ll	*ll_root;
> 
>  /* Features supported by this application. RX merge buffers are enabled by
> default. */
> -#define VHOST_SUPPORTED_FEATURES (1ULL << VIRTIO_NET_F_MRG_RXBUF)
> +#define VHOST_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF)
> | \
> +	(1ULL << VIRTIO_NET_F_CTRL_RX))
> +
CTRL_RX is dependent on CTRL_VQ.
CTRL_VQ should be enabled if CTRL_RX is enabled.
Observed that virtio-net driver will crash if CTRL_VQ isn't enabled in vhost-user case.
	/* Caller should know better */
	BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ) ||
		(out + in > VIRTNET_SEND_COMMAND_SG_MAX)); 
>  static uint64_t VHOST_FEATURES = VHOST_SUPPORTED_FEATURES;
> 
>  /* Line size for reading maps file. */
> --
> 1.8.4.2



More information about the dev mailing list