numam-dpdk/drivers
Maciej Bielski 40e7c02155 net/ena: fix L4 checksum Tx offload
During an if-condition evaluation, a 2-bit flag evaluates to 'true' for
'0x1', '0x2' and '0x3'. Thus, from this perspective these flags are
indistinguishable. To make them distinct, respective bits must be
extracted with a mask and then checked for strict equality.

Specifically here, even if `PKT_TX_UDP_CKSUM` (value '0x3') was set, the
expression `mbuf->ol_flags & PKT_TX_TCP` (the second flag of value
'0x1') is evaluated first and the result is 'true'. In consequence, for
UDP packets the execution flow enters an incorrect branch.

Fixes: 56b8b9b7e5 ("net/ena: convert to new Tx offloads API")
Cc: stable@dpdk.org

Reported-by: Eduard Serra <eserra@vmware.com>
Signed-off-by: Maciej Bielski <mba@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
2019-08-05 19:42:02 +02:00
..
baseband baseband/turbo_sw: extend for 5G 2019-07-05 15:28:14 +02:00
bus bus/fslmc: fix build with 0 headroom 2019-08-05 19:24:27 +02:00
common common/octeontx2: prevent STP instruction fissure 2019-07-29 22:18:41 +02:00
compress compress/zlib: fix error handling 2019-07-26 14:52:24 +02:00
crypto crypto/dpaa2_sec: fix handling of session init failure 2019-07-19 14:43:40 +02:00
event event/octeontx2: fix null dereference 2019-07-29 22:17:29 +02:00
mempool drivers/octeontx2: fix recursive interrupts 2019-07-29 22:18:01 +02:00
net net/ena: fix L4 checksum Tx offload 2019-08-05 19:42:02 +02:00
raw drivers/raw: standardize naming 2019-07-30 15:36:35 +02:00
Makefile drivers: add common as dependency for bus 2018-10-16 14:54:25 +02:00
meson.build build: print list of disabled components 2019-07-02 23:20:26 +02:00