patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] app/testpmd: fix lcore ID restriction
@ 2024-04-15 19:46 Sivaprasad Tummala
  2024-04-15 21:54 ` Stephen Hemminger
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Sivaprasad Tummala @ 2024-04-15 19:46 UTC (permalink / raw)
  To: david.marchand, aman.deep.singh, yuying.zhang, ferruh.yigit; +Cc: dev, stable

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")
Cc: stable@dpdk.org

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
---
 app/test-pmd/parameters.c | 2 +-
 app/test-pmd/testpmd.h    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index c13f7564bf..6d2bf9b7c1 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -1072,7 +1072,7 @@ launch_args_parse(int argc, char** argv)
 		case TESTPMD_OPT_NB_CORES_NUM:
 			n = atoi(optarg);
 			if (n > 0 && n <= nb_lcores)
-				nb_fwd_lcores = (uint8_t) n;
+				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 0afae7d771..9facd7f281 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.40.1


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

end of thread, other threads:[~2024-06-14 18:11 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-15 19:46 [PATCH] app/testpmd: fix lcore ID restriction Sivaprasad Tummala
2024-04-15 21:54 ` Stephen Hemminger
2024-04-15 21:56 ` Stephen Hemminger
2024-04-16  9:55 ` [PATCH v2] " Sivaprasad Tummala
2024-04-19  8:24   ` Ferruh Yigit
2024-04-19 11:30   ` Ferruh Yigit
2024-06-06  9:56     ` Tummala, Sivaprasad
2024-06-13 16:51     ` Ferruh Yigit
2024-06-13 19:13       ` Stephen Hemminger
2024-06-14  9:01         ` Ferruh Yigit
2024-06-14 15:27           ` Stephen Hemminger
2024-06-14 15:39             ` Ferruh Yigit
2024-06-14 17:50             ` Morten Brørup
2024-06-14 18:11               ` Stephen Hemminger
2024-06-06 11:27   ` [PATCH v3] " Sivaprasad Tummala
2024-06-11 23:37     ` Ferruh Yigit
2024-06-13 16:36       ` Ferruh Yigit

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