[4/8] net/nfp: rename PF speed update function
Checks
Commit Message
From: Qin Ke <qin.ke@corigine.com>
Rename PF speed update function of 'nfp_net_speed_aneg_update()'
to 'nfp_net_pf_speed_update()', which make codes more readable.
Also use maroc to replace the hard coded value.
Signed-off-by: Qin Ke <qin.ke@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/nfp_net_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -742,7 +742,7 @@ nfp_net_allmulticast_disable(struct rte_eth_dev *dev)
}
static void
-nfp_net_speed_aneg_update(struct rte_eth_dev *dev,
+nfp_net_pf_speed_update(struct rte_eth_dev *dev,
struct nfp_net_hw *hw,
struct nfp_net_hw_priv *hw_priv,
struct rte_eth_link *link)
@@ -807,14 +807,14 @@ nfp_net_link_update_common(struct rte_eth_dev *dev,
hw_priv = dev->process_private;
if (link->link_status == RTE_ETH_LINK_UP) {
if (hw_priv->is_pf)
- nfp_net_speed_aneg_update(dev, hw, hw_priv, link);
+ nfp_net_pf_speed_update(dev, hw, hw_priv, link);
else
nfp_net_vf_speed_update(link, link_status);
}
ret = rte_eth_linkstatus_set(dev, link);
if (ret == 0) {
- if (link->link_status != 0)
+ if (link->link_status == RTE_ETH_LINK_UP)
PMD_DRV_LOG(INFO, "NIC Link is Up");
else
PMD_DRV_LOG(INFO, "NIC Link is Down");