net/i40e: fix link update no wait
authorFan Zhang <roy.fan.zhang@intel.com>
Thu, 8 Mar 2018 12:17:52 +0000 (12:17 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:43 +0000 (14:08 +0200)
commiteef2daf2e199d2a22eba0bdf9ee990c2a9efc101
treed6f63267a96a3b278c5e4800e54d12076fbdd67b
parent1cf62d96850b54a96d20ac173229814292fedb9f
net/i40e: fix link update no wait

In i40e_dev_link_update() the driver obtains the link status
info via admin queue command despite of "no_wait" flag. This
requires relatively long time and may be a problem to some
application such as ovs-dpdk.
(https://bugzilla.redhat.com/show_bug.cgi?id=1551761).

This patch aims to fix the problem by using a different
approach of obtaining link status for i40e NIC without waiting.
Instead of getting the link status via admin queue command,
this patch reads the link status registers to accelerate the
procedure.

Fixes: 263333bbb7a9 ("i40e: fix link status timeout")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Reviewed-by: Eelco Chaudron <echaudro@redhat.com>
Tested-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
drivers/net/i40e/i40e_ethdev.c