MCPcopy Create free account
hub / github.com/F-Stack/f-stack / i40e_dev_link_update

Function i40e_dev_link_update

dpdk/drivers/net/i40e/i40e_ethdev.c:2950–2978  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2948}
2949
2950int
2951i40e_dev_link_update(struct rte_eth_dev *dev,
2952 int wait_to_complete)
2953{
2954 struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
2955 struct rte_eth_link link;
2956 bool enable_lse = dev->data->dev_conf.intr_conf.lsc ? true : false;
2957 int ret;
2958
2959 memset(&link, 0, sizeof(link));
2960
2961 /* i40e uses full duplex only */
2962 link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;
2963 link.link_autoneg = !(dev->data->dev_conf.link_speeds &
2964 RTE_ETH_LINK_SPEED_FIXED);
2965
2966 if (!wait_to_complete && !enable_lse)
2967 update_link_reg(hw, &link);
2968 else
2969 update_link_aq(hw, &link, enable_lse, wait_to_complete);
2970
2971 if (hw->switch_dev)
2972 rte_eth_linkstatus_get(hw->switch_dev, &link);
2973
2974 ret = rte_eth_linkstatus_set(dev, &link);
2975 i40e_notify_all_vfs_link_status(dev);
2976
2977 return ret;
2978}
2979
2980static void
2981i40e_stat_update_48_in_64(struct i40e_hw *hw, uint32_t hireg,

Callers 4

i40e_dev_startFunction · 0.85
i40e_dev_handle_aq_msgFunction · 0.85
i40e_start_timecountersFunction · 0.85

Calls 6

memsetFunction · 0.85
update_link_regFunction · 0.85
update_link_aqFunction · 0.85
rte_eth_linkstatus_getFunction · 0.85
rte_eth_linkstatus_setFunction · 0.85

Tested by

no test coverage detected