[v7,13/14] examples/l3fwd-graph: fix port ID restriction

Message ID 20240326125554.138840-14-sivaprasad.tummala@amd.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series fix lcore ID restriction |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Sivaprasad Tummala March 26, 2024, 12:55 p.m. UTC
  Currently application supports port IDs up to 255
irrespective of RTE_MAX_ETHPORTS.

The patch fixes these constraints by allowing port
IDs up to RTE_MAX_ETHPORTS.

Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Cc: ndabilpuram@marvell.com
Cc: stable@dpdk.org

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 examples/l3fwd-graph/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index dbc36362c3..4ded69b4a0 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -448,7 +448,7 @@  parse_config(const char *q_arg)
 		}
 
 		lcore_params_array[nb_lcore_params].port_id =
-			(uint8_t)int_fld[FLD_PORT];
+			(uint16_t)int_fld[FLD_PORT];
 		lcore_params_array[nb_lcore_params].queue_id =
 			(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =