[v2] net/ice: fix ice_interrupt_handler panic when stop

Message ID 20221111063729.874731-1-frank.du@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series [v2] net/ice: fix ice_interrupt_handler panic when stop |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

Frank Du Nov. 11, 2022, 6:37 a.m. UTC
  rte_intr_callback_unregister may fail when irq cb is in handling,
use sync version to make sure unregister successfully.

Signed-off-by: Du, Frank <frank.du@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 7294f38edc..b7ce6b053f 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2596,8 +2596,8 @@  ice_dev_close(struct rte_eth_dev *dev)
 	rte_intr_disable(intr_handle);
 
 	/* unregister callback func from eal lib */
-	rte_intr_callback_unregister(intr_handle,
-				     ice_interrupt_handler, dev);
+	rte_intr_callback_unregister_sync(intr_handle,
+					  ice_interrupt_handler, dev);
 
 	return ret;
 }