[PATCH] examples/ipsec-secgw: fix incorrect IPv4 checksum at TX

Subsystems: the rest

STALE2942d

3 messages, 3 authors, 2018-07-13 · open the first message on its own page

[PATCH] examples/ipsec-secgw: fix incorrect IPv4 checksum at TX

From: Konstantin Ananyev <hidden>
Date: 2018-06-06 12:04:16

For ESP transport and BYPASS mode the app might generate output
packets with invalid IPv4 header checksum.
At least such behavior was observed on few Intel NICs.
The reason is that the app didn't set ipv4 header checksum to zero
before passing it to the HW.

Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")

Signed-off-by: Konstantin Ananyev <redacted>
---
 examples/ipsec-secgw/ipsec-secgw.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 5d7071657..38933341b 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -331,6 +331,7 @@ prepare_tx_pkt(struct rte_mbuf *pkt, uint16_t port)
 		pkt->l3_len = sizeof(struct ip);
 		pkt->l2_len = ETHER_HDR_LEN;
 
+		ip->ip_sum = 0;
 		ethhdr->ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
 	} else {
 		pkt->ol_flags |= PKT_TX_IPV6;
-- 
2.13.6

Re: [PATCH] examples/ipsec-secgw: fix incorrect IPv4 checksum at TX

From: Radu Nicolau <hidden>
Date: 2018-06-06 13:32:55

On 6/6/2018 1:04 PM, Konstantin Ananyev wrote:
For ESP transport and BYPASS mode the app might generate output
packets with invalid IPv4 header checksum.
At least such behavior was observed on few Intel NICs.
The reason is that the app didn't set ipv4 header checksum to zero
before passing it to the HW.

Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")

Signed-off-by: Konstantin Ananyev <redacted>
---
Acked-by: Radu Nicolau <redacted> 
<mailto:radu.nicolau@intel.com>

Re: [PATCH] examples/ipsec-secgw: fix incorrect IPv4 checksum at TX

From: De Lara Guarch, Pablo <hidden>
Date: 2018-07-13 14:41:11

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Radu Nicolau
Sent: Wednesday, June 6, 2018 2:33 PM
To: Ananyev, Konstantin <redacted>; dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix incorrect IPv4
checksum at TX


On 6/6/2018 1:04 PM, Konstantin Ananyev wrote:
quoted
For ESP transport and BYPASS mode the app might generate output
packets with invalid IPv4 header checksum.
At least such behavior was observed on few Intel NICs.
The reason is that the app didn't set ipv4 header checksum to zero
before passing it to the HW.

Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")

Signed-off-by: Konstantin Ananyev <redacted>
---
Acked-by: Radu Nicolau <redacted>
<mailto:radu.nicolau@intel.com>
Added Cc: stable@dpdk.org

Applied to dpdk-next-crypto.
Thanks,

Pablo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help