dpdk: false link down issue with ixgbe NIC 62/28362/2
authorLijian.Zhang <Lijian.Zhang@arm.com>
Thu, 19 Mar 2020 02:22:52 +0000 (10:22 +0800)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Thu, 13 Aug 2020 10:39:40 +0000 (10:39 +0000)
commitdcd3cefd74b109adab8a8bfd902568145ec8c174
tree88bc825e6b64e7902f0a0fc17cb1f6a9358facb4
parent704ebc1f89aa8b9e2ee022b76f25756fbd40c416
dpdk: false link down issue with ixgbe NIC

This issue is observed with X520-2 NICs on FD.io lab Taishan server.
After VPP booting up and bringing up  the interfaces with command "set
interface state <interface> up", it still shows link down status from
the command "show hardware-interfaces". However, the hardware link
status is actually up. dpdk_process() cannot get the hardware link
status correctly via rte_eth_link_get_nowait().

In ixgbe_dev_link_update_share(), if the media type is fiber and the
link is down, a flag (IXGBE_FLAG_NEED_LINK_CONFIG) is set. A callback to
ixgbe_dev_setup_link_alarm_handler() is scheduled trying to set up the
link and clear the flag afterwards.

If the device is started or stopped before the flag is cleared, the
scheduled callback is canceled. This causes the flag to remain set and
subsequent calls to ixgbe_dev_link_update_share() return without trying
to retrieve the link state because the flag is set.

When the callback is canceled by either interface start or stop
operation, in ixgbe_dev_cancel_link_thread(), after cancelling the
callback/thread, unset the flag on the device to avoid this condition.

Type: fix

Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Reviewed-by: Jieqiang Wang <Jieqiang.Wang@arm.com>
Change-Id: I04de377dc048307a78a5b7109ebdfaf376d5e029
(cherry picked from commit 1690dcb49527934e83748e7b6db8501b33c3758a)
build/external/patches/dpdk_20.02/0001-ixgbe-fix-false-link-down-timing-issue.patch [new file with mode: 0644]