]> git.droids-corp.org - dpdk.git/commitdiff
net/virtio: remove handling of zero desc on Rx setup
authorIvan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Fri, 20 Aug 2021 12:47:41 +0000 (15:47 +0300)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Tue, 14 Sep 2021 11:21:57 +0000 (13:21 +0200)
Rx queue setup callback allows to use the whole ring when
descriptor number argument equals zero. There's no point to
handle zero in any way since RTE Rx queue setup function
rte_eth_rx_queue_setup() doesn't pass zero using fallback
values.

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/net/virtio/virtio_rxtx.c

index 8a48fba5cc4904a654b14f28b4404c8bd79d97b7..18f03c9fc9dfd2e4f7e361f4df22c896445c63de 100644 (file)
@@ -706,7 +706,7 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
        }
        vq->vq_free_thresh = rx_free_thresh;
 
-       if (nb_desc == 0 || nb_desc > vq->vq_nentries)
+       if (nb_desc > vq->vq_nentries)
                nb_desc = vq->vq_nentries;
        vq->vq_free_cnt = RTE_MIN(vq->vq_free_cnt, nb_desc);