diff options
author | Sivaprasad Tummala <sivaprasad.tummala@amd.com> | 2024-06-06 11:27:46 +0000 |
---|---|---|
committer | Ferruh Yigit <ferruh.yigit@amd.com> | 2024-06-12 00:08:23 +0200 |
commit | 4c70160dc35caf05829dc2195bf4b6aab9817a91 (patch) | |
tree | 06c5cbb88637a4eb3cf582c3072b0f260a50bb08 | |
parent | 7c414d5d970297afefe2c30ad72582ceceffaa29 (diff) |
app/testpmd: fix lcore ID restriction
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>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
-rw-r--r-- | app/test-pmd/config.c | 4 | ||||
-rw-r--r-- | app/test-pmd/parameters.c | 4 | ||||
-rw-r--r-- | 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 f62ba90c87..66c3a68c1d 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -4782,9 +4782,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 c13f7564bf..22364e09ab 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -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", 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; |