On Tue, Oct 01, 2019 at 04:44:31PM +0100, Andrew Rybchenko wrote:
> From: Dilshod Urazov <dilshod.ura...@oktetlabs.ru>
> 
> This driver supports none of DCB, RSS or VMDQ modes,
> therefore must check and return error if configured incorrectly.
> 
> Fixes: c1f86306a026 ("virtio: add new driver")
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Dilshod Urazov <dilshod.ura...@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com>
> ---
>  drivers/net/virtio/virtio_ethdev.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/virtio/virtio_ethdev.c 
> b/drivers/net/virtio/virtio_ethdev.c
> index 7261109dd..0af4fc392 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -2071,6 +2071,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)
>       PMD_INIT_LOG(DEBUG, "configure");
>       req_features = VIRTIO_PMD_DEFAULT_GUEST_FEATURES;
>  
> +     if (rxmode->mq_mode != ETH_MQ_RX_NONE) {
> +             PMD_DRV_LOG(ERR,
> +                     "Unsupported Rx multi queue mode %d",
> +                     rxmode->mq_mode);
> +             return -EINVAL;
> +     }

We need similar checks for Tx as well.

Thanks,
Tiwei

> +
>       if (dev->data->dev_conf.intr_conf.rxq) {
>               ret = virtio_init_device(dev, hw->req_guest_features);
>               if (ret < 0)
> -- 
> 2.17.1
> 

Reply via email to