[v2,2/9] examples/ipsec-secgw: update SA parameters with L3 options
Checks
Commit Message
Set the L3 offset and L3 length in the SA parameters
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
examples/ipsec-secgw/sa.c | 4 ++++
1 file changed, 4 insertions(+)
@@ -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;