From: David Marchand <david.marchand@redhat.com>
To: Andrew Rybchenko <arybchenko@solarflare.com>
Cc: dev <dev@dpdk.org>, dpdk stable <stable@dpdk.org>,
Thomas Monjalon <thomas@monjalon.net>,
Ferruh Yigit <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH 1/3] ethdev: avoid error on PCI unplug of already closed ethdev
Date: Fri, 21 Jun 2019 11:52:48 +0200 [thread overview]
Message-ID: <CAJFAV8ytnuPjfyY06BXFnP9u36SguPksTLNSrJs76ZoUNU6Q4Q@mail.gmail.com> (raw)
In-Reply-To: <1561110041-1795-1-git-send-email-arybchenko@solarflare.com>
On Fri, Jun 21, 2019 at 11:41 AM Andrew Rybchenko <arybchenko@solarflare.com>
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 <arybchenko@solarflare.com>
> Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> ---
> Cc: Thomas Monjalon <thomas@monjalon.net>
> Cc: Ferruh Yigit <ferruh.yigit@intel.com>
>
> 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
next prev parent reply other threads:[~2019-06-21 9:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 9:40 [dpdk-dev] " Andrew Rybchenko
2019-06-21 9:40 ` [dpdk-dev] [PATCH 2/3] net/sfc: ensure that device is closed on removal Andrew Rybchenko
2019-06-21 9:40 ` [dpdk-dev] [PATCH 3/3] net/sfc: release port upon close Andrew Rybchenko
2019-06-21 9:52 ` David Marchand [this message]
2019-06-21 10:15 ` [dpdk-dev] [dpdk-stable] [PATCH 1/3] ethdev: avoid error on PCI unplug of already closed ethdev Andrew Rybchenko
2019-07-02 17:38 ` Ferruh Yigit
2019-07-03 13:55 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJFAV8ytnuPjfyY06BXFnP9u36SguPksTLNSrJs76ZoUNU6Q4Q@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).