DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] examples/ipsec-secgw: wrong offload flag used for TSO IPv6
@ 2021-11-25 13:03 Radu Nicolau
  2022-02-08 20:50 ` [EXT] " Akhil Goyal
  0 siblings, 1 reply; 2+ messages in thread
From: Radu Nicolau @ 2021-11-25 13:03 UTC (permalink / raw)
  To: Radu Nicolau, Akhil Goyal; +Cc: dev, konstantin.ananyev

RTE_MBUF_F_TX_OUTER_IP_CKSUM should not be set for IPv6 packets.

Fixes: a7f32947a316 ("examples/ipsec-secgw: support TCP TSO")
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/ipsec-secgw/ipsec_process.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec_process.c b/examples/ipsec-secgw/ipsec_process.c
index 3fc4b3a84f..285e9c7f4c 100644
--- a/examples/ipsec-secgw/ipsec_process.c
+++ b/examples/ipsec-secgw/ipsec_process.c
@@ -232,8 +232,10 @@ prep_process_group(void *sa, struct rte_mbuf *mb[], uint32_t cnt)
 					mb[j]->outer_l3_len = mb[j]->l3_len;
 					mb[j]->outer_l2_len = mb[j]->l2_len;
 					mb[j]->ol_flags |=
-					(RTE_MBUF_F_TX_OUTER_IP_CKSUM |
-						RTE_MBUF_F_TX_TUNNEL_ESP);
+						RTE_MBUF_F_TX_TUNNEL_ESP;
+					if (RTE_ETH_IS_IPV4_HDR(ptype))
+						mb[j]->ol_flags |=
+						RTE_MBUF_F_TX_OUTER_IP_CKSUM;
 				}
 				mb[j]->l4_len = sizeof(struct rte_tcp_hdr);
 				mb[j]->ol_flags |= (RTE_MBUF_F_TX_TCP_SEG |
-- 
2.25.1


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

* RE: [EXT] [PATCH] examples/ipsec-secgw: wrong offload flag used for TSO IPv6
  2021-11-25 13:03 [PATCH] examples/ipsec-secgw: wrong offload flag used for TSO IPv6 Radu Nicolau
@ 2022-02-08 20:50 ` Akhil Goyal
  0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2022-02-08 20:50 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: dev, konstantin.ananyev

> RTE_MBUF_F_TX_OUTER_IP_CKSUM should not be set for IPv6 packets.
> 
> Fixes: a7f32947a316 ("examples/ipsec-secgw: support TCP TSO")
Cc: stable@dpdk.org

> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>

Applied to dpdk-next-crypto

Thanks.

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

end of thread, other threads:[~2022-02-08 20:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 13:03 [PATCH] examples/ipsec-secgw: wrong offload flag used for TSO IPv6 Radu Nicolau
2022-02-08 20:50 ` [EXT] " Akhil Goyal

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