* [dpdk-dev] [PATCH] pdump: only remove created vdevs
@ 2019-02-25 17:14 Gage Eads
2019-02-26 14:14 ` Pattan, Reshma
2019-02-26 16:04 ` [dpdk-dev] [PATCH v2] app/pdump: " Gage Eads
0 siblings, 2 replies; 5+ messages in thread
From: Gage Eads @ 2019-02-25 17:14 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, reshma.pattan, stable
This commit fixes a bug in which pdump -- particularly when used in a
unidirectional manner -- could attempt to remove devices it didn't create.
Fixes: 35cb223ab7be ("pdump: fix vdev cleanup")
Cc: stable@dpdk.org
Signed-off-by: Gage Eads <gage.eads@intel.com>
---
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] pdump: only remove created vdevs
2019-02-25 17:14 [dpdk-dev] [PATCH] pdump: only remove created vdevs Gage Eads
@ 2019-02-26 14:14 ` Pattan, Reshma
2019-02-26 15:12 ` Eads, Gage
2019-02-26 16:04 ` [dpdk-dev] [PATCH v2] app/pdump: " Gage Eads
1 sibling, 1 reply; 5+ messages in thread
From: Pattan, Reshma @ 2019-02-26 14:14 UTC (permalink / raw)
To: Eads, Gage, dev; +Cc: Yigit, Ferruh, stable
> -----Original Message-----
> From: Eads, Gage
> Sent: Monday, February 25, 2019 5:14 PM
> To: dev@dpdk.org
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; Pattan, Reshma
> <reshma.pattan@intel.com>; stable@dpdk.org
> Subject: [PATCH] pdump: only remove created vdevs
>
> This commit fixes a bug in which pdump -- particularly when used in a
> unidirectional manner -- could attempt to remove devices it didn't create.
>
Small nit, You can remove "--" in commit message . Other than that
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] pdump: only remove created vdevs
2019-02-26 14:14 ` Pattan, Reshma
@ 2019-02-26 15:12 ` Eads, Gage
0 siblings, 0 replies; 5+ messages in thread
From: Eads, Gage @ 2019-02-26 15:12 UTC (permalink / raw)
To: Pattan, Reshma, dev; +Cc: Yigit, Ferruh, stable
> -----Original Message-----
> From: Pattan, Reshma
> Sent: Tuesday, February 26, 2019 8:15 AM
> To: Eads, Gage <gage.eads@intel.com>; dev@dpdk.org
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; stable@dpdk.org
> Subject: RE: [PATCH] pdump: only remove created vdevs
>
>
>
> > -----Original Message-----
> > From: Eads, Gage
> > Sent: Monday, February 25, 2019 5:14 PM
> > To: dev@dpdk.org
> > Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; Pattan, Reshma
> > <reshma.pattan@intel.com>; stable@dpdk.org
> > Subject: [PATCH] pdump: only remove created vdevs
> >
> > This commit fixes a bug in which pdump -- particularly when used in a
> > unidirectional manner -- could attempt to remove devices it didn't create.
> >
>
> Small nit, You can remove "--" in commit message . Other than that
>
> Acked-by: Reshma Pattan <reshma.pattan@intel.com>
>
Sure thing. I'll fix the title and the Fixes commit name as well (both should be "app/pdump", not "pdump").
Thanks,
Gage
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v2] app/pdump: only remove created vdevs
2019-02-25 17:14 [dpdk-dev] [PATCH] pdump: only remove created vdevs Gage Eads
2019-02-26 14:14 ` Pattan, Reshma
@ 2019-02-26 16:04 ` Gage Eads
2019-02-27 11:53 ` Ferruh Yigit
1 sibling, 1 reply; 5+ messages in thread
From: Gage Eads @ 2019-02-26 16:04 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, reshma.pattan, stable
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] app/pdump: only remove created vdevs
2019-02-26 16:04 ` [dpdk-dev] [PATCH v2] app/pdump: " Gage Eads
@ 2019-02-27 11:53 ` Ferruh Yigit
0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2019-02-27 11:53 UTC (permalink / raw)
To: Gage Eads, dev; +Cc: reshma.pattan, stable
On 2/26/2019 4:04 PM, Gage Eads wrote:
> 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>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-02-27 11:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-25 17:14 [dpdk-dev] [PATCH] pdump: only remove created vdevs Gage Eads
2019-02-26 14:14 ` Pattan, Reshma
2019-02-26 15:12 ` Eads, Gage
2019-02-26 16:04 ` [dpdk-dev] [PATCH v2] app/pdump: " Gage Eads
2019-02-27 11:53 ` Ferruh Yigit
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).