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

Function rte_eth_link_get_nowait

dpdk/lib/ethdev/rte_ethdev.c:3012–3038  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3010}
3011
3012int
3013rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *eth_link)
3014{
3015 struct rte_eth_dev *dev;
3016
3017 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
3018 dev = &rte_eth_devices[port_id];
3019
3020 if (eth_link == NULL) {
3021 RTE_ETHDEV_LOG(ERR, "Cannot get ethdev port %u link to NULL\n",
3022 port_id);
3023 return -EINVAL;
3024 }
3025
3026 if (dev->data->dev_conf.intr_conf.lsc && dev->data->dev_started)
3027 rte_eth_linkstatus_get(dev, eth_link);
3028 else {
3029 if (*dev->dev_ops->link_update == NULL)
3030 return -ENOTSUP;
3031 (*dev->dev_ops->link_update)(dev, 0);
3032 *eth_link = dev->data->dev_link;
3033 }
3034
3035 rte_eth_trace_link_get_nowait(port_id, eth_link);
3036
3037 return 0;
3038}
3039
3040const char *
3041rte_eth_link_speed_to_str(uint32_t link_speed)

Calls 1

rte_eth_linkstatus_getFunction · 0.85