DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, Zerun Fu <zerun.fu@corigine.com>,
	chaoyong.he@corigine.com, stable@dpdk.org,
	Long Wu <long.wu@corigine.com>,
	Peng Zhang <peng.zhang@corigine.com>
Subject: [PATCH 1/4] net/nfp: notify flower firmware about PF speed
Date: Mon, 14 Oct 2024 10:43:55 +0800	[thread overview]
Message-ID: <20241014024358.3873420-2-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20241014024358.3873420-1-chaoyong.he@corigine.com>

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


  reply	other threads:[~2024-10-14  2:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14  2:43 [PATCH 0/4] debug enhancement and bug fix Chaoyong He
2024-10-14  2:43 ` Chaoyong He [this message]
2024-10-14  2:43 ` [PATCH 2/4] net/nfp: do not set the IPv6 flag in transport mode Chaoyong He
2024-10-14  2:43 ` [PATCH 3/4] net/nfp: add more logs to debug probe process Chaoyong He
2024-10-14  2:43 ` [PATCH 4/4] net/nfp: clear errors status of aer after soft reset Chaoyong He
2024-10-16 23:08 ` [PATCH 0/4] debug enhancement and bug fix Ferruh Yigit

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-2-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=stable@dpdk.org \
    --cc=zerun.fu@corigine.com \
    /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).