net/i40e: cancel alarm handler at the end of device closure
PATCH 1/1 net/i40e: cancel alarm handler at the end of device 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.
--- drivers/net/i40e/i40e_ethdev_vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_ethdev_vf.c +1 -1
@@ -2249,7 +2249,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);/*
@@ -2263,6 +2262,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); }/*
Signature · 1 line
2.17.1
Quoted 44 lines
-----Original Message-----
From: Ye, Xiaolong
Sent: Tuesday, October 23, 2018 8:54 AM
To: Zhang, Qi Z <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Ye, Xiaolong <[email protected]>; [email protected]
Subject: [PATCH] net/i40e: cancel alarm handler at the end of device closureSome operations in
i40evf_dev_closelikei40evf_dev_promiscuous_disablestill need alarm handler to clear the pending cmd, if alarm handler is canceled in early stage ofi40evf_dev_close,i40evf_dev_promiscuous_disablewill result in failure.Fixes 864a800d706d ("net/i40e: remove VF interrupt handler")Signed-off-by Xiaolong Ye <[email protected]>--- drivers/net/i40e/i40e_ethdev_vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/i40e/i40e_ethdev_vf.c +1
-2@@ -2249,7 +2249,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);/* @@ -2263,6 +2262,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); }/* --
Quoted 1 line
2.17.1
Zhang, Qi Z
AppliedQuoted 56 lines
-----Original Message-----
From: Xing, Beilei
Sent: Tuesday, October 23, 2018 2:10 AM
To: Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; [email protected]
Subject: RE: [PATCH] net/i40e: cancel alarm handler at the end of device closureQuoted 43 lines
-----Original Message-----
From: Ye, Xiaolong
Sent: Tuesday, October 23, 2018 8:54 AM
To: Zhang, Qi Z <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Ye, Xiaolong <[email protected]>; [email protected]
Subject: [PATCH] net/i40e: cancel alarm handler at the end of device closureSome operations in
i40evf_dev_closelikei40evf_dev_promiscuous_disablestill need alarm handler to clear the pending cmd, if alarm handler is canceled in early stage ofi40evf_dev_close,i40evf_dev_promiscuous_disablewill result in failure.Fixes 864a800d706d ("net/i40e: remove VF interrupt handler")Signed-off-by Xiaolong Ye <[email protected]>--- drivers/net/i40e/i40e_ethdev_vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/i40e/i40e_ethdev_vf.c +1
-1@@ -2249,7 +2249,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);/* @@ -2263,6 +2262,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); }
Quoted 5 lines
Quoted 3 lines
drivers/net/i40e/i40e_ethdev_vf.c +0
-1/* -- 2.17.1
Acked-by Beilei Xing <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi