From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4A4FAA0C4D; Fri, 20 Aug 2021 14:47:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 38CCF41257; Fri, 20 Aug 2021 14:47:52 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id B6B1F4013F; Fri, 20 Aug 2021 14:47:50 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 122) id 758BC7F6BB; Fri, 20 Aug 2021 15:47:50 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shelob.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17]) by shelob.oktetlabs.ru (Postfix) with ESMTP id 1355A7F530; Fri, 20 Aug 2021 15:47:43 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 1355A7F530 Authentication-Results: shelob.oktetlabs.ru/1355A7F530; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: Maxime Coquelin , Chenbo Xia , Shreyansh Jain , Remy Horton , Ferruh Yigit , Thomas Monjalon Cc: dev@dpdk.org, Ivan Ilchenko , stable@dpdk.org Date: Fri, 20 Aug 2021 15:47:41 +0300 Message-Id: <20210820124741.3522576-1-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/virtio: remove handling of zero desc number on RxQ setup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Ivan Ilchenko 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. Fixes: 3be82f5cc5e3 ("ethdev: support PMD-tuned Tx/Rx parameters") Cc: stable@dpdk.org Signed-off-by: Ivan Ilchenko Signed-off-by: Andrew Rybchenko --- drivers/net/virtio/virtio_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 8a48fba5cc..18f03c9fc9 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -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); -- 2.30.2