From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com,
Shihong Wang <shihong.wang@corigine.com>,
stable@dpdk.org, Long Wu <long.wu@corigine.com>,
Peng Zhang <peng.zhang@corigine.com>,
Chaoyong He <chaoyong.he@corigine.com>
Subject: [PATCH 2/4] net/nfp: do not set the IPv6 flag in transport mode
Date: Mon, 14 Oct 2024 10:43:56 +0800 [thread overview]
Message-ID: <20241014024358.3873420-3-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20241014024358.3873420-1-chaoyong.he@corigine.com>
From: Shihong Wang <shihong.wang@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: stable@dpdk.org
Signed-off-by: Shihong Wang <shihong.wang@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@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
prev parent reply other threads:[~2024-10-14 2:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241014024358.3873420-1-chaoyong.he@corigine.com>
2024-10-14 2:43 ` [PATCH 1/4] net/nfp: notify flower firmware about PF speed Chaoyong He
2024-10-14 2:43 ` Chaoyong He [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241014024358.3873420-3-chaoyong.he@corigine.com \
--to=chaoyong.he@corigine.com \
--cc=dev@dpdk.org \
--cc=long.wu@corigine.com \
--cc=oss-drivers@corigine.com \
--cc=peng.zhang@corigine.com \
--cc=shihong.wang@corigine.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).