From: David Marchand Date: Mon, 21 Oct 2019 15:44:54 +0000 (+0200) Subject: examples/ntb: fix build X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=fe56fe635b1d0933344d60e95d9359034dc52f75;p=dpdk.git examples/ntb: fix build lcore indexes can't be represented with uint8_t. Seen on armv8 target: examples/ntb/ntb_fwd.c: In function ‘cmd_quit_parsed’: arm64-armv8a-linux-gcc/include/rte_lcore.h:296:8: error: comparison is always true due to limited range of data type [-Werror=type-limits] i --- diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c index b1ea71c8f9..11fe207511 100644 --- a/examples/ntb/ntb_fwd.c +++ b/examples/ntb/ntb_fwd.c @@ -158,7 +158,7 @@ cmd_quit_parsed(__attribute__((unused)) void *parsed_result, __attribute__((unused)) void *data) { struct ntb_fwd_lcore_conf *conf; - uint8_t lcore_id; + uint32_t lcore_id; /* Stop transmission first. */ RTE_LCORE_FOREACH_SLAVE(lcore_id) { @@ -612,7 +612,8 @@ assign_stream_to_lcores(void) struct ntb_fwd_lcore_conf *conf; struct ntb_fwd_stream *fs; uint16_t nb_streams, sm_per_lcore, sm_id, i; - uint8_t lcore_id, lcore_num, nb_extra; + uint32_t lcore_id; + uint8_t lcore_num, nb_extra; lcore_num = rte_lcore_count(); /* Exclude master core */ @@ -674,7 +675,7 @@ start_pkt_fwd(void) { struct ntb_fwd_lcore_conf *conf; struct rte_eth_link eth_link; - uint8_t lcore_id; + uint32_t lcore_id; int ret, i; ret = ntb_fwd_config_setup(); @@ -767,7 +768,7 @@ cmd_stop_parsed(__attribute__((unused)) void *parsed_result, __attribute__((unused)) void *data) { struct ntb_fwd_lcore_conf *conf; - uint8_t lcore_id; + uint32_t lcore_id; RTE_LCORE_FOREACH_SLAVE(lcore_id) { conf = &fwd_lcore_conf[lcore_id];