From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id D57A0187 for ; Mon, 30 Apr 2018 16:08:29 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id l1so14490336wmb.2 for ; Mon, 30 Apr 2018 07:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DZvqn3csQXI/BVVfhcI62H/NPO73qeAbXICpPn4f9eQ=; b=t6H9VmN+usoCcEu0LhbaYHJrCwUFK9Ad6EvTZrm5o8O/CG2O5YE+GGCQ3BnWB6u8fJ PK2VSvx6G+BM3YztW62edjE35OVQE/uYNNV/21RnOfJoZ2fQKVhZZ/UPeTA/VMvalvej KC7jck0P+ComW1d3JeGkRejtsN8qN1j3w2IoSIla1jrUsUf7sU4ISGytzEyjy11DR8pD FTyk19j3v92AQKSc5RnuDwISN0yzrJxVB+kWL0S7olfhyqDMO9G6FPWeJ5gc529vdVlw aKiHKKuuMWL3s4YMNjpwGpnGsuOZgES2TV3KgFssWIx7X1pBFIJx3CwOQJY/gnpVmETa WUMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DZvqn3csQXI/BVVfhcI62H/NPO73qeAbXICpPn4f9eQ=; b=E82LmLr5hZEsnhMBM8L3/LjtBt1dw+a6LzClp+bjfl/O6uWUvOGzUvyeK2eqDpfY3K YmTR0GMKzSVp3DHDoND3kgIPxA0tKrkEvQAbn97fbv1aCWJXVweSpBBPT7E/d99NEtih lz0Nzihwf81GgkJ8z2N2HMhuyP5E2/ov0VAMJ03kwc0vUzXd7VhBBN+uTqVSp5aUEqV2 yeTRDeJQuvBJJ1lR8AO1cBOZnE7CDUnctypCIN5LueXdYV89RYB1mDJPRx5RkEQpB80p ZsVdEYYhgCgwKaZjN4NHsUidMcnJIr5+BRif9wj3gTBRGAJLO55XzpSXBxL0Kuo5Ninl Z5kQ== X-Gm-Message-State: ALQs6tA5f0Q815vnqQgs5Cs7Beyv5RyHXv2aP003nF7ulQl79hOm7yyv HR9xEcO6RtNYQT/1d3wpj6s= X-Google-Smtp-Source: AB8JxZrq3d9G2oakM/i/niPJ7xPus11a+LyiZM2pu7ZEH8TVzKeNTFeLJQogQgiJzUaQik8FYTqu7Q== X-Received: by 10.28.59.135 with SMTP id i129mr8189775wma.51.1525097309570; Mon, 30 Apr 2018 07:08:29 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id x81-v6sm9806725wrb.23.2018.04.30.07.08.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:08:28 -0700 (PDT) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Qi Zhang , dpdk stable Date: Mon, 30 Apr 2018 15:03:57 +0100 Message-Id: <20180430140606.4615-79-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430140606.4615-1-luca.boccassi@gmail.com> References: <20180430140606.4615-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/ixgbe: fix intr callback unregister by adding retry' has been queued to stable release 18.02.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: Mon, 30 Apr 2018 14:08:30 -0000 Hi, FYI, your patch has been queued to stable release 18.02.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 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 154ed62c26d17ff48db886aaca30d95121db9f90 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 448325857..6c0168322 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1339,6 +1339,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(); @@ -1359,8 +1361,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.14.2