Constant value 1 has a size of 32 bits, and shifting it more than 32 bits
to the left overflows. 1ULL is needed to be able to get a 64-bit value.
Coverity ID: 375846
Fixes: 8751a7e9832b ("efd: allow more CPU sockets in table creation")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
unsigned int next_lcore = rte_get_main_lcore();
const int val_true = 1, val_false = 0;
for (i = 0; i < rte_lcore_count(); i++) {
- all_cpu_sockets_bitmask |= 1 << rte_lcore_to_socket_id(next_lcore);
+ all_cpu_sockets_bitmask |= 1ULL << rte_lcore_to_socket_id(next_lcore);
next_lcore = rte_get_next_lcore(next_lcore, val_false, val_true);
}