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

Function i40e_apply_link_speed

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

Source from the content-addressed store, hash-verified

2289}
2290
2291static int
2292i40e_apply_link_speed(struct rte_eth_dev *dev)
2293{
2294 uint8_t speed;
2295 uint8_t abilities = 0;
2296 struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
2297 struct rte_eth_conf *conf = &dev->data->dev_conf;
2298
2299 abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK |
2300 I40E_AQ_PHY_LINK_ENABLED;
2301
2302 if (conf->link_speeds == RTE_ETH_LINK_SPEED_AUTONEG) {
2303 conf->link_speeds = RTE_ETH_LINK_SPEED_40G |
2304 RTE_ETH_LINK_SPEED_25G |
2305 RTE_ETH_LINK_SPEED_20G |
2306 RTE_ETH_LINK_SPEED_10G |
2307 RTE_ETH_LINK_SPEED_1G |
2308 RTE_ETH_LINK_SPEED_100M;
2309
2310 abilities |= I40E_AQ_PHY_AN_ENABLED;
2311 } else {
2312 abilities &= ~I40E_AQ_PHY_AN_ENABLED;
2313 }
2314 speed = i40e_parse_link_speeds(conf->link_speeds);
2315
2316 return i40e_phy_conf_link(hw, abilities, speed, true);
2317}
2318
2319static int
2320i40e_dev_start(struct rte_eth_dev *dev)

Callers 2

i40e_dev_startFunction · 0.85
i40e_dev_set_link_upFunction · 0.85

Calls 2

i40e_parse_link_speedsFunction · 0.85
i40e_phy_conf_linkFunction · 0.85

Tested by

no test coverage detected