From: Alejandro Lucero Date: Fri, 16 Sep 2016 11:11:14 +0000 (+0100) Subject: net/nfp: unregister interrupt callback when closing X-Git-Tag: spdx-start~5846 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=25853c71d33296f5edb8841b3cbb3f89c2d74742;p=dpdk.git net/nfp: unregister interrupt callback when closing With an app using hotplug feature, when a device is unplugged without unregistering makes the interrupt handling unstable. Fixes: 6c53f87b3497 ("nfp: add link status interrupt") Signed-off-by: Alejandro Lucero --- diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 9b05bacee6..d526f34a29 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -733,6 +733,11 @@ nfp_net_close(struct rte_eth_dev *dev) rte_intr_disable(&dev->pci_dev->intr_handle); nn_cfg_writeb(hw, NFP_NET_CFG_LSC, 0xff); + /* unregister callback func from eal lib */ + rte_intr_callback_unregister(&dev->pci_dev->intr_handle, + nfp_net_dev_interrupt_handler, + (void *)dev); + /* * The ixgbe PMD driver disables the pcie master on the * device. The i40e does not...