| 450 | } |
| 451 | |
| 452 | Port::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 | |
| 463 | ADD_DRIVER(PMDPort, "pmd_port", "DPDK poll mode driver") |
nothing calls this directly
no outgoing calls
no test coverage detected