DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: distribute queues to cores
@ 2018-05-26 15:15 Xueming Li
  2018-06-14 10:51 ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Xueming Li @ 2018-05-26 15:15 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger; +Cc: Xueming Li, dev, Shahaf Shuler

Current topology distribute forwarding streams to lcores by port, this
make unbalanced loading when port number larger than 2:
	lcore 0: P0Q0->P1Q0, P0Q1->P1Q1
	locre 1: P1Q0->P0Q0, P1Q1->P0Q1
If only one port has traffic, only one locre get fully loaded and the
other one get no forwarding. Performance is bad as only one core doing
forwarding in such case.

This patch distributes forwarding streams by queue, try to get streams
of each port handled by different lcore:
	lcore 0: P0Q0->P1Q0, P1Q0->P1Q0
	locre 1: P0Q1->P0Q1, P1Q1->P0Q1

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
---
 app/test-pmd/config.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 97020fb3d..45b4d4f45 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2177,15 +2177,11 @@ rss_fwd_config_setup(void)
 		fs->tx_queue = rxq;
 		fs->peer_addr = fs->tx_port;
 		fs->retry_enabled = retry_enabled;
-		rxq = (queueid_t) (rxq + 1);
-		if (rxq < nb_q)
-			continue;
-		/*
-		 * rxq == nb_q
-		 * Restart from RX queue 0 on next RX port
-		 */
-		rxq = 0;
 		rxp++;
+		if (rxp < nb_fwd_ports)
+			continue;
+		rxp = 0;
+		rxq++;
 	}
 }
 
-- 
2.13.3

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

end of thread, other threads:[~2018-07-12 21:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-26 15:15 [dpdk-dev] [PATCH] app/testpmd: distribute queues to cores Xueming Li
2018-06-14 10:51 ` Bruce Richardson
2018-07-12 21:09   ` Thomas Monjalon

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).