diff mbox series

examples/ipsec-secgw: wrong offload flag used for TSO IPv6

Message ID 20211125130355.552802-1-radu.nicolau@intel.com (mailing list archive)
State New
Headers show
Series examples/ipsec-secgw: wrong offload flag used for TSO IPv6 | expand

Checks

Context Check Description
ci/github-robot: build success github build: passed
ci/iol-testing warning apply patch failure
ci/Intel-compilation warning apply issues
ci/checkpatch success coding style OK

Commit Message

Radu Nicolau Nov. 25, 2021, 1:03 p.m. UTC
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 mbox series

Patch

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 |