[13/15] net/ena: fix wrong handling of checksum
Checks
Commit Message
From: Shai Brandes <shaibran@amazon.com>
This change fixes an issue where a non tcp/udp packet can be indicated
to have an invalid csum. If the device erroneously tries to verify the
csum on a non tcp/udp packet it will result in false indication that
there is a csum error. This change make the driver ignore the
indication for csum error on such packets.
Fixes: 84daba9962b5 ("net/ena: add extra Rx checksum related xstats")
Cc: stable@dpdk.org
Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
doc/guides/rel_notes/release_24_07.rst | 1 +
drivers/net/ena/ena_ethdev.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
@@ -80,6 +80,7 @@ New Features
cleanup and lay the groundwork for hot-unplug support.
* Removed an obsolete workaround for a false L4 bad Rx checksum indication.
* Fixed an invalid return value check.
+ * Fixed Rx chcecksum inspection to check only TCP/UDP packets.
* **Update Tap PMD driver.**
@@ -669,7 +669,8 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
packet_type |= RTE_PTYPE_L3_IPV6;
}
- if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag) {
+ if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag ||
+ !(packet_type & (RTE_PTYPE_L4_TCP | RTE_PTYPE_L4_UDP))) {
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
} else {
if (unlikely(ena_rx_ctx->l4_csum_err)) {