* [PATCH 1/4] net/nfp: notify flower firmware about PF speed
[not found] <20241014024358.3873420-1-chaoyong.he@corigine.com>
@ 2024-10-14 2:43 ` Chaoyong He
2024-10-14 2:43 ` [PATCH 2/4] net/nfp: do not set the IPv6 flag in transport mode Chaoyong He
1 sibling, 0 replies; 2+ messages in thread
From: Chaoyong He @ 2024-10-14 2:43 UTC (permalink / raw)
To: dev; +Cc: oss-drivers, Zerun Fu, chaoyong.he, stable, Long Wu, Peng Zhang
From: Zerun Fu <zerun.fu@corigine.com>
When using flower firmware, the VF speed is obtained from the
firmware and the firmware get the VF speed from the PF.
But the previous logic does not notify the firmware about PF speed,
and this cause VF speed to be unavailable.
Fix this by add the logic of notify firmware about PF speed.
Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")
Cc: chaoyong.he@corigine.com
Cc: stable@dpdk.org
Signed-off-by: Zerun Fu <zerun.fu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/flower/nfp_flower_representor.c | 3 +++
drivers/net/nfp/nfp_net_common.c | 2 +-
drivers/net/nfp/nfp_net_common.h | 2 ++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index eb0a02874b..eae6ba39e1 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -37,6 +37,9 @@ nfp_flower_repr_link_update(struct rte_eth_dev *dev,
ret = nfp_net_link_update_common(dev, link, link->link_status);
+ if (repr->repr_type == NFP_REPR_TYPE_PF)
+ nfp_net_notify_port_speed(repr->app_fw_flower->pf_hw, link);
+
return ret;
}
diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c
index b986ed4622..f76d5a6895 100644
--- a/drivers/net/nfp/nfp_net_common.c
+++ b/drivers/net/nfp/nfp_net_common.c
@@ -184,7 +184,7 @@ nfp_net_link_speed_nfp2rte_check(uint32_t speed)
return RTE_ETH_SPEED_NUM_NONE;
}
-static void
+void
nfp_net_notify_port_speed(struct nfp_net_hw *hw,
struct rte_eth_link *link)
{
diff --git a/drivers/net/nfp/nfp_net_common.h b/drivers/net/nfp/nfp_net_common.h
index 8429db68f0..d4fe8338b9 100644
--- a/drivers/net/nfp/nfp_net_common.h
+++ b/drivers/net/nfp/nfp_net_common.h
@@ -383,6 +383,8 @@ int nfp_net_vf_config_app_init(struct nfp_net_hw *net_hw,
bool nfp_net_version_check(struct nfp_hw *hw,
struct nfp_pf_dev *pf_dev);
void nfp_net_ctrl_bar_size_set(struct nfp_pf_dev *pf_dev);
+void nfp_net_notify_port_speed(struct nfp_net_hw *hw,
+ struct rte_eth_link *link);
#define NFP_PRIV_TO_APP_FW_NIC(app_fw_priv)\
((struct nfp_app_fw_nic *)app_fw_priv)
--
2.39.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/4] net/nfp: do not set the IPv6 flag in transport mode
[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
1 sibling, 0 replies; 2+ messages in thread
From: Chaoyong He @ 2024-10-14 2:43 UTC (permalink / raw)
To: dev; +Cc: oss-drivers, Shihong Wang, stable, Long Wu, Peng Zhang, Chaoyong He
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
^ permalink raw reply [flat|nested] 2+ messages in thread