[20/22] event/dlb2: add queue and port release
diff mbox series

Message ID 1599855987-25976-21-git-send-email-timothy.mcdaniel@intel.com
State Superseded
Delegated to: Jerin Jacob
Headers show
Series
  • Add DLB2 PMD
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

McDaniel, Timothy Sept. 11, 2020, 8:26 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/dlb2/dlb2.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

Comments

Eads, Gage Oct. 7, 2020, 9:55 p.m. UTC | #1
>  static void
> +dlb2_eventdev_queue_release(struct rte_eventdev *dev, uint8_t id)
> +{
> +	RTE_SET_USED(dev);
> +	RTE_SET_USED(id);
> +
> +	/* This function intentionally left blank. dlb2 does not support
> +	 * reconfiguring individual queues or ports -- the entire device
> +	 * must be reconfigured.
> +	 */

I think the 2nd sentence in the comment need to be reconsidered (or just
removed). The release callbacks are called (for every port and queue) when
rte_event_dev_configure() is called a 2nd/3rd/etc. time to reconfigure the
device, and the callbacks give the PMD the opportunity clean-up the individual
port/queue. Implementing the logic can be useful for
entire-device-reconfiguration.

> +}
> +
> +static void
> +dlb2_eventdev_port_release(void *port)
> +{
> +	RTE_SET_USED(port);
> +
> +	/* This function intentionally left blank. dlb2 does not support
> +	 * reconfiguring individual queues or ports -- the entire device
> +	 * must be reconfigured.
> +	 */

This might be the appropriate place to free each port's memzone (see my
comments in patch 11).

Thanks,
Gage

Patch
diff mbox series

diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 620a0a5..daf9b9f 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -3756,6 +3756,29 @@  dlb2_eventdev_close(struct rte_eventdev *dev)
 }
 
 static void
+dlb2_eventdev_queue_release(struct rte_eventdev *dev, uint8_t id)
+{
+	RTE_SET_USED(dev);
+	RTE_SET_USED(id);
+
+	/* This function intentionally left blank. dlb2 does not support
+	 * reconfiguring individual queues or ports -- the entire device
+	 * must be reconfigured.
+	 */
+}
+
+static void
+dlb2_eventdev_port_release(void *port)
+{
+	RTE_SET_USED(port);
+
+	/* This function intentionally left blank. dlb2 does not support
+	 * reconfiguring individual queues or ports -- the entire device
+	 * must be reconfigured.
+	 */
+}
+
+static void
 dlb2_entry_points_init(struct rte_eventdev *dev)
 {
 	struct dlb2_eventdev *dlb2;
@@ -3769,8 +3792,10 @@  dlb2_entry_points_init(struct rte_eventdev *dev)
 		.dev_close        = dlb2_eventdev_close,
 		.queue_def_conf   = dlb2_eventdev_queue_default_conf_get,
 		.queue_setup      = dlb2_eventdev_queue_setup,
+		.queue_release    = dlb2_eventdev_queue_release,
 		.port_def_conf    = dlb2_eventdev_port_default_conf_get,
 		.port_setup       = dlb2_eventdev_port_setup,
+		.port_release     = dlb2_eventdev_port_release,
 		.port_link        = dlb2_eventdev_port_link,
 		.port_unlink      = dlb2_eventdev_port_unlink,
 		.port_unlinks_in_progress =