MCPcopy Create free account
hub / github.com/NetSys/bess / GetLinkStatus

Method GetLinkStatus

core/drivers/pmd.cc:452–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450}
451
452Port::LinkStatus PMDPort::GetLinkStatus() {
453 struct rte_eth_link status;
454 // rte_eth_link_get() may block up to 9 seconds, so use _nowait() variant.
455 rte_eth_link_get_nowait(dpdk_port_id_, &status);
456
457 return LinkStatus{.speed = status.link_speed,
458 .full_duplex = static_cast<bool>(status.link_duplex),
459 .autoneg = static_cast<bool>(status.link_autoneg),
460 .link_up = static_cast<bool>(status.link_status)};
461}
462
463ADD_DRIVER(PMDPort, "pmd_port", "DPDK poll mode driver")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected