[10/11] net/cnxk: mark HW errors as bad checksum

Message ID 20221128095442.3185112-10-ndabilpuram@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [01/11] common/cnxk: free pending sqe buffers |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Nithin Dabilpuram Nov. 28, 2022, 9:54 a.m. UTC
  From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Mark NIX packet parsing errors due to NPC/NPA errors as bad
packets by setting L3/L4 checksum as BAD in olflags.
Application can decide the fate of these packets.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/net/cnxk/cnxk_lookup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/cnxk/cnxk_lookup.c b/drivers/net/cnxk/cnxk_lookup.c
index f36fb8f27a..e1f69b4f34 100644
--- a/drivers/net/cnxk/cnxk_lookup.c
+++ b/drivers/net/cnxk/cnxk_lookup.c
@@ -286,8 +286,8 @@  nix_create_rx_ol_flags_array(void *mem)
 				   errcode == NIX_RX_PERRCODE_OL3_LEN) {
 				val |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
 			} else {
-				val |= RTE_MBUF_F_RX_IP_CKSUM_GOOD;
-				val |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
+				val |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
+				val |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
 			}
 			break;
 		}