From c600b523c0e2bd7fdfb512ba9c5a525a7b58fc4c Mon Sep 17 00:00:00 2001 From: Amit Gupta Date: Fri, 1 May 2020 15:23:28 +0530 Subject: [PATCH] net/octeontx2: fix bad L4 checksum detection On detecting outer L4 checksum as bad, both outer and inner checksums are marked as bad. No need to explicitly check inner L4 checksum in this case. Outer L4 UDP checksum error => PKT_RX_OUTER_L4_CKSUM_BAD and PKT_RX_L4_CKSUM_BAD Inner L4 UDP checksum error => PKT_RX_L4_CKSUM_BAD Fixes: 41fe7a3a11fd ("net/octeontx2: offload bad L2/L3/L4 UDP lengths detection") Signed-off-by: Amit Gupta Acked-by: Jerin Jacob --- drivers/net/octeontx2/otx2_lookup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c index 9dcfc750df..10944bc176 100644 --- a/drivers/net/octeontx2/otx2_lookup.c +++ b/drivers/net/octeontx2/otx2_lookup.c @@ -301,6 +301,7 @@ nix_create_rx_ol_flags_array(void *mem) errcode == NIX_RX_PERRCODE_OL4_LEN || errcode == NIX_RX_PERRCODE_OL4_PORT) { val |= PKT_RX_IP_CKSUM_GOOD; + val |= PKT_RX_L4_CKSUM_BAD; val |= PKT_RX_OUTER_L4_CKSUM_BAD; } else if (errcode == NIX_RX_PERRCODE_IL4_CHK || errcode == NIX_RX_PERRCODE_IL4_LEN || -- 2.20.1