* Re: [dpdk-dev] [PATCH v2 3/5] event/dpaa2: add destroy support
@ 2019-09-10 5:16 Jerin Jacob Kollanukkaran
0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob Kollanukkaran @ 2019-09-10 5:16 UTC (permalink / raw)
To: Hemant Agrawal, dev
> -----Original Message-----
> From: Hemant Agrawal <hemant.agrawal@nxp.com>
> Sent: Saturday, September 7, 2019 12:12 PM
> To: dev@dpdk.org
> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Hemant Agrawal
> <hemant.agrawal@nxp.com>
> Subject: [EXT] [PATCH v2 3/5] event/dpaa2: add destroy support
>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Please fix http://mails.dpdk.org/archives/test-report/2019-September/096506.html
> ---
> drivers/event/dpaa2/dpaa2_eventdev.c | 35
> ++++++++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
>
> diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c
> b/drivers/event/dpaa2/dpaa2_eventdev.c
> index 98b487603..9255de16f 100644
> --- a/drivers/event/dpaa2/dpaa2_eventdev.c
> +++ b/drivers/event/dpaa2/dpaa2_eventdev.c
> @@ -1059,6 +1059,39 @@ dpaa2_eventdev_create(const char *name)
> return -EFAULT;
> }
>
> +static int
> +dpaa2_eventdev_destroy(const char *name) {
> + struct rte_eventdev *eventdev;
> + struct dpaa2_eventdev *priv;
> + int i;
> +
> + eventdev = rte_event_pmd_get_named_dev(name);
> + if (eventdev == NULL) {
> + RTE_EDEV_LOG_ERR("eventdev with name %s not
> allocated", name);
> + return -1;
> + }
> +
> + /* For secondary processes, the primary has done all the work */
> + if (rte_eal_process_type() != RTE_PROC_PRIMARY)
> + return 0;
> +
> + priv = eventdev->data->dev_private;
> + for (i = 0; i < priv->max_event_queues; i++) {
> + if (priv->evq_info[i].dpcon)
> + rte_dpaa2_free_dpcon_dev(priv-
> >evq_info[i].dpcon);
> +
> + if (priv->evq_info[i].dpci)
> + rte_dpaa2_free_dpci_dev(priv->evq_info[i].dpci);
> +
> + }
> + priv->max_event_queues = 0;
> +
> + RTE_LOG(INFO, PMD, "%s eventdev cleaned\n", name);
> + return 0;
> +}
> +
> +
> static int
> dpaa2_eventdev_probe(struct rte_vdev_device *vdev) { @@ -1077,6
> +1110,8 @@ dpaa2_eventdev_remove(struct rte_vdev_device *vdev)
> name = rte_vdev_device_name(vdev);
> DPAA2_EVENTDEV_INFO("Closing %s", name);
>
> + dpaa2_eventdev_destroy(name);
> +
> return rte_event_pmd_vdev_uninit(name); }
>
> --
> 2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dpdk-dev] [PATCH 0/5] NXP DPAA2 EVENTDEV enhancements
@ 2019-09-06 10:34 Hemant Agrawal
2019-09-07 6:42 ` [dpdk-dev] [PATCH v2 " Hemant Agrawal
0 siblings, 1 reply; 2+ messages in thread
From: Hemant Agrawal @ 2019-09-06 10:34 UTC (permalink / raw)
To: dev; +Cc: jerinj
This patch series has minor fixes in dpaa2 eventdev support
- default queue and cleanup logic
- introducing selftest for dpaa2
Hemant Agrawal (5):
event/dpaa2: fix def queue conf
event/dpaa2: remove conditional compilation
event/dpaa2: add destroy support
event/dpaa2: add selftest cases
test/event: enable dpaa2 self test
app/test/test_eventdev.c | 7 ++++
drivers/event/dpaa2/Makefile | 3 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 49 ++++++++++++++++++-----
drivers/event/dpaa2/dpaa2_eventdev.h | 2 +
drivers/event/dpaa2/dpaa2_eventdev_logs.h | 6 +++
drivers/event/dpaa2/meson.build | 3 +-
6 files changed, 56 insertions(+), 14 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dpdk-dev] [PATCH v2 0/5] NXP DPAA2 EVENTDEV enhancements
2019-09-06 10:34 [dpdk-dev] [PATCH 0/5] NXP DPAA2 EVENTDEV enhancements Hemant Agrawal
@ 2019-09-07 6:42 ` Hemant Agrawal
2019-09-07 6:42 ` [dpdk-dev] [PATCH v2 3/5] event/dpaa2: add destroy support Hemant Agrawal
0 siblings, 1 reply; 2+ messages in thread
From: Hemant Agrawal @ 2019-09-07 6:42 UTC (permalink / raw)
To: dev; +Cc: jerinj
This patch series has minor fixes in dpaa2 eventdev support
- default queue and cleanup logic
- introducing selftest for dpaa2
v2: fix compilation issue wit meson and missing selftest file
Hemant Agrawal (5):
event/dpaa2: fix def queue conf
event/dpaa2: remove conditional compilation
event/dpaa2: add destroy support
event/dpaa2: add selftest cases
test/event: enable dpaa2 self test
app/test/test_eventdev.c | 7 +
drivers/event/dpaa2/Makefile | 3 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 49 +-
drivers/event/dpaa2/dpaa2_eventdev.h | 2 +
drivers/event/dpaa2/dpaa2_eventdev_logs.h | 6 +
drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 874 ++++++++++++++++++
drivers/event/dpaa2/meson.build | 3 +-
7 files changed, 930 insertions(+), 14 deletions(-)
create mode 100644 drivers/event/dpaa2/dpaa2_eventdev_selftest.c
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dpdk-dev] [PATCH v2 3/5] event/dpaa2: add destroy support
2019-09-07 6:42 ` [dpdk-dev] [PATCH v2 " Hemant Agrawal
@ 2019-09-07 6:42 ` Hemant Agrawal
0 siblings, 0 replies; 2+ messages in thread
From: Hemant Agrawal @ 2019-09-07 6:42 UTC (permalink / raw)
To: dev; +Cc: jerinj, Hemant Agrawal
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/event/dpaa2/dpaa2_eventdev.c | 35 ++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 98b487603..9255de16f 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -1059,6 +1059,39 @@ dpaa2_eventdev_create(const char *name)
return -EFAULT;
}
+static int
+dpaa2_eventdev_destroy(const char *name)
+{
+ struct rte_eventdev *eventdev;
+ struct dpaa2_eventdev *priv;
+ int i;
+
+ eventdev = rte_event_pmd_get_named_dev(name);
+ if (eventdev == NULL) {
+ RTE_EDEV_LOG_ERR("eventdev with name %s not allocated", name);
+ return -1;
+ }
+
+ /* For secondary processes, the primary has done all the work */
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
+ priv = eventdev->data->dev_private;
+ for (i = 0; i < priv->max_event_queues; i++) {
+ if (priv->evq_info[i].dpcon)
+ rte_dpaa2_free_dpcon_dev(priv->evq_info[i].dpcon);
+
+ if (priv->evq_info[i].dpci)
+ rte_dpaa2_free_dpci_dev(priv->evq_info[i].dpci);
+
+ }
+ priv->max_event_queues = 0;
+
+ RTE_LOG(INFO, PMD, "%s eventdev cleaned\n", name);
+ return 0;
+}
+
+
static int
dpaa2_eventdev_probe(struct rte_vdev_device *vdev)
{
@@ -1077,6 +1110,8 @@ dpaa2_eventdev_remove(struct rte_vdev_device *vdev)
name = rte_vdev_device_name(vdev);
DPAA2_EVENTDEV_INFO("Closing %s", name);
+ dpaa2_eventdev_destroy(name);
+
return rte_event_pmd_vdev_uninit(name);
}
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-10 5:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10 5:16 [dpdk-dev] [PATCH v2 3/5] event/dpaa2: add destroy support Jerin Jacob Kollanukkaran
-- strict thread matches above, loose matches on Subject: below --
2019-09-06 10:34 [dpdk-dev] [PATCH 0/5] NXP DPAA2 EVENTDEV enhancements Hemant Agrawal
2019-09-07 6:42 ` [dpdk-dev] [PATCH v2 " Hemant Agrawal
2019-09-07 6:42 ` [dpdk-dev] [PATCH v2 3/5] event/dpaa2: add destroy support Hemant Agrawal
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).