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

Function sfc_dev_get_rte_link

dpdk/drivers/net/sfc/sfc_ethdev.c:251–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251static void
252sfc_dev_get_rte_link(struct rte_eth_dev *dev, int wait_to_complete,
253 struct rte_eth_link *link)
254{
255 struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev);
256
257 SFC_ASSERT(link != NULL);
258
259 if (sa->state != SFC_ETHDEV_STARTED) {
260 sfc_port_link_mode_to_info(EFX_LINK_UNKNOWN, link);
261 } else if (wait_to_complete) {
262 efx_link_mode_t link_mode;
263
264 if (efx_port_poll(sa->nic, &link_mode) != 0)
265 link_mode = EFX_LINK_UNKNOWN;
266 sfc_port_link_mode_to_info(link_mode, link);
267 } else {
268 sfc_ev_mgmt_qpoll(sa);
269 rte_eth_linkstatus_get(dev, link);
270 }
271}
272
273static int
274sfc_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete)

Callers 3

sfc_dev_link_updateFunction · 0.85
sfc_fec_getFunction · 0.85
sfc_fec_capa_checkFunction · 0.85

Calls 5

sfc_adapter_by_eth_devFunction · 0.85
efx_port_pollFunction · 0.85
sfc_ev_mgmt_qpollFunction · 0.85
rte_eth_linkstatus_getFunction · 0.85

Tested by

no test coverage detected