[PATCH 3/5] common/nfp: fix integer handling issues

Thomas Monjalon thomas at monjalon.net
Wed Nov 22 12:50:55 CET 2023


15/11/2023 04:23, Chaoyong He:
> CI found integer handling issues, overflow before widen.
> 
> Coverity issue: 405351
> Fixes: 87f5b35ba4e8 ("common/nfp: move queue logic")
> Cc: stable at dpdk.org
[...]
> -		enabled_queues |= (1 << i);
> +		enabled_queues |= (1ULL << i);

That's a very bad fix.
You should use RTE_BIT64() which is more explicit.

Please read rte_bitops.h, that's a nice set of macros and functions.




More information about the stable mailing list