crypto/cnxk: support cn10k transport mode
[dpdk.git] / drivers / crypto / cnxk / cnxk_ipsec.h
index d1eb74e..ff39617 100644 (file)
@@ -98,7 +98,8 @@ cnxk_ipsec_xform_verify(struct rte_security_ipsec_xform *ipsec_xform,
            (ipsec_xform->mode != RTE_SECURITY_IPSEC_SA_MODE_TUNNEL))
                return -EINVAL;
 
-       if ((ipsec_xform->tunnel.type != RTE_SECURITY_IPSEC_TUNNEL_IPV4) &&
+       if ((ipsec_xform->mode == RTE_SECURITY_IPSEC_SA_MODE_TUNNEL) &&
+           (ipsec_xform->tunnel.type != RTE_SECURITY_IPSEC_TUNNEL_IPV4) &&
            (ipsec_xform->tunnel.type != RTE_SECURITY_IPSEC_TUNNEL_IPV6))
                return -EINVAL;