[dpdk-dev] [PATCH 12/20] event/dpaa2: add configuration functions

Jerin Jacob jerin.jacob at caviumnetworks.com
Wed May 31 17:29:14 CEST 2017


-----Original Message-----
> Date: Thu, 25 May 2017 23:37:43 +0530
> From: Nipun Gupta <nipun.gupta at nxp.com>
> To: dev at dpdk.org
> CC: hemant.agrawal at nxp.com, jerin.jacob at caviumnetworks.com,
>  harry.van.haaren at intel.com, bruce.richardson at intel.com,
>  gage.eads at intel.com, shreyansh.jain at nxp.com, Nipun Gupta
>  <nipun.gupta at nxp.com>
> Subject: [PATCH 12/20] event/dpaa2: add configuration functions
> X-Mailer: git-send-email 1.9.1
> 
> This patch adds all the configuration API's for DPAA2 eventdev
> including device config, start, stop & port and queue
> related API's
> 
> Signed-off-by: Nipun Gupta <nipun.gupta at nxp.com>
> ---
>  drivers/event/dpaa2/dpaa2_eventdev.c | 283 ++++++++++++++++++++++++++++++++++-
>  drivers/event/dpaa2/dpaa2_eventdev.h |  22 +++
>  2 files changed, 304 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
> index 7fa17f2..cfb52bb 100644
> --- a/drivers/event/dpaa2/dpaa2_eventdev.c
> +++ b/drivers/event/dpaa2/dpaa2_eventdev.c
> @@ -106,7 +106,288 @@
>  	return dpaa2_eventdev_dequeue_burst(port, ev, 1, timeout_ticks);
>  }
>  
> +static int
> +dpaa2_eventdev_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
> +			   const struct rte_event_queue_conf *queue_conf)
> +{
> +	struct dpaa2_eventdev *priv = dev->data->dev_private;
> +	struct evq_info_t *evq_info =
> +		&priv->evq_info[queue_id];
> +
> +	PMD_DRV_FUNC_TRACE();
> +
> +	evq_info->event_queue_cfg = queue_conf->event_queue_cfg;

Based on the documentation, it looks like ORDERED sched type is not
supported. If so, return an error when queue config request is
RTE_EVENT_QUEUE_CFG_ORDERED_ONLY.

On the same lines, default_queue_setup() returns
RTE_EVENT_QUEUE_CFG_ALL_TYPES as default value. If ORDERED sched type
is not supported then I think, RTE_EVENT_QUEUE_CFG_ALL_TYPES
can not be used as default or configured.

> +
> +	return 0;
> +}
> +
> +static void
> +dpaa2_eventdev_port_release(void *port)
> +{
> +	PMD_DRV_FUNC_TRACE();
> +
> +	RTE_SET_USED(port);
> +}
> +
> +static int
> +dpaa2_eventdev_port_setup(struct rte_eventdev *dev, uint8_t port_id,
> +			  const struct rte_event_port_conf *port_conf)
> +{
> +	PMD_DRV_FUNC_TRACE();
> +
> +	RTE_SET_USED(port_conf);
> +
> +	if (!dpaa2_io_portal[port_id].dpio_dev) {
> +		dpaa2_io_portal[port_id].dpio_dev =
> +				dpaa2_get_qbman_swp(port_id);
> +		rte_atomic16_inc(&dpaa2_io_portal[port_id].dpio_dev->ref_count);
> +		if (!dpaa2_io_portal[port_id].dpio_dev)
> +			return -1;
> +	}
> +
> +	dpaa2_io_portal[port_id].eventdev = dev;
> +	dev->data->ports[port_id] = &dpaa2_io_portal[port_id];
> +	return 0;
> +}
> +


More information about the dev mailing list