Slawomir Mrozowicz
6e15a19c62
net/i40e: fix unintended sign extension
Suspicious implicit sign extension: pf->fdir.match_counter_index with type unsigned short (16 bits, unsigned) is promoted in "pf->fdir.match_counter_index << 20" to type int (32 bits, signed), then sign-extended to type unsigned long (64 bits, unsigned). If "pf->fdir.match_counter_index << 20" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1. To fix the issue explicitly cast pf->fdir.match_counter_index to uint32_t. Coverity issue: 13315 Fixes: 05999aab4ca6 ("i40e: add or delete flow director") Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD license for the core libraries and drivers. The kernel components are GPLv2 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org
Description
Languages
C
99.1%
Meson
0.5%
Python
0.2%
Shell
0.1%