From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 2BC2CA0471 for ; Fri, 21 Jun 2019 11:53:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 190011D5BC; Fri, 21 Jun 2019 11:53:02 +0200 (CEST) Received: from mail-vs1-f66.google.com (mail-vs1-f66.google.com [209.85.217.66]) by dpdk.org (Postfix) with ESMTP id 713CC1D5B5 for ; Fri, 21 Jun 2019 11:53:00 +0200 (CEST) Received: by mail-vs1-f66.google.com with SMTP id q64so3454813vsd.1 for ; Fri, 21 Jun 2019 02:53:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sT2a6bH0oU8PjHs3Bsyd8tVesRhqg7eFjTT8rvTguiE=; b=VQ2GL+TcPLpGMx3KfrqU39+Ey3q2HNva1e2wNMJiPQnkrej/x//HrFWdiolCGu6PoP 4lsM6cm1b+UGRdCNKaPU8r0IkpfqyCEqVTnPU8mDrrq6wO7HVDZj9hotA1N9pIg/+jZZ DYpc1Fp6Fei9uwCuYDsbLMnYreSz35sqMMJ14XYt2YHAfwcu4Jo0MaDm5VrtPNKyYc1X AcFYOSoAJ38btvcSKi1jk6ZBaQhsBVODENSoGp7mTYOGHQvSZZkGm7NwW1m9wQj0y6US 7k///+wk5BQXm20JRseULyORdeMcBy/qZjyuqfThMuzGvyqD9x6PE/hu8OF54q9abj1V Hicg== X-Gm-Message-State: APjAAAV01hpHwzwqGjBK4Z1UGomsy/wlMn6OOk6YA12USnr8qJyu1Zw8 sWwThjIx9k5buVvf2AVdOMg0DIf65mZ/cc48xH1aIA== X-Google-Smtp-Source: APXvYqy32EKPM0Jz68eae11lWnAVOLl4OA1lJkQC6sHkAKNRpeG+e0Kt/Cn8oYnXrsZWJHWxyCVm6OHQNXoL10bFnLA= X-Received: by 2002:a67:da99:: with SMTP id w25mr16918692vsj.141.1561110779818; Fri, 21 Jun 2019 02:52:59 -0700 (PDT) MIME-Version: 1.0 References: <1561110041-1795-1-git-send-email-arybchenko@solarflare.com> In-Reply-To: <1561110041-1795-1-git-send-email-arybchenko@solarflare.com> From: David Marchand Date: Fri, 21 Jun 2019 11:52:48 +0200 Message-ID: To: Andrew Rybchenko Cc: dev , dpdk stable , Thomas Monjalon , Ferruh Yigit Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH 1/3] ethdev: avoid error on PCI unplug of already closed ethdev X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Jun 21, 2019 at 11:41 AM Andrew Rybchenko wrote: > If PCI Ethernet device driver removes it on close > (RTE_ETH_DEV_CLOSE_REMOVE) and later PCI device itself is unplugged, > it should not fail because of Ethernet device is already removed. > > Fixes: 23ea57a2a0ce ("ethdev: complete closing of port") > Cc: stable@dpdk.org > > Signed-off-by: Andrew Rybchenko > Reviewed-by: Ivan Malov > --- > Cc: Thomas Monjalon > Cc: Ferruh Yigit > > lib/librte_ethdev/rte_ethdev_pci.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_ethdev/rte_ethdev_pci.h > b/lib/librte_ethdev/rte_ethdev_pci.h > index 23257e986..ccdbb46ec 100644 > --- a/lib/librte_ethdev/rte_ethdev_pci.h > +++ b/lib/librte_ethdev/rte_ethdev_pci.h > @@ -184,7 +184,7 @@ rte_eth_dev_pci_generic_remove(struct rte_pci_device > *pci_dev, > > eth_dev = rte_eth_dev_allocated(pci_dev->device.name); > if (!eth_dev) > - return -ENODEV; > + return 0; > > if (dev_uninit) { > ret = dev_uninit(eth_dev); > -- > 2.17.1 > We are changing the behavior for all drivers, while I understand this should apply to the ones that have the RTE_ETH_DEV_CLOSE_REMOVE flag. Btw, I had reported this earlier [1], care to add a little Reported-by for me ? :-) 1: http://mails.dpdk.org/archives/dev/2019-June/134150.html -- David Marchand