examples/ipsec-secgw: set L4 length for TSO packets

Message ID 20211124173352.502609-1-radu.nicolau@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series examples/ipsec-secgw: set L4 length for TSO packets |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional fail Functional Testing issues
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS

Commit Message

Radu Nicolau Nov. 24, 2021, 5:33 p.m. UTC
  Using RTE_MBUF_F_TX_TCP_SEG requires L4 length to be set.
Fixes: a7f32947a316 ("examples/ipsec-secgw: support TCP TSO")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/ipsec-secgw/ipsec_process.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Akhil Goyal Nov. 25, 2021, 10:22 a.m. UTC | #1
> Using RTE_MBUF_F_TX_TCP_SEG requires L4 length to be set.
> Fixes: a7f32947a316 ("examples/ipsec-secgw: support TCP TSO")
> 
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>

> ---
Applied to dpdk-next-crypto

Thanks.
  

Patch

diff --git a/examples/ipsec-secgw/ipsec_process.c b/examples/ipsec-secgw/ipsec_process.c
index 9d888d4bc6..3fc4b3a84f 100644
--- a/examples/ipsec-secgw/ipsec_process.c
+++ b/examples/ipsec-secgw/ipsec_process.c
@@ -235,6 +235,7 @@  prep_process_group(void *sa, struct rte_mbuf *mb[], uint32_t cnt)
 					(RTE_MBUF_F_TX_OUTER_IP_CKSUM |
 						RTE_MBUF_F_TX_TUNNEL_ESP);
 				}
+				mb[j]->l4_len = sizeof(struct rte_tcp_hdr);
 				mb[j]->ol_flags |= (RTE_MBUF_F_TX_TCP_SEG |
 						RTE_MBUF_F_TX_TCP_CKSUM);
 				if (RTE_ETH_IS_IPV4_HDR(ptype))