net/ena: fix setting Rx checksum flags in mbuf
authorMichal Krawczyk <mk@semihalf.com>
Fri, 30 Oct 2020 11:31:17 +0000 (12:31 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:06 +0000 (23:35 +0100)
commit856edce2b3dbc901905cd4c43920575f750f9d53
tree2786850f2c1bd0166d8e594887f0f17a35178cca
parent493107fd83a2848025dd42db67764bb0dc7943e0
net/ena: fix setting Rx checksum flags in mbuf

The driver was never setting PKT_RX_*_CKSUM_GOOD flags, so the only way
of checking if the checksum was checked was by testing for the
PKT_RX_*_CKSUM_BAD. In that situation, the application couldn't detect
if the checksum was valid or unknown, as unknown flag is equal to 0.

Moreover, the l3_csum_err value is only valid if the l3_proto is
indicating IPv4, so it shouldn't be checked for other protocols.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
drivers/net/ena/ena_ethdev.c