DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: support unequal number of RXQ and TXQ
@ 2021-09-28 11:08 nipun.gupta
  2021-09-28 11:08 ` [dpdk-dev] [PATCH] app/testpmd: update raw flow to take hex input nipun.gupta
  2021-09-30 13:45 ` [dpdk-dev] [PATCH] app/testpmd: support unequal number of RXQ and TXQ Ferruh Yigit
  0 siblings, 2 replies; 10+ messages in thread
From: nipun.gupta @ 2021-09-28 11:08 UTC (permalink / raw)
  To: dev; +Cc: xiaoyun.li, orika, thomas, ferruh.yigit, hemant.agrawal, Jun Yang

From: Jun Yang <jun.yang@nxp.com>

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 <jun.yang@nxp.com>
---
 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


^ permalink raw reply	[flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH] app/testpmd: support unequal number of RXQ and TXQ
@ 2019-12-11  5:30 Hemant Agrawal
  2019-12-11  9:59 ` Ananyev, Konstantin
  0 siblings, 1 reply; 10+ messages in thread
From: Hemant Agrawal @ 2019-12-11  5:30 UTC (permalink / raw)
  To: dev; +Cc: Jun Yang

From: Jun Yang <jun.yang@nxp.com>

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 <jun.yang@nxp.com>
---
 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++;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-08-20 15:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 11:08 [dpdk-dev] [PATCH] app/testpmd: support unequal number of RXQ and TXQ nipun.gupta
2021-09-28 11:08 ` [dpdk-dev] [PATCH] app/testpmd: update raw flow to take hex input nipun.gupta
2021-09-28 11:51   ` Nipun Gupta
2021-09-30 13:45 ` [dpdk-dev] [PATCH] app/testpmd: support unequal number of RXQ and TXQ Ferruh Yigit
2021-10-01  7:22   ` Nipun Gupta
  -- strict thread matches above, loose matches on Subject: below --
2019-12-11  5:30 Hemant Agrawal
2019-12-11  9:59 ` Ananyev, Konstantin
2019-12-11 10:26   ` Jerin Jacob
2019-12-12 11:20     ` Hemant Agrawal
2023-08-20 15:49     ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).