From: Shihong Wang <shihong.w...@corigine.com> The transport only encapsulates the security protocol header, does not pay attention to the IP protocol type, and need not to set the IPv6 flag.
Fixes: 3d21da66c06b ("net/nfp: create security session") Cc: sta...@dpdk.org Signed-off-by: Shihong Wang <shihong.w...@corigine.com> Reviewed-by: Long Wu <long...@corigine.com> Reviewed-by: Peng Zhang <peng.zh...@corigine.com> Reviewed-by: Chaoyong He <chaoyong...@corigine.com> --- drivers/net/nfp/nfp_ipsec.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/net/nfp/nfp_ipsec.c b/drivers/net/nfp/nfp_ipsec.c index 647bc2bb6d..89116af1b2 100644 --- a/drivers/net/nfp/nfp_ipsec.c +++ b/drivers/net/nfp/nfp_ipsec.c @@ -1056,20 +1056,9 @@ nfp_ipsec_msg_build(struct rte_eth_dev *eth_dev, break; case RTE_SECURITY_IPSEC_SA_MODE_TRANSPORT: - type = conf->ipsec.tunnel.type; cfg->ctrl_word.mode = NFP_IPSEC_MODE_TRANSPORT; - if (type == RTE_SECURITY_IPSEC_TUNNEL_IPV4) { - memset(&cfg->src_ip, 0, sizeof(cfg->src_ip)); - memset(&cfg->dst_ip, 0, sizeof(cfg->dst_ip)); - cfg->ipv6 = 0; - } else if (type == RTE_SECURITY_IPSEC_TUNNEL_IPV6) { - memset(&cfg->src_ip, 0, sizeof(cfg->src_ip)); - memset(&cfg->dst_ip, 0, sizeof(cfg->dst_ip)); - cfg->ipv6 = 1; - } else { - PMD_DRV_LOG(ERR, "Unsupported address family!"); - return -EINVAL; - } + memset(&cfg->src_ip, 0, sizeof(cfg->src_ip)); + memset(&cfg->dst_ip, 0, sizeof(cfg->dst_ip)); break; default: -- 2.39.1