It is possible to have the control queue without the vDPA
device advertising VIRTIO_NET_F_MQ.

Let's just rely on hw_cvq flag as in other places.

Fixes: 6fdf32d1e318 ("net/virtio-user: remove max queues limitation")
Cc: sta...@dpdk.org

Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c 
b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 912e87fecf..5240b44481 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -615,7 +615,7 @@ virtio_user_alloc_vrings(struct virtio_user_dev *dev)
        bool packed_ring = !!(dev->device_features & (1ull << 
VIRTIO_F_RING_PACKED));
 
        nr_vrings = dev->max_queue_pairs * 2;
-       if (dev->device_features & (1ull << VIRTIO_NET_F_MQ))
+       if (dev->hw_cvq)
                nr_vrings++;
 
        dev->callfds = rte_zmalloc("virtio_user_dev", nr_vrings * 
sizeof(*dev->callfds), 0);
-- 
2.44.0

Reply via email to