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: af75078fece3 ("first public release")
Cc: [email protected]

Signed-off-by: Sivaprasad Tummala <[email protected]>
Acked-by: Konstantin Ananyev <[email protected]>
Acked-by: Morten Brørup <[email protected]>
Acked-by: Ferruh Yigit <[email protected]>
---
 examples/l3fwd/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 9fb4fe97d4..19e4d9dfa2 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -500,7 +500,7 @@ parse_config(const char *q_arg)
        char *str_fld[_NUM_FLD];
        int i;
        unsigned size;
-       uint32_t max_fld[_NUM_FLD] = {USHRT_MAX,
+       uint32_t max_fld[_NUM_FLD] = {RTE_MAX_ETHPORTS,
                                USHRT_MAX, RTE_MAX_LCORE};
 
        nb_lcore_params = 0;
@@ -530,7 +530,7 @@ parse_config(const char *q_arg)
                        return -1;
                }
                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 =
-- 
2.34.1

Reply via email to