[PATCH v5 11/28] net/cnxk: update LBK ethdev link info
Nithin Dabilpuram
ndabilpuram at marvell.com
Sun May 8 09:48:22 CEST 2022
Update link info of LBK ethdev i.e AF's VF's as always up
and 100G. This is because there is no phy for the LBK interfaces
and we won't get a link update notification for the same.
Signed-off-by: Nithin Dabilpuram <ndabilpuram at marvell.com>
---
drivers/net/cnxk/cnxk_link.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/cnxk/cnxk_link.c b/drivers/net/cnxk/cnxk_link.c
index f10a502..b1d59e3 100644
--- a/drivers/net/cnxk/cnxk_link.c
+++ b/drivers/net/cnxk/cnxk_link.c
@@ -12,6 +12,17 @@ cnxk_nix_toggle_flag_link_cfg(struct cnxk_eth_dev *dev, bool set)
else
dev->flags &= ~CNXK_LINK_CFG_IN_PROGRESS_F;
+ /* Update link info for LBK */
+ if (!set && roc_nix_is_lbk(&dev->nix)) {
+ struct rte_eth_link link;
+
+ link.link_status = RTE_ETH_LINK_UP;
+ link.link_speed = RTE_ETH_SPEED_NUM_100G;
+ link.link_autoneg = RTE_ETH_LINK_FIXED;
+ link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;
+ rte_eth_linkstatus_set(dev->eth_dev, &link);
+ }
+
rte_wmb();
}
--
2.8.4
More information about the dev
mailing list