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: 181182 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp88179ile; Tue, 10 Dec 2019 21:33:59 -0800 (PST) X-Google-Smtp-Source: APXvYqz1e6nVUWmTVsvStG2s9gbpwfz9EXUkA5AdbhdcUXIX1rWxq7WJKUXPbE69UKpYpOE5HM98 X-Received: by 2002:a17:906:25c5:: with SMTP id n5mr1242822ejb.126.1576042439362; Tue, 10 Dec 2019 21:33:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576042439; cv=none; d=google.com; s=arc-20160816; b=svKt7AM7xEaHTykr9pP6/D+1wn+Ydh3lo+PeCgSaYQSCtfJ/BkGH4dRQ0bDht+74Az YhNGPBmNbhXLXcTmIffe4yk3tXyQ7UZKM8J6ZR8meFyvS9uG8qi2JwR3nilxBWQNrbY/ c+VhSrikVAMtKeswdbSWCkRKLMtYn4ttuyfdsw9Av1lNkuUdde3WpjSKVmhKjLO/915p hR8lBUb5nQo7+E49fWP7ar1qIUDAbKPTAB2P/sRwM59ndoYoCejLIoIcoDiHgEmqeWjT sEv9vBKrq0jzsI4k+cgbpZCv575CagHWIXIw5+Gn31zx1hbDZLtP+nrARkU9Fcg3Nhwc 1DXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:cc:to :from; bh=XO6ukxXcS1UjVMu4nIgXYvKUPUJgQduaTKC1beKR8xI=; b=NL2kjzjIWfnmZg/6+4mq5e+t3H1Y+wceMX0BR/DU8DFTERSFUF+z78TFeSDh2t7ebO Vso1aTu4etFdnyInG1H8LK5XwZ5mJmrou2KWDzLvAzRDD+gCRGxuVF8tTkdsjWNpjtz3 UGcC40/X8AWTHU+Vui6D9eE44U9aUhmeBE8txm2j/h60Jmy8vZQQ55dddscf4E/Fu3v7 vPJJKIZux38emp5+693ntvdIknIc34NmpqIHW+QOjd1x2qopNzlSKXYvgCWvDaCkj+V0 2PT3JChJDT4k4E1mO3E90ZOhDuNk5aEsmluj6ycvWyyods54sckm1jCvEQP+7cLr87S3 QgWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id h20si491062ejc.425.2019.12.10.21.33.59; Tue, 10 Dec 2019 21:33:59 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com 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(-) -- 2.17.1 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++;