[v2,4/4] net/virtio: reject unsupported Tx multi queue modes

Message ID 1570624330-19119-4-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series [v2,1/4] net/virtio: reject deferred start Rx queue setup |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Andrew Rybchenko Oct. 9, 2019, 12:32 p.m. UTC
  This driver supports none of DCB or VMDQ modes, therefore must
check and return error if configured incorrectly.

Fixes: c1f86306a026 ("virtio: add new driver")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/virtio/virtio_ethdev.c | 7 +++++++
 1 file changed, 7 insertions(+)
  

Comments

Maxime Coquelin Oct. 24, 2019, 9:44 a.m. UTC | #1
On 10/9/19 2:32 PM, Andrew Rybchenko wrote:
> This driver supports none of DCB or VMDQ modes, therefore must
> check and return error if configured incorrectly.
> 
> Fixes: c1f86306a026 ("virtio: add new driver")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
>  drivers/net/virtio/virtio_ethdev.c | 7 +++++++
>  1 file changed, 7 insertions(+)


Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
  

Patch

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 0af4fc392..7d3db4d73 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2078,6 +2078,13 @@  virtio_dev_configure(struct rte_eth_dev *dev)
 		return -EINVAL;
 	}
 
+	if (txmode->mq_mode != ETH_MQ_TX_NONE) {
+		PMD_DRV_LOG(ERR,
+			"Unsupported Tx multi queue mode %d",
+			txmode->mq_mode);
+		return -EINVAL;
+	}
+
 	if (dev->data->dev_conf.intr_conf.rxq) {
 		ret = virtio_init_device(dev, hw->req_guest_features);
 		if (ret < 0)