From patchwork Wed Dec 11 05:30:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 63737 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 12BD0A04F1; Wed, 11 Dec 2019 06:33:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6DEE234EF; Wed, 11 Dec 2019 06:33:58 +0100 (CET) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 2F7471F5 for ; Wed, 11 Dec 2019 06:33:57 +0100 (CET) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C1269201541; Wed, 11 Dec 2019 06:33:56 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 5D2B5201550; Wed, 11 Dec 2019 06:33:55 +0100 (CET) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 24BA0402AE; Wed, 11 Dec 2019 13:33:53 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: Jun Yang Date: Wed, 11 Dec 2019 11:00:09 +0530 Message-Id: <20191211053009.14906-1-hemant.agrawal@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.15 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 usages the total number of queues as the minimum of rxq and txq. It finds the txq as the same index as rxq. However in some scenarios, specially for flow control the number of rxq and txq can be different. This patch maxes the txq and function of rxq for all such scenario instead of keeping 1:1 relationship between the two. Now packets from all RXQs can be forwarded to TXQs Signed-off-by: Jun Yang --- app/test-pmd/config.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index d59968278..efa409453 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -2130,8 +2130,6 @@ rss_fwd_config_setup(void) streamid_t sm_id; 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 = @@ -2154,7 +2152,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++;