[dpdk-stable] patch 'app/testpmd: fix port index in RSS forward config' has been queued to LTS release 17.11.1

Yuanhan Liu yliu at fridaylinux.org
Wed Feb 7 09:57:07 CET 2018


Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 1e1f3b9152ec37b541bb6c243e2c9f8d5546c5ac Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan at mellanox.com>
Date: Mon, 5 Feb 2018 14:09:21 +0000
Subject: [PATCH] app/testpmd: fix port index in RSS forward config

[ upstream commit 13cb6fae7991e2213cf8ce39fe3caa1c804511e1 ]

When multi-queue ports are configured by the user, the testpmd streams
are created by rss_fwd_config_setup() function.

This function may configure to the streams either invalid Rx ports or
invalid Tx ports.

An invalid Tx port is configured when the number of ports is odd.
In this case, the last Tx port will be always invalid.

An invalid Rx port is configured when NUMA support is configured by the
user and the number of forward ports is much smaller than the number of
all ports. In this case, also the Tx port is invalid.

Change calculations to get valid ports.

Fixes: af75078 ("first public release")

Signed-off-by: Matan Azrad <matan at mellanox.com>
---
 app/test-pmd/config.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 726c737..24451fc 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1983,7 +1983,8 @@ rss_fwd_config_setup(void)
 		 * if we are in loopback, simply send stuff out through the
 		 * ingress port
 		 */
-		if (port_topology == PORT_TOPOLOGY_LOOP)
+		if (port_topology == PORT_TOPOLOGY_LOOP ||
+		    txp >= cur_fwd_config.nb_fwd_ports)
 			txp = rxp;
 
 		fs->rx_port = fwd_ports_ids[rxp];
@@ -2000,11 +2001,7 @@ rss_fwd_config_setup(void)
 		 * Restart from RX queue 0 on next RX port
 		 */
 		rxq = 0;
-		if (numa_support && (nb_fwd_ports <= (nb_ports >> 1)))
-			rxp = (portid_t)
-				(rxp + ((nb_ports >> 1) / nb_fwd_ports));
-		else
-			rxp = (portid_t) (rxp + 1);
+		rxp++;
 	}
 }
 
-- 
2.7.4



More information about the stable mailing list