From: Gage Eads <gage.eads@intel.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, reshma.pattan@intel.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2] app/pdump: only remove created vdevs
Date: Tue, 26 Feb 2019 10:04:37 -0600 [thread overview]
Message-ID: <20190226160437.10666-1-gage.eads@intel.com> (raw)
In-Reply-To: <20190225171418.10306-1-gage.eads@intel.com>
This commit fixes a bug in which a unidirectional pdump could attempt to
remove devices it didn't create.
Fixes: 35cb223ab7be ("app/pdump: fix vdev cleanup")
Cc: stable@dpdk.org
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
---
v2: Tweak commit message
app/pdump/main.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/app/pdump/main.c b/app/pdump/main.c
index 5e183ea90..ccf2a1d2f 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -512,12 +512,19 @@ cleanup_pdump_resources(void)
if (pt->dir & RTE_PDUMP_FLAG_TX)
free_ring_data(pt->tx_ring, pt->tx_vdev_id, &pt->stats);
- /* Remove the vdev created */
- rte_eth_dev_get_name_by_port(pt->rx_vdev_id, name);
- rte_eal_hotplug_remove("vdev", name);
+ /* Remove the vdev(s) created */
+ if (pt->dir & RTE_PDUMP_FLAG_RX) {
+ rte_eth_dev_get_name_by_port(pt->rx_vdev_id, name);
+ rte_eal_hotplug_remove("vdev", name);
+ }
+
+ if (pt->single_pdump_dev)
+ continue;
- rte_eth_dev_get_name_by_port(pt->tx_vdev_id, name);
- rte_eal_hotplug_remove("vdev", name);
+ if (pt->dir & RTE_PDUMP_FLAG_TX) {
+ rte_eth_dev_get_name_by_port(pt->tx_vdev_id, name);
+ rte_eal_hotplug_remove("vdev", name);
+ }
}
cleanup_rings();
--
2.13.6
next prev parent reply other threads:[~2019-02-26 16:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-25 17:14 [dpdk-dev] [PATCH] pdump: " Gage Eads
2019-02-26 14:14 ` Pattan, Reshma
2019-02-26 15:12 ` Eads, Gage
2019-02-26 16:04 ` Gage Eads [this message]
2019-02-27 11:53 ` [dpdk-dev] [PATCH v2] app/pdump: " 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=20190226160437.10666-1-gage.eads@intel.com \
--to=gage.eads@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=reshma.pattan@intel.com \
--cc=stable@dpdk.org \
/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).