[dpdk-stable] patch 'app/testpmd: fix physical port socket initialization' has been queued to LTS release 17.11.5

Yongseok Koh yskoh at mellanox.com
Fri Nov 30 00:11:01 CET 2018


Hi,

FYI, your patch has been queued to LTS release 17.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Yongseok

---
>From dd108ac86fc660b35bb3219d8d2de77df38b06ba Mon Sep 17 00:00:00 2001
From: Phil Yang <phil.yang at arm.com>
Date: Wed, 17 Oct 2018 09:36:30 +0800
Subject: [PATCH] app/testpmd: fix physical port socket initialization

[ upstream commit effdb8bbb018bd8a611b2ac86a15739f67ea7cbc ]

Once the lcore list setting excluded the socket which physical device
attached, it will cause failure. Meanwhile, it will disable Testpmd
cross NUMA scenario.

Fixes: dbfb8ec7094c ("app/testpmd: optimize mbuf pool allocation")

Signed-off-by: Phil Yang <phil.yang at arm.com>
Reviewed-by: Gavin Hu <gavin.hu at arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
---
 app/test-pmd/testpmd.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 5d6a7f5d4..0adebddc8 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -483,9 +483,21 @@ set_default_fwd_ports_config(void)
 	portid_t pt_id;
 	int i = 0;
 
-	RTE_ETH_FOREACH_DEV(pt_id)
+	RTE_ETH_FOREACH_DEV(pt_id) {
 		fwd_ports_ids[i++] = pt_id;
 
+		/* Update sockets info according to the attached device */
+		int socket_id = rte_eth_dev_socket_id(pt_id);
+		if (socket_id >= 0 && new_socket_id(socket_id)) {
+			if (num_sockets >= RTE_MAX_NUMA_NODES) {
+				rte_exit(EXIT_FAILURE,
+					 "Total sockets greater than %u\n",
+					 RTE_MAX_NUMA_NODES);
+			}
+			socket_ids[num_sockets++] = socket_id;
+		}
+	}
+
 	nb_cfg_ports = nb_ports;
 	nb_fwd_ports = nb_ports;
 }
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-29 15:01:48.183105200 -0800
+++ 0067-app-testpmd-fix-physical-port-socket-initialization.patch	2018-11-29 15:01:45.172960000 -0800
@@ -1,14 +1,15 @@
-From effdb8bbb018bd8a611b2ac86a15739f67ea7cbc Mon Sep 17 00:00:00 2001
+From dd108ac86fc660b35bb3219d8d2de77df38b06ba Mon Sep 17 00:00:00 2001
 From: Phil Yang <phil.yang at arm.com>
 Date: Wed, 17 Oct 2018 09:36:30 +0800
 Subject: [PATCH] app/testpmd: fix physical port socket initialization
 
+[ upstream commit effdb8bbb018bd8a611b2ac86a15739f67ea7cbc ]
+
 Once the lcore list setting excluded the socket which physical device
 attached, it will cause failure. Meanwhile, it will disable Testpmd
 cross NUMA scenario.
 
 Fixes: dbfb8ec7094c ("app/testpmd: optimize mbuf pool allocation")
-Cc: stable at dpdk.org
 
 Signed-off-by: Phil Yang <phil.yang at arm.com>
 Reviewed-by: Gavin Hu <gavin.hu at arm.com>
@@ -18,10 +19,10 @@
  1 file changed, 13 insertions(+), 1 deletion(-)
 
 diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
-index cce5a9773..404d8fe93 100644
+index 5d6a7f5d4..0adebddc8 100644
 --- a/app/test-pmd/testpmd.c
 +++ b/app/test-pmd/testpmd.c
-@@ -565,9 +565,21 @@ set_default_fwd_ports_config(void)
+@@ -483,9 +483,21 @@ set_default_fwd_ports_config(void)
  	portid_t pt_id;
  	int i = 0;
  


More information about the stable mailing list