DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/ipsec-secgw: fix incorrect IPv4 checksum at TX
@ 2018-06-06 12:04 Konstantin Ananyev
  2018-06-06 13:32 ` Radu Nicolau
  0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Ananyev @ 2018-06-06 12:04 UTC (permalink / raw)
  To: dev, dev; +Cc: Konstantin Ananyev, radu.nicolau

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 <konstantin.ananyev@intel.com>
---
 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix incorrect IPv4 checksum at TX
  2018-06-06 12:04 [dpdk-dev] [PATCH] examples/ipsec-secgw: fix incorrect IPv4 checksum at TX Konstantin Ananyev
@ 2018-06-06 13:32 ` Radu Nicolau
  2018-07-13 14:41   ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: Radu Nicolau @ 2018-06-06 13:32 UTC (permalink / raw)
  To: Konstantin Ananyev, dev


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 <konstantin.ananyev@intel.com>
> ---
>
Acked-by: Radu Nicolau <radu.nicolau@intel.com> 
<mailto:radu.nicolau@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix incorrect IPv4 checksum at TX
  2018-06-06 13:32 ` Radu Nicolau
@ 2018-07-13 14:41   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2018-07-13 14:41 UTC (permalink / raw)
  To: Nicolau, Radu, Ananyev, Konstantin, dev; +Cc: stable



> -----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 <konstantin.ananyev@intel.com>; 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:
> > 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 <konstantin.ananyev@intel.com>
> > ---
> >
> Acked-by: Radu Nicolau <radu.nicolau@intel.com>
> <mailto:radu.nicolau@intel.com>

Added Cc: stable@dpdk.org

Applied to dpdk-next-crypto.
Thanks,

Pablo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-13 14:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-06 12:04 [dpdk-dev] [PATCH] examples/ipsec-secgw: fix incorrect IPv4 checksum at TX Konstantin Ananyev
2018-06-06 13:32 ` Radu Nicolau
2018-07-13 14:41   ` De Lara Guarch, Pablo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).