Set the L3 offset and L3 length in the SA parameters

Signed-off-by: Radu Nicolau <radu.nico...@intel.com>
---
 examples/ipsec-secgw/sa.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 17a28556c9..7fb8fef264 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -1316,11 +1316,15 @@ fill_ipsec_sa_prm(struct rte_ipsec_sa_prm *prm, const 
struct ipsec_sa *ss,
 
        if (IS_IP4_TUNNEL(ss->flags)) {
                prm->ipsec_xform.tunnel.type = RTE_SECURITY_IPSEC_TUNNEL_IPV4;
+               prm->tun.hdr_l3_len = sizeof(*v4);
+               prm->tun.hdr_l3_off = 0;
                prm->tun.hdr_len = sizeof(*v4);
                prm->tun.next_proto = rc;
                prm->tun.hdr = v4;
        } else if (IS_IP6_TUNNEL(ss->flags)) {
                prm->ipsec_xform.tunnel.type = RTE_SECURITY_IPSEC_TUNNEL_IPV6;
+               prm->tun.hdr_l3_len = sizeof(*v6);
+               prm->tun.hdr_l3_off = 0;
                prm->tun.hdr_len = sizeof(*v6);
                prm->tun.next_proto = rc;
                prm->tun.hdr = v6;
-- 
2.25.1

Reply via email to