examples/ipsec-secgw: fix L4 length for TSO packets
authorRadu Nicolau <radu.nicolau@intel.com>
Wed, 24 Nov 2021 17:33:51 +0000 (17:33 +0000)
committerAkhil Goyal <gakhil@marvell.com>
Thu, 25 Nov 2021 09:36:42 +0000 (10:36 +0100)
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>
examples/ipsec-secgw/ipsec_process.c

index 9d888d4..3fc4b3a 100644 (file)
@@ -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))