net/hns3: support wait in link update
authorHuisong Li <lihuisong@huawei.com>
Tue, 30 Mar 2021 12:53:25 +0000 (20:53 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 8 Apr 2021 14:12:42 +0000 (16:12 +0200)
commitd69b9dd854776b79049fda943ade2fb040484ea0
treeb17a1588980037fa0a9e9b6ecfa1f6a520b0959e
parentd2cf28145f36124a6ee9c0f75b29da47139f2872
net/hns3: support wait in link update

There are two APIs in ethdev layer to get link status of device, namely,
"rte_eth_link_get" and "rte_eth_link_get_nowait". When the device link
is unstable or auto-negotiation is in progress, the first API supports
the function of waiting for the NIC to link up, and the maximum waiting
time is 9 seconds based on DPDK Documentation. For the hns3 PMD driver,
the link can be established within 2 seconds.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
drivers/net/hns3/hns3_ethdev.c