Skip to contentSkip to conversation

net/octeontx2: offload bad L4 checksum detection

PATCH Applied [email protected] 2 participants 2 messages May 1, 2020 – May 4, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/octeontx2: offload bad L4 checksum detection

From: Amit Gupta <[email protected]>

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")
---
 drivers/net/octeontx2/otx2_lookup.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/octeontx2/otx2_lookup.c +1 -0
index 9dcfc75..10944bc 100644
@@ -301,6 +301,7 @@
 			    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 ||
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 7 lines · On Fri, May 1, 2020 at 3:23 PM <[email protected]> wrote:

From: Amit Gupta <[email protected]>

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.

Quoted 8 lines

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")

Changed the subject to: net/octeontx2: fix offload bad L4 checksum detection

Applied to dpdk-next-net-mrvl/master. Thanks

Quoted 19 lines
---
 drivers/net/octeontx2/otx2_lookup.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/octeontx2/otx2_lookup.c +1 -1
index 9dcfc75..10944bc 100644
@@ -301,6 +301,7 @@
                            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 ||
--

1.8.3.1