[11/15] net/ena: fix bad checksum handling

Message ID 20240702144626.14545-12-shaibran@amazon.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/ena: driver release 2.10.0 |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Brandes, Shai July 2, 2024, 2:46 p.m. UTC
From: Shai Brandes <shaibran@amazon.com>

Removed a workaround for a false L4 bad Rx csum
indication from the device. The workaround was to set it
as unknown so the application would check it instead.
The issue was fixed in the device, thus the driver bad csum
handling should be fixed in the PMD.

Fixes: b2d2f1cf89a6 ("net/ena: fix checksum flag for L4")
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           | 8 +-------
 2 files changed, 2 insertions(+), 7 deletions(-)
  

Patch

diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst
index a59fb2a21f..f000dec54b 100644
--- a/doc/guides/rel_notes/release_24_07.rst
+++ b/doc/guides/rel_notes/release_24_07.rst
@@ -78,6 +78,7 @@  New Features
   * Reworked the driver logger usage in order to improve Tx performance.
   * Reworked the device uninitialization flow to ensure complete resource
     cleanup and lay the groundwork for hot-unplug support.
+  * Removed an obsolete workaround for a false L4 bad Rx checksum indication.
 
 * **Update Tap PMD driver.**
 
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 4e7171e629..b43b913903 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -674,13 +674,7 @@  static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
 	} else {
 		if (unlikely(ena_rx_ctx->l4_csum_err)) {
 			++rx_stats->l4_csum_bad;
-			/*
-			 * For the L4 Rx checksum offload the HW may indicate
-			 * bad checksum although it's valid. Because of that,
-			 * we're setting the UNKNOWN flag to let the app
-			 * re-verify the checksum.
-			 */
-			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
+			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
 		} else {
 			++rx_stats->l4_csum_good;
 			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;