odp-dpdk
odp-dpdk copied to clipboard
[PATCH v1] linux-dpdk: pktio: check link status return value
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]
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.