Skip to contentSkip to conversation

net/i40e: cancel alarm handler at the end of device closure

PATCH Applied Xiaolong Ye 3 participants 3 messages Oct 23, 2018 Network drivers

lore
Share & tools
lore
#0 lore raw

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.

Fixes 864a800d706d ("net/i40e: remove VF interrupt handler")
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_ethdev_vf.c +1 -1
index baa6cc58f..52ae578d6 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw
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 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")
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_ethdev_vf.c +1 -2
index baa6cc58f..52ae578d6 100644
@@ -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

Applied
#2 lore raw
Quoted 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 closure

Quoted 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 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")
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_ethdev_vf.c +1 -1
index baa6cc58f..52ae578d6 100644
@@ -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

Applied to dpdk-next-net-intel.

Thanks
Qi