From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cbtest1.netronome.com (host-79-78-33-110.static.as9105.net [79.78.33.110]) by dpdk.org (Postfix) with ESMTP id AC2016932 for ; Fri, 16 Sep 2016 13:11:17 +0200 (CEST) Received: from cbtest1.netronome.com (localhost [127.0.0.1]) by cbtest1.netronome.com (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u8GBBEhA027588; Fri, 16 Sep 2016 12:11:14 +0100 Received: (from alucero@localhost) by cbtest1.netronome.com (8.14.4/8.14.4/Submit) id u8GBBEo0027587; Fri, 16 Sep 2016 12:11:14 +0100 From: Alejandro Lucero To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 16 Sep 2016 12:11:14 +0100 Message-Id: <1474024274-27550-1-git-send-email-alejandro.lucero@netronome.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH v2] nfp: unregister interrupt callback when closing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2016 11:11:17 -0000 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 --- drivers/net/nfp/nfp_net.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index d79f0a1..f78eb82 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... -- 1.9.1