From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id DC1452BA3 for ; Sun, 22 Apr 2018 17:11:35 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6512F20FED; Sun, 22 Apr 2018 11:11:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 22 Apr 2018 11:11:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=KP5CxlJxBjbjH9N5e 8+I2avjXvxDH1w0pvU+0C5TNo4=; b=CPUG5oMWpeInxu2lID5ub+DOxggVe2BJM a87zB5BhtcWi27TwQR4bgLzfCgsvERwgyj1caMUKjUtrS+nqlxWMT46rkpl1YzKs Cp5OG7hhvl9/hWyxN0fT6uu6EUM0G7GtCUqZuS9L8dpMWgNR04zWzmelZeZxDeSw EOIs57El/UV0+J4KqlZHpjyLJf6JHwv7vHNw461tqNONTHHu6UChr1Niv0Uuu6z/ OgVf0PigFEJfSvfn+yptt5VZEgV0ErZXVZjk4+clGI/8BWxrhpC6H6NnRWW9KBcF FqFnMF5/CC02uiN1/hZ+5fXni2nqDLdOpZ1ewOZ06QHleDKsdx8MA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=KP5CxlJxBjbjH9N5e8+I2avjXvxDH1w0pvU+0C5TNo4=; b=Bn35T8jx Ni99JCJm6xqrBMRbitcW0XJlMEmYGoI2kXZy/iREqZdNAienRNTeIr+S4vJodFFr kwa8x0EPTHDC3qpXQwz2ZMLPx+SIgHWy8cQZeHPjlWBQhVueslwAZhkCG0S3W/V1 yhfNbm7KJmVYqqQP69EGpeRUNsj4wRfO/ZV7vm02NKxaTllcl0wfK7ouiucO60Do eSX/7JjWHwADZtjOkpd581tVfNgqWeNvhFt0bYrn7P2YCr+XazNb1agKHCTnVdbH sFQmnMNWZwf+8SAUK/Ln1jLmOuEcr5t0B9rI7v9UpIyTHJjJWsWfUg84m5NL5HHd uv8s2zoLJXE/wQ== X-ME-Sender: Received: from yuanhanliu-NB0.tencent.com (unknown [223.74.148.66]) by mail.messagingengine.com (Postfix) with ESMTPA id 6E3C91025D; Sun, 22 Apr 2018 11:11:33 -0400 (EDT) From: Yuanhan Liu To: Yunjian Wang Cc: Qi Zhang , dpdk stable Date: Sun, 22 Apr 2018 23:09:24 +0800 Message-Id: <20180422150949.17523-34-yliu@fridaylinux.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180422150949.17523-1-yliu@fridaylinux.org> References: <20180422150949.17523-1-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/ixgbe: fix intr callback unregister by adding retry' has been queued to LTS release 17.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2018 15:11:36 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/29/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 8ef7b99624efb1823c90f6d942abe281b4351d9d Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Wed, 21 Mar 2018 20:28:10 +0800 Subject: [PATCH] net/ixgbe: fix intr callback unregister by adding retry [ upstream commit 91fbf1791cd7d69012010ab159d0b5c7dee81f79 ] The nic's interrupt source has some active callbacks, when the port hotplug. Add a retry to give more port's a chance to uninit before returning an error. Fixes: 2866c5f1b87e ("ixgbe: support port hotplug") Signed-off-by: Yunjian Wang Acked-by: Qi Zhang --- drivers/net/ixgbe/ixgbe_ethdev.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index f2198660f..830add2e2 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1366,6 +1366,8 @@ eth_ixgbe_dev_uninit(struct rte_eth_dev *eth_dev) struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); struct rte_intr_handle *intr_handle = &pci_dev->intr_handle; struct ixgbe_hw *hw; + int retries = 0; + int ret; PMD_INIT_FUNC_TRACE(); @@ -1386,8 +1388,20 @@ eth_ixgbe_dev_uninit(struct rte_eth_dev *eth_dev) /* disable uio intr before callback unregister */ rte_intr_disable(intr_handle); - rte_intr_callback_unregister(intr_handle, - ixgbe_dev_interrupt_handler, eth_dev); + + do { + ret = rte_intr_callback_unregister(intr_handle, + ixgbe_dev_interrupt_handler, eth_dev); + if (ret >= 0) { + break; + } else if (ret != -EAGAIN) { + PMD_INIT_LOG(ERR, + "intr callback unregister failed: %d", + ret); + return ret; + } + rte_delay_ms(100); + } while (retries++ < (10 + IXGBE_LINK_UP_TIME)); /* uninitialize PF if max_vfs not zero */ ixgbe_pf_host_uninit(eth_dev); -- 2.11.0