net/ixgbe: fix link status inconsistencies
authorTao Zhu <taox.zhu@intel.com>
Wed, 26 Feb 2020 12:06:37 +0000 (20:06 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:05 +0000 (13:57 +0200)
commitefa8c72f1ecf7b02239a0627c482b7ba9af66f40
treefced2c6718e3568894c7cd22e55047b8b3fa99fe
parent3b3757bda3c32dc6e5f0c74ad2b21a25bc0b58cb
net/ixgbe: fix link status inconsistencies

Setting LINK UP or LINK DOWN is divided into two parts, with
the main task done in a separate thread, which can take up
to 9 seconds. If cancel the thread in execution, may cause state
inconsistencies. Therefore, must wait for the previous setting
to exit normally before setting the new state.

Note: before using threads, use alarm to handle main tasks.
When canceling alarm, the execution of alarm will not be interrupted.

Fixes: 819d0d1d57f1 ("net/ixgbe: fix blocking system events")
Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Tested-by: Yu Jiang <yux.jiang@intel.com>
drivers/net/ixgbe/ixgbe_ethdev.c