From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Di ChenxuX <chenxux.di@intel.com>
Cc: dev@dpdk.org, Yang Qiming <qiming.yang@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix device hotplug remove
Date: Mon, 11 Nov 2019 16:41:53 +0800 [thread overview]
Message-ID: <20191111084153.GB5870@intel.com> (raw)
In-Reply-To: <20191107062821.32948-1-chenxux.di@intel.com>
On 11/07, Di ChenxuX wrote:
>testpmd will occur infinite loops when device hotplug remove.
>We can fix the issue by using the pci generic remove function
>
>Fixes: f2f4990eff94 ("net/ixgbe: release port upon close")
>
>Signed-off-by: Di ChenxuX <chenxux.di@intel.com>
>
>v2:
>reverted the code about ixgbe_vf_representor_uninit.
>---
> drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
>index dbce7a80e..7ec55a4de 100644
>--- a/drivers/net/ixgbe/ixgbe_ethdev.c
>+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
>@@ -1800,12 +1800,13 @@ static int eth_ixgbe_pci_remove(struct rte_pci_device *pci_dev)
>
> ethdev = rte_eth_dev_allocated(pci_dev->device.name);
> if (!ethdev)
>- return -ENODEV;
>+ return 0;
>
> if (ethdev->data->dev_flags & RTE_ETH_DEV_REPRESENTOR)
> return rte_eth_dev_destroy(ethdev, ixgbe_vf_representor_uninit);
Can we use rte_eth_dev_pci_generic_remove for vf representor as well?
Thanks,
Xiaolong
> else
>- return rte_eth_dev_destroy(ethdev, eth_ixgbe_dev_uninit);
>+ return rte_eth_dev_pci_generic_remove(pci_dev,
>+ eth_ixgbe_dev_uninit);
> }
>
> static struct rte_pci_driver rte_ixgbe_pmd = {
>--
>2.17.1
>
next prev parent reply other threads:[~2019-11-11 8:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 5:09 [dpdk-dev] [PATCH] " Di ChenxuX
2019-11-07 6:28 ` [dpdk-dev] [PATCH v2] " Di ChenxuX
2019-11-11 8:41 ` Ye Xiaolong [this message]
2019-11-11 8:50 ` Di, ChenxuX
2019-11-11 9:00 ` Ye Xiaolong
2019-11-11 9:38 ` Di, ChenxuX
2019-11-12 6:00 ` [dpdk-dev] [PATCH v3] " Di ChenxuX
2019-11-13 2:11 ` Ye Xiaolong
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=20191111084153.GB5870@intel.com \
--to=xiaolong.ye@intel.com \
--cc=chenxux.di@intel.com \
--cc=dev@dpdk.org \
--cc=qiming.yang@intel.com \
/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).