For non-UDP/TCP packets, enic may wrongly set PKT_RX_L4_CKSUM_BAD in ol_flags. The comparison that checks if a packet is UDP or TCP assumes that RTE_PTYPE_L4 values are bit flags, but they are not. For example, the following evaluates to true because NONFRAG is 0x600 and UDP is 0x200, and causes the current code to think the packet is UDP. !!(RTE_PTYPE_L4_NONFRAG & RTE_PTYPE_L4_UDP) So, fix this by comparing the packet type against UDP and TCP individually. Fixes: 453d15059b58 ("net/enic: use new Rx checksum flags") Cc: stable@dpdk.org Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com> Reviewed-by: John Daley <johndale@cisco.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-3-Clause license for the core libraries and drivers. The kernel components are GPL-2.0 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%