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 E064CA0032; Tue, 28 Sep 2021 13:08:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F90A410D7; Tue, 28 Sep 2021 13:08:54 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by mails.dpdk.org (Postfix) with ESMTP id 088F140E3C for ; Tue, 28 Sep 2021 13:08:52 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id A4DB1202806; Tue, 28 Sep 2021 13:08:52 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6C5D1202800; Tue, 28 Sep 2021 13:08:52 +0200 (CEST) Received: from lsv03274.swis.in-blr01.nxp.com (lsv03274.swis.in-blr01.nxp.com [92.120.147.114]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 64D51183AC89; Tue, 28 Sep 2021 19:08:51 +0800 (+08) From: nipun.gupta@nxp.com To: dev@dpdk.org Cc: xiaoyun.li@intel.com, orika@nvidia.com, thomas@monjalon.net, ferruh.yigit@intel.com, hemant.agrawal@nxp.com, Jun Yang Date: Tue, 28 Sep 2021 16:38:49 +0530 Message-Id: <20210928110850.21184-1-nipun.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] app/testpmd: support unequal number of RXQ and TXQ 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: Jun Yang The existing forwarding mode configures the total number of queues as the minimum of rxq and txq, so eventually the number of txq are same as rxq. However in some scenarios, specially for flow control the number of rxq and txq can be different. This patch makes the txq and function of rxq for all such scenario instead of keeping 1:1 relationship between the two. Signed-off-by: Jun Yang --- app/test-pmd/config.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index f5765b34f7..7e17f233ba 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -3000,8 +3000,6 @@ rss_fwd_config_setup(void) int end; nb_q = nb_rxq; - if (nb_q > nb_txq) - nb_q = nb_txq; cur_fwd_config.nb_fwd_lcores = (lcoreid_t) nb_fwd_lcores; cur_fwd_config.nb_fwd_ports = nb_fwd_ports; cur_fwd_config.nb_fwd_streams = @@ -3038,7 +3036,7 @@ rss_fwd_config_setup(void) fs->rx_port = fwd_ports_ids[rxp]; fs->rx_queue = rxq; fs->tx_port = fwd_ports_ids[txp]; - fs->tx_queue = rxq; + fs->tx_queue = (rxq % nb_txq); fs->peer_addr = fs->tx_port; fs->retry_enabled = retry_enabled; rxp++; @@ -3253,7 +3251,7 @@ fwd_config_setup(void) return; } - if ((nb_rxq > 1) && (nb_txq > 1)){ + if ((nb_rxq > 1) && (nb_txq > 1)) { if (dcb_config) { for (i = 0; i < nb_fwd_ports; i++) { pt_id = fwd_ports_ids[i]; -- 2.17.1