[v10,22/23] event/dlb: add queue and port release
diff mbox series

Message ID 1604082458-15368-23-git-send-email-timothy.mcdaniel@intel.com
State Superseded, archived
Delegated to: Jerin Jacob
Headers show
Series
  • Add DLB PMD
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Timothy McDaniel Oct. 30, 2020, 6:27 p.m. UTC
These entry points are NO-OPS. DLB does not support
reconfiguring individual queues or ports. The entire device
must be reconfigured.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 drivers/event/dlb/dlb.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

Comments

Eads, Gage Oct. 30, 2020, 7:51 p.m. UTC | #1
> -----Original Message-----
> From: McDaniel, Timothy <timothy.mcdaniel@intel.com>
> Sent: Friday, October 30, 2020 1:28 PM
> Cc: dev@dpdk.org; Carrillo, Erik G <erik.g.carrillo@intel.com>; Eads, Gage
> <gage.eads@intel.com>; Van Haaren, Harry <harry.van.haaren@intel.com>;
> jerinj@marvell.com; thomas@monjalon.net
> Subject: [PATCH v10 22/23] event/dlb: add queue and port release
> 
> These entry points are NO-OPS. DLB does not support
> reconfiguring individual queues or ports. The entire device
> must be reconfigured.
> 
> Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>

Reviewed-by: Gage Eads <gage.eads@intel.com>

Thanks,
Gage

Patch
diff mbox series

diff --git a/drivers/event/dlb/dlb.c b/drivers/event/dlb/dlb.c
index 24f3ecd..c37290e 100644
--- a/drivers/event/dlb/dlb.c
+++ b/drivers/event/dlb/dlb.c
@@ -159,6 +159,9 @@  dlb_free_qe_mem(struct dlb_port *qm_port)
 
 	rte_free(qm_port->consume_qe);
 	qm_port->consume_qe = NULL;
+
+	rte_memzone_free(dlb_port[qm_port->id][PORT_TYPE(qm_port)].mz);
+	dlb_port[qm_port->id][PORT_TYPE(qm_port)].mz = NULL;
 }
 
 static int
@@ -3817,6 +3820,28 @@  dlb_eventdev_close(struct rte_eventdev *dev)
 	return 0;
 }
 
+static void
+dlb_eventdev_port_release(void *port)
+{
+	struct dlb_eventdev_port *ev_port = port;
+
+	if (ev_port) {
+		struct dlb_port *qm_port = &ev_port->qm_port;
+
+		if (qm_port->config_state == DLB_CONFIGURED)
+			dlb_free_qe_mem(qm_port);
+	}
+}
+
+static void
+dlb_eventdev_queue_release(struct rte_eventdev *dev, uint8_t id)
+{
+	RTE_SET_USED(dev);
+	RTE_SET_USED(id);
+
+	/* This function intentionally left blank. */
+}
+
 void
 dlb_entry_points_init(struct rte_eventdev *dev)
 {
@@ -3831,7 +3856,9 @@  dlb_entry_points_init(struct rte_eventdev *dev)
 		.queue_def_conf   = dlb_eventdev_queue_default_conf_get,
 		.port_def_conf    = dlb_eventdev_port_default_conf_get,
 		.queue_setup      = dlb_eventdev_queue_setup,
+		.queue_release    = dlb_eventdev_queue_release,
 		.port_setup       = dlb_eventdev_port_setup,
+		.port_release     = dlb_eventdev_port_release,
 		.port_link        = dlb_eventdev_port_link,
 		.port_unlink      = dlb_eventdev_port_unlink,
 		.port_unlinks_in_progress =