odp-dpdk icon indicating copy to clipboard operation
odp-dpdk copied to clipboard

[PATCH v1] linux-dpdk: pktio: check link status return value

Open MatiasElo opened this issue 2 years ago • 1 comments

rte_eth_link_get() API has been updated to have a return value. Check the return value and use rte_eth_link_get_nowait() variant to avoid possible extra delays.

Signed-off-by: Matias Elo [email protected]

MatiasElo avatar Jun 07 '22 06:06 MatiasElo

It's not a problem that in the case where rte_eth_link_get_nowait() would have to wait, we just get a link status DOWN and a success return status?

Assuming a following rte_eth_link_get_nowait() call will return the correct link status, this doesn't seem like a problem. Now the application can decide how long it wants to wait for the link to come up. The up to 9 sec delay mentioned in rte_eth_link_get() documentation seems quite dangerous.

MatiasElo avatar Jun 20 '22 14:06 MatiasElo