DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: "Van Haaren, Harry" <harry.van.haaren@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Hunt, David" <david.hunt@intel.com>,
	"nipun.gupta@nxp.com" <nipun.gupta@nxp.com>,
	"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
	"Eads, Gage" <gage.eads@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 15/15] app/test: add unit tests for SW eventdev driver
Date: Mon, 13 Feb 2017 16:51:22 +0530	[thread overview]
Message-ID: <20170213112120.GB26613@localhost.localdomain> (raw)
In-Reply-To: <20170213104526.GC377356@bricha3-MOBL3.ger.corp.intel.com>

On Mon, Feb 13, 2017 at 10:45:27AM +0000, Bruce Richardson wrote:
> On Mon, Feb 13, 2017 at 03:58:27PM +0530, Jerin Jacob wrote:
> > On Wed, Feb 08, 2017 at 10:44:11AM +0000, Van Haaren, Harry wrote:
> > > > -----Original Message-----
> > > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> > > > Sent: Wednesday, February 8, 2017 10:23 AM
> > > > To: Van Haaren, Harry <harry.van.haaren@intel.com>
> > > > Cc: dev@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>; Hunt, David
> > > > <david.hunt@intel.com>; nipun.gupta@nxp.com; hemant.agrawal@nxp.com; Eads, Gage
> > > > <gage.eads@intel.com>
> > > > Subject: Re: [PATCH v2 15/15] app/test: add unit tests for SW eventdev driver
> > > 
> > > <snip>
> > >  
> > > > Thanks for SW driver specific test cases. It provided me a good insight
> > > > of expected application behavior from SW driver perspective and in turn it created
> > > > some challenge in portable applications.
> > > > 
> > > > I would like highlight a main difference between the implementation and get a
> > > > consensus on how to abstract it?
> > > 
> > > Thanks for taking the time to detail your thoughts - the examples certainly help to get a better picture of the whole.
> > > 
> > 
> > <snip>
> > 
> > > 
> > > > - Fairly large number of SA(kind of 2^16 to 2^20) can be processed in parallel
> > > > Something existing IPSec application has constraints on
> > > > http://dpdk.org/doc/guides-16.04/sample_app_ug/ipsec_secgw.html
> > > > 
> > > > on_each_worker_cores()
> > > > while(1)
> > > > {
> > > > 	rte_event_dequeue_burst(ev,..)
> > > > 	if (!nr_events);
> > > > 		continue;
> > > > 
> > > > 	/* STAGE 1 processing */
> > > > 	if(ev.event_type == RTE_EVENT_TYPE_ETHDEV) {
> > > > 		sa = find_it_from_packet(ev.mbuf);
> > > > 		/* move to next stage2(ATOMIC) */
> > > > 		ev.event_type = RTE_EVENT_TYPE_CPU;
> > > > 		ev.sub_event_type = 2;
> > > > 		ev.sched_type = RTE_SCHED_TYPE_ATOMIC;
> > > > 		ev.flow_id =  sa;
> > > > 		ev.op = RTE_EVENT_OP_FORWARD;
> > > > 		rte_event_enqueue_burst(ev..);
> > > > 
> > > > 	} else if(ev.event_type == RTE_EVENT_TYPE_CPU && ev.sub_event_type == 2) { /* stage 2 */
> > > 
> > > 
> > > [HvH] In the case of software eventdev ev.queue_id is used instead of ev.sub_event_type - but this is the same lookup operation as mentioned above. I don't see a fundamental difference between these approaches?
> > 
> > 
> > Does that mean ev.sub_event_type can not be use for event pipelining.
> > Right?  Looks like NXP HW has similar common behavior. If so, How about
> > abstracting with union(see below) to have portable application code?
> 
> No, it can if so desired. It may be useful in cases where the queue ids
> do not directly correspond to the logical stage number, or perhaps when
> a packet need to go back to a previous pipeline stage and wants to
> record past history (e.g. after tunnel decap).

OK. Then we are good. No change is required.

One question though, In what basics application choose to the specific
mode?(I guess, "Going back to previous" use case also can be done though
queue id based scheme).
In our case, The sub_event_type based one gives more of "runtime to completion"
support a packet does not go through different queues.

> 
> > 
> > Application will use "next_stage"(or similar name) to advance the stage, based on the
> > capability or configured mode(flow and/or queue based) underneath
> > implementation will move to next stage.
> > 
> > I will send a patch with above details. What do you think?
> > 
> > diff --git a/lib/librte_eventdev/rte_eventdev.h
> > b/lib/librte_eventdev/rte_eventdev.h
> > index c2f9310..040d70d 100644
> > --- a/lib/librte_eventdev/rte_eventdev.h
> > +++ b/lib/librte_eventdev/rte_eventdev.h
> > @@ -907,17 +907,13 @@ struct rte_event {
> >                 uint64_t event;
> >                 /** Event attributes for dequeue or enqueue operation */
> >                 struct {
> > -                       uint32_t flow_id:20;
> > +                       uint32_t flow_id:28;
> >                         /**< Targeted flow identifier for the enqueue and
> >                          * dequeue operation.
> >                          * The value must be in the range of
> >                          * [0, nb_event_queue_flows - 1] which
> >                          * previously supplied to
> >                          * rte_event_dev_configure().
> >                          */
> > -                       uint32_t sub_event_type:8;
> > -                       /**< Sub-event types based on the event source.
> > -                        * @see RTE_EVENT_TYPE_CPU
> > -                        */
> >                         uint32_t event_type:4;
> >                         /**< Event type to classify the event source.
> >                          * @see RTE_EVENT_TYPE_ETHDEV,
> >                          * (RTE_EVENT_TYPE_*)
> > @@ -935,13 +931,16 @@ struct rte_event {
> >                          * associated with flow id on a given event
> >                          * queue
> >                          * for the enqueue and dequeue operation.
> >                          */
> > -                       uint8_t queue_id;
> > -                       /**< Targeted event queue identifier for the enqueue or
> > -                        * dequeue operation.
> > -                        * The value must be in the range of
> > -                        * [0, nb_event_queues - 1] which previously supplied to
> > -                        * rte_event_dev_configure().
> > -                        */
> > +                       union {
> > +                               uint8_t queue_id;
> > +                               /**< Targeted event queue identifier for the enqueue or
> > +                                * dequeue operation.
> > +                                * The value must be in the range of
> > +                                * [0, nb_event_queues - 1] which previously supplied to
> > +                                * rte_event_dev_configure().
> > +                                */
> > +                               uint8_t next_stage;
> > +                       }
> > 
> > 
> I'm not sure about this. Wouldn't this break your use-case, since the
> queue_id and the next_stage have to be the same? I thought you always
> enqueued to the same queue, just with a different next_stage value.

I thought to create mode in configuration stage as mutually exclusive.
i.e. If device configured as sub_event_type based pipelining use
next_stage as sub_event_type else queue_id.


> 
> /Bruce
> 

  reply	other threads:[~2017-02-13 11:21 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1484580885-148524-1-git-send-email-harry.van.haaren@intel.com>
2017-01-31 16:14 ` [dpdk-dev] [PATCH v2 00/15] next-eventdev: event/sw software eventdev Harry van Haaren
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 01/15] eventdev: remove unneeded dependencies Harry van Haaren
2017-02-06  8:12     ` Jerin Jacob
2017-02-08 14:35       ` Jerin Jacob
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 02/15] eventdev: add APIs for extended stats Harry van Haaren
2017-02-06  8:22     ` Jerin Jacob
2017-02-06 10:37       ` Van Haaren, Harry
2017-02-07  6:24         ` Jerin Jacob
2017-02-09 14:04           ` Van Haaren, Harry
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 03/15] event/sw: add new software-only eventdev driver Harry van Haaren
2017-02-06  8:32     ` Jerin Jacob
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 04/15] event/sw: add device capabilities function Harry van Haaren
2017-02-06  8:34     ` Jerin Jacob
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 05/15] event/sw: add configure function Harry van Haaren
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 06/15] event/sw: add fns to return default port/queue config Harry van Haaren
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 07/15] event/sw: add support for event queues Harry van Haaren
2017-02-06  9:25     ` Jerin Jacob
2017-02-06 10:25       ` Van Haaren, Harry
2017-02-07  6:58         ` Jerin Jacob
2017-02-07  9:58           ` Van Haaren, Harry
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 08/15] event/sw: add support for event ports Harry van Haaren
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 09/15] event/sw: add support for linking queues to ports Harry van Haaren
2017-02-06  9:37     ` Jerin Jacob
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 10/15] event/sw: add worker core functions Harry van Haaren
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 11/15] event/sw: add scheduling logic Harry van Haaren
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 12/15] event/sw: add start stop and close functions Harry van Haaren
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 13/15] event/sw: add dump function for easier debugging Harry van Haaren
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 14/15] event/sw: add xstats support Harry van Haaren
2017-01-31 16:14   ` [dpdk-dev] [PATCH v2 15/15] app/test: add unit tests for SW eventdev driver Harry van Haaren
2017-02-08 10:23     ` Jerin Jacob
2017-02-08 10:44       ` Van Haaren, Harry
2017-02-13 10:28         ` Jerin Jacob
2017-02-13 10:45           ` Bruce Richardson
2017-02-13 11:21             ` Jerin Jacob [this message]
2017-02-08 18:02       ` Nipun Gupta
2017-02-13 11:37         ` Jerin Jacob
2017-02-11  9:13     ` Jerin Jacob
2017-02-06  8:07   ` [dpdk-dev] [PATCH v2 00/15] next-eventdev: event/sw software eventdev Jerin Jacob
2017-02-06 10:14     ` Van Haaren, Harry
2017-02-17 14:53   ` [dpdk-dev] [PATCH v3 00/17] " Harry van Haaren
2017-02-17 14:53     ` [dpdk-dev] [PATCH v3 01/17] eventdev: fix API docs and test for timeout ticks Harry van Haaren
2017-02-20 15:22       ` Mcnamara, John
2017-03-06 10:33       ` Jerin Jacob
2017-03-10 15:24         ` Van Haaren, Harry
2017-03-08 10:35       ` [dpdk-dev] [PATCH] eventdev: improve API docs " Harry van Haaren
2017-03-13  8:48         ` Jerin Jacob
2017-02-17 14:53     ` [dpdk-dev] [PATCH v3 02/17] eventdev: increase size of enq deq conf variables Harry van Haaren
2017-02-19 12:05       ` Jerin Jacob
2017-02-17 14:53     ` [dpdk-dev] [PATCH v3 03/17] app/test: eventdev link all queues before start Harry van Haaren
2017-02-19 12:09       ` Jerin Jacob
2017-02-17 14:53     ` [dpdk-dev] [PATCH v3 04/17] eventdev: add APIs for extended stats Harry van Haaren
2017-02-19 12:32       ` Jerin Jacob
2017-02-20 12:12         ` Van Haaren, Harry
2017-02-20 12:34           ` Jerin Jacob
2017-02-17 14:54     ` [dpdk-dev] [PATCH v3 05/17] event/sw: add new software-only eventdev driver Harry van Haaren
2017-02-19 12:37       ` Jerin Jacob
2017-02-17 14:54     ` [dpdk-dev] [PATCH v3 06/17] event/sw: add device capabilities function Harry van Haaren
2017-02-17 14:54     ` [dpdk-dev] [PATCH v3 07/17] event/sw: add configure function Harry van Haaren
2017-02-17 14:54     ` [dpdk-dev] [PATCH v3 08/17] event/sw: add fns to return default port/queue config Harry van Haaren
2017-02-17 14:54     ` [dpdk-dev] [PATCH v3 09/17] event/sw: add support for event queues Harry van Haaren
2017-02-17 14:54     ` [dpdk-dev] [PATCH v3 10/17] event/sw: add support for event ports Harry van Haaren
2017-02-17 14:54     ` [dpdk-dev] [PATCH v3 11/17] event/sw: add support for linking queues to ports Harry van Haaren
2017-02-17 14:54     ` [dpdk-dev] [PATCH v3 12/17] event/sw: add worker core functions Harry van Haaren
2017-02-17 14:54     ` [dpdk-dev] [PATCH v3 13/17] event/sw: add scheduling logic Harry van Haaren
2017-02-17 14:54     ` [dpdk-dev] [PATCH v3 14/17] event/sw: add start stop and close functions Harry van Haaren
2017-02-17 14:54     ` [dpdk-dev] [PATCH v3 15/17] event/sw: add dump function for easier debugging Harry van Haaren
2017-02-17 14:54     ` [dpdk-dev] [PATCH v3 16/17] event/sw: add xstats support Harry van Haaren
2017-02-17 14:54     ` [dpdk-dev] [PATCH v3 17/17] app/test: add unit tests for SW eventdev driver Harry van Haaren
2017-03-10 19:43     ` [dpdk-dev] [PATCH v4 00/17] next-eventdev: event/sw software eventdev Harry van Haaren
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 01/17] eventdev: increase size of enq deq conf variables Harry van Haaren
2017-03-13  8:47         ` Jerin Jacob
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 02/17] app/test: eventdev link all queues before start Harry van Haaren
2017-03-20  4:46         ` Jerin Jacob
2017-03-23 10:18           ` Jerin Jacob
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 03/17] test/eventdev: rework timeout ticks test Harry van Haaren
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 04/17] eventdev: add APIs for extended stats Harry van Haaren
2017-03-17 12:22         ` Jerin Jacob
2017-03-23 10:20           ` Jerin Jacob
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 05/17] event/sw: add new software-only eventdev driver Harry van Haaren
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 06/17] event/sw: add device capabilities function Harry van Haaren
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 07/17] event/sw: add configure function Harry van Haaren
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 08/17] event/sw: add fns to return default port/queue config Harry van Haaren
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 09/17] event/sw: add support for event queues Harry van Haaren
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 10/17] event/sw: add support for event ports Harry van Haaren
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 11/17] event/sw: add support for linking queues to ports Harry van Haaren
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 12/17] event/sw: add worker core functions Harry van Haaren
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 13/17] event/sw: add scheduling logic Harry van Haaren
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 14/17] event/sw: add start stop and close functions Harry van Haaren
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 15/17] event/sw: add dump function for easier debugging Harry van Haaren
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 16/17] event/sw: add xstats support Harry van Haaren
2017-03-10 19:43       ` [dpdk-dev] [PATCH v4 17/17] app/test: add unit tests for SW eventdev driver Harry van Haaren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170213112120.GB26613@localhost.localdomain \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=nipun.gupta@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).