From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH v5 05/20] event/sw: add fns to return default port/queue config Date: Sat, 25 Mar 2017 18:51:28 +0530 Message-ID: <20170325132127.pkwobfcxe6cwi63c@localhost.localdomain> References: <489175012-101439-1-git-send-email-harry.van.haaren@intel.com> <1490374395-149320-1-git-send-email-harry.van.haaren@intel.com> <1490374395-149320-6-git-send-email-harry.van.haaren@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, Bruce Richardson To: Harry van Haaren Return-path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0044.outbound.protection.outlook.com [104.47.34.44]) by dpdk.org (Postfix) with ESMTP id 40E06F94D for ; Sat, 25 Mar 2017 14:21:49 +0100 (CET) Content-Disposition: inline In-Reply-To: <1490374395-149320-6-git-send-email-harry.van.haaren@intel.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" On Fri, Mar 24, 2017 at 04:53:00PM +0000, Harry van Haaren wrote: > From: Bruce Richardson > > Signed-off-by: Bruce Richardson Acked-by: Jerin Jacob > --- > drivers/event/sw/sw_evdev.c | 32 ++++++++++++++++++++++++++++++++ > 1 file changed, 32 insertions(+) > > diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c > index 28a2326..d1fa3a7 100644 > --- a/drivers/event/sw/sw_evdev.c > +++ b/drivers/event/sw/sw_evdev.c > @@ -44,6 +44,35 @@ > #define SCHED_QUANTA_ARG "sched_quanta" > #define CREDIT_QUANTA_ARG "credit_quanta" > > +static void > +sw_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id, > + struct rte_event_queue_conf *conf) > +{ > + RTE_SET_USED(dev); > + RTE_SET_USED(queue_id); > + > + static const struct rte_event_queue_conf default_conf = { > + .nb_atomic_flows = 4096, > + .nb_atomic_order_sequences = 1, > + .event_queue_cfg = RTE_EVENT_QUEUE_CFG_ATOMIC_ONLY, > + .priority = RTE_EVENT_DEV_PRIORITY_NORMAL, > + }; > + > + *conf = default_conf; > +} > + > +static void > +sw_port_def_conf(struct rte_eventdev *dev, uint8_t port_id, > + struct rte_event_port_conf *port_conf) > +{ > + RTE_SET_USED(dev); > + RTE_SET_USED(port_id); > + > + port_conf->new_event_threshold = 1024; > + port_conf->dequeue_depth = 16; > + port_conf->enqueue_depth = 16; > +} > + > static int > sw_dev_configure(const struct rte_eventdev *dev) > { > @@ -116,6 +145,9 @@ sw_probe(const char *name, const char *params) > static const struct rte_eventdev_ops evdev_sw_ops = { > .dev_configure = sw_dev_configure, > .dev_infos_get = sw_info_get, > + > + .queue_def_conf = sw_queue_def_conf, > + .port_def_conf = sw_port_def_conf, > }; > > static const char *const args[] = { > -- > 2.7.4 >