patch 'app/testpmd: fix lcore ID restriction' has been queued to stable release 22.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Jun 25 01:58:26 CEST 2024


Hi,

FYI, your patch has been queued to stable release 22.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. 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. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a4a27aa3e0f8a870de14f33463180c3b9af4c8de

Thanks.

Luca Boccassi

---
>From a4a27aa3e0f8a870de14f33463180c3b9af4c8de Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala at amd.com>
Date: Thu, 6 Jun 2024 11:27:46 +0000
Subject: [PATCH] app/testpmd: fix lcore ID restriction

[ upstream commit 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 ]

With modern CPUs, it is possible to have higher
CPU count thus we can have higher RTE_MAX_LCORES.
In testpmd application, the current config forwarding
cores option "--nb-cores" is hard limited to 255.

The patch fixes this constraint and also adjusts the lcore
data structure to 32-bit to align with rte lcore APIs.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala at amd.com>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 app/test-pmd/config.c     | 4 ++--
 app/test-pmd/parameters.c | 4 ++--
 app/test-pmd/testpmd.h    | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index dca5431b98..1a6d791129 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4244,9 +4244,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
 				continue;
 			printf("Shared Rx queue group %u queue %hu can't be scheduled on different cores:\n",
 			       share_group, share_rxq);
-			printf("  lcore %hhu Port %hu queue %hu\n",
+			printf("  lcore %u Port %hu queue %hu\n",
 			       src_lc, src_port, src_rxq);
-			printf("  lcore %hhu Port %hu queue %hu\n",
+			printf("  lcore %u Port %hu queue %hu\n",
 			       lc_id, fs->rx_port, fs->rx_queue);
 			printf("Please use --nb-cores=%hu to limit number of forwarding cores\n",
 			       nb_rxq);
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 2d0a782ee0..d6f07df789 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -864,8 +864,8 @@ launch_args_parse(int argc, char** argv)
 			}
 			if (!strcmp(lgopts[opt_idx].name, "nb-cores")) {
 				n = atoi(optarg);
-				if (n > 0 && n <= nb_lcores)
-					nb_fwd_lcores = (uint8_t) n;
+				if (n > 0 && (lcoreid_t)n <= nb_lcores)
+					nb_fwd_lcores = (lcoreid_t) n;
 				else
 					rte_exit(EXIT_FAILURE,
 						 "nb-cores should be > 0 and <= %d\n",
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 022210a7a9..f7f3587c83 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -84,7 +84,7 @@ extern volatile uint8_t f_quit;
 /* Maximum number of pools supported per Rx queue */
 #define MAX_MEMPOOL 8
 
-typedef uint8_t  lcoreid_t;
+typedef uint32_t lcoreid_t;
 typedef uint16_t portid_t;
 typedef uint16_t queueid_t;
 typedef uint16_t streamid_t;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-06-25 00:22:16.016814195 +0100
+++ 0040-app-testpmd-fix-lcore-ID-restriction.patch	2024-06-25 00:22:13.161185159 +0100
@@ -1 +1 @@
-From 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 Mon Sep 17 00:00:00 2001
+From a4a27aa3e0f8a870de14f33463180c3b9af4c8de Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index f62ba90c87..66c3a68c1d 100644
+index dca5431b98..1a6d791129 100644
@@ -29 +30 @@
-@@ -4782,9 +4782,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
+@@ -4244,9 +4244,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
@@ -42 +43 @@
-index c13f7564bf..22364e09ab 100644
+index 2d0a782ee0..d6f07df789 100644
@@ -45,11 +46,11 @@
-@@ -1071,8 +1071,8 @@ launch_args_parse(int argc, char** argv)
- 			break;
- 		case TESTPMD_OPT_NB_CORES_NUM:
- 			n = atoi(optarg);
--			if (n > 0 && n <= nb_lcores)
--				nb_fwd_lcores = (uint8_t) n;
-+			if (n > 0 && (lcoreid_t)n <= nb_lcores)
-+				nb_fwd_lcores = (lcoreid_t) n;
- 			else
- 				rte_exit(EXIT_FAILURE,
- 					"nb-cores should be > 0 and <= %d\n",
+@@ -864,8 +864,8 @@ launch_args_parse(int argc, char** argv)
+ 			}
+ 			if (!strcmp(lgopts[opt_idx].name, "nb-cores")) {
+ 				n = atoi(optarg);
+-				if (n > 0 && n <= nb_lcores)
+-					nb_fwd_lcores = (uint8_t) n;
++				if (n > 0 && (lcoreid_t)n <= nb_lcores)
++					nb_fwd_lcores = (lcoreid_t) n;
+ 				else
+ 					rte_exit(EXIT_FAILURE,
+ 						 "nb-cores should be > 0 and <= %d\n",
@@ -57 +58 @@
-index 0afae7d771..9facd7f281 100644
+index 022210a7a9..f7f3587c83 100644


More information about the stable mailing list