Currently the config option allows lcore IDs up to 255,
irrespective of RTE_MAX_LCORES and needs to be fixed.

The patch allows config options based on DPDK config.

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

Signed-off-by: Sivaprasad Tummala <sivaprasad.tumm...@amd.com>
---
 examples/l3fwd-graph/main.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index 96cb1c81ff..149677a3cc 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -111,7 +111,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
 struct lcore_params {
        uint16_t port_id;
        uint8_t queue_id;
-       uint8_t lcore_id;
+       uint16_t lcore_id;
 } __rte_cache_aligned;
 
 static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS];
@@ -205,9 +205,9 @@ check_worker_model_params(void)
 static int
 check_lcore_params(void)
 {
-       uint8_t queue, lcore;
+       uint8_t queue;
        int socketid;
-       uint16_t i;
+       uint16_t i, lcore;
 
        for (i = 0; i < nb_lcore_params; ++i) {
                queue = lcore_params[i].queue_id;
@@ -282,7 +282,7 @@ static int
 init_lcore_rx_queues(void)
 {
        uint16_t i, nb_rx_queue;
-       uint8_t lcore;
+       uint16_t lcore;
 
        for (i = 0; i < nb_lcore_params; ++i) {
                lcore = lcore_params[i].lcore_id;
@@ -452,7 +452,7 @@ parse_config(const char *q_arg)
                lcore_params_array[nb_lcore_params].queue_id =
                        (uint8_t)int_fld[FLD_QUEUE];
                lcore_params_array[nb_lcore_params].lcore_id =
-                       (uint8_t)int_fld[FLD_LCORE];
+                       (uint16_t)int_fld[FLD_LCORE];
                ++nb_lcore_params;
        }
        lcore_params = lcore_params_array;
-- 
2.25.1

Reply via email to