net/cnxk: update LBK ethdev link info

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 driver won't get a link update notification for the same.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
This commit is contained in:
Nithin Dabilpuram 2022-05-08 13:18:22 +05:30 committed by Jerin Jacob
parent 5875d2ca19
commit 852cedbaf2

View File

@ -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();
}