From e0e6a7f2154ee5ecd7c80a876d323118408369b9 Mon Sep 17 00:00:00 2001 From: Xiaolong Ye Date: Tue, 23 Oct 2018 08:54:28 +0800 Subject: [PATCH] net/i40e: cancel alarm handler at the end of closure Some operations in i40evf_dev_close like i40evf_dev_promiscuous_disable still need alarm handler to clear the pending cmd, if alarm handler is canceled in early stage of i40evf_dev_close, i40evf_dev_promiscuous_disable will result in failure. Fixes: 864a800d706d ("net/i40e: remove VF interrupt handler") Cc: stable@dpdk.org Signed-off-by: Xiaolong Ye Acked-by: Beilei Xing --- drivers/net/i40e/i40e_ethdev_vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index ed2fc1310e..ae55b9b189 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -2246,7 +2246,6 @@ i40evf_dev_close(struct rte_eth_dev *dev) { struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); - rte_eal_alarm_cancel(i40evf_dev_alarm_handler, dev); i40evf_dev_stop(dev); i40e_dev_free_queues(dev); /* @@ -2260,6 +2259,7 @@ i40evf_dev_close(struct rte_eth_dev *dev) i40evf_reset_vf(hw); i40e_shutdown_adminq(hw); i40evf_disable_irq0(hw); + rte_eal_alarm_cancel(i40evf_dev_alarm_handler, dev); } /* -- 2.20.1