numam-dpdk/drivers/net/i40e
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: 05999aab4c ("i40e: add or delete flow director")

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2016-06-15 17:13:55 +02:00
..
base i40e/base: update AQ command structures and macros 2016-03-16 17:44:49 +01:00
i40e_ethdev_vf.c net/i40evf: fix return value if admin queue command fails 2016-06-15 17:13:54 +02:00
i40e_ethdev.c net/i40e: support MTU configuration 2016-06-15 17:13:55 +02:00
i40e_ethdev.h i40evf: fix link info update 2016-04-06 15:49:17 +02:00
i40e_fdir.c net/i40e: fix unintended sign extension 2016-06-15 17:13:55 +02:00
i40e_logs.h drivers: allow pruning log during build 2015-07-30 20:16:04 +02:00
i40e_pf.c i40e: use AQ for Rx control register read/write 2016-03-16 17:36:10 +01:00
i40e_pf.h i40e: support port hotplug 2015-07-19 21:22:23 +02:00
i40e_regs.h i40e: add EEPROM and registers dumping 2016-03-16 17:48:48 +01:00
i40e_rxtx_vec.c mbuf: add new Rx flags for stripped VLAN 2016-06-15 17:18:57 +02:00
i40e_rxtx.c net/i40e: support NSH packet type 2016-06-23 22:39:01 +02:00
i40e_rxtx.h ethdev: query supported packet types 2016-03-25 18:56:43 +01:00
Makefile mk: fix cross-compilation 2016-06-07 10:02:39 +02:00
rte_pmd_i40e_version.map i40e: move to drivers/net/ 2015-05-22 16:06:22 +02:00