From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH 12/20] event/dpaa2: add configuration functions Date: Wed, 31 May 2017 20:59:14 +0530 Message-ID: <20170531152913.GD16598@jerin> References: <1495735671-4917-1-git-send-email-nipun.gupta@nxp.com> <1495735671-4917-13-git-send-email-nipun.gupta@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, hemant.agrawal@nxp.com, harry.van.haaren@intel.com, bruce.richardson@intel.com, gage.eads@intel.com, shreyansh.jain@nxp.com To: Nipun Gupta Return-path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0046.outbound.protection.outlook.com [104.47.41.46]) by dpdk.org (Postfix) with ESMTP id 4F5CD7CDA for ; Wed, 31 May 2017 17:30:12 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1495735671-4917-13-git-send-email-nipun.gupta@nxp.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Thu, 25 May 2017 23:37:43 +0530 > From: Nipun Gupta > To: dev@dpdk.org > CC: hemant.agrawal@nxp.com, jerin.jacob@caviumnetworks.com, > harry.van.haaren@intel.com, bruce.richardson@intel.com, > gage.eads@intel.com, shreyansh.jain@nxp.com, Nipun Gupta > > 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 > --- > 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; > +} > +