net/i40e: cancel alarm handler at the end of closure
authorXiaolong Ye <xiaolong.ye@intel.com>
Tue, 23 Oct 2018 00:54:28 +0000 (08:54 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 26 Oct 2018 20:14:06 +0000 (22:14 +0200)
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 <xiaolong.ye@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
drivers/net/i40e/i40e_ethdev_vf.c

index ed2fc13..ae55b9b 100644 (file)
@@ -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);
 }
 
 /*