[dpdk-dev] [PATCH] net/ixgbe: fix cancel link handler when port is being removed

wangyunjian wangyunjian at huawei.com
Wed May 8 14:51:38 CEST 2019

From: Yunjian Wang <wangyunjian at huawei.com>

The nic's interrupt source has some active handler, which maybe call
ixgbe_dev_link_update() to set link handler. We should cancel the
link handler before remove dev to prevent executing the link handler.
It triggers segfault.

Fixes: 0408f47ba4d6 ("net/ixgbe: fix busy polling while fiber link update")
Cc: stable at dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
 drivers/net/ixgbe/ixgbe_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 975fa47..2470c89 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1344,6 +1344,9 @@ struct rte_ixgbe_xstats_name_off {
 	/* cancel the delay handler before remove dev */
 	rte_eal_alarm_cancel(ixgbe_dev_interrupt_delayed_handler, eth_dev);
+	/* cancel the link handler before remove dev */
+	rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, eth_dev);
 	/* uninitialize PF if max_vfs not zero */

More information about the dev mailing list