numam-dpdk/drivers/net/ena
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
..
base net/ena: fix admin CQ polling for 32-bit 2019-07-23 14:31:35 +02:00
ena_ethdev.c net/ena: fix L4 checksum Tx offload 2019-08-05 19:42:02 +02:00
ena_ethdev.h net/ena: fix assigning NUMA node to IO queue 2019-06-13 23:54:30 +09:00
ena_logs.h net/ena: implement dynamic logging 2018-01-16 18:47:49 +01:00
ena_platform.h net/ena: implement dynamic logging 2018-01-16 18:47:49 +01:00
Makefile net/ena: add watchdog and keep alive AENQ handler 2018-06-14 19:27:50 +02:00
meson.build net/ena: add to meson build 2018-06-14 19:27:50 +02:00
rte_pmd_ena_version.map ena: add polling-mode driver 2016-03-25 18:56:43 +01:00