DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Eads, Gage" <gage.eads@intel.com>
To: "Van Haaren, Harry" <harry.van.haaren@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "jerin.jacob@caviumnetworks.com" <jerin.jacob@caviumnetworks.com>,
	"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	"santosh.shukla@caviumnetworks.com"
	<santosh.shukla@caviumnetworks.com>,
	"nipun.gupta@nxp.com" <nipun.gupta@nxp.com>
Subject: Re: [dpdk-dev] [PATCH v4 2/2] event/sw: support device stop flush callback
Date: Mon, 26 Mar 2018 22:01:43 +0000	[thread overview]
Message-ID: <9184057F7FC11744A2107296B6B8EB1E3FA88B56@FMSMSX108.amr.corp.intel.com> (raw)
In-Reply-To: <E923DB57A917B54B9182A2E928D00FA65E016434@IRSMSX101.ger.corp.intel.com>



> -----Original Message-----
> From: Van Haaren, Harry
> Sent: Friday, March 23, 2018 12:06 PM
> To: Eads, Gage <gage.eads@intel.com>; dev@dpdk.org
> Cc: jerin.jacob@caviumnetworks.com; hemant.agrawal@nxp.com; Richardson,
> Bruce <bruce.richardson@intel.com>; santosh.shukla@caviumnetworks.com;
> nipun.gupta@nxp.com
> Subject: RE: [PATCH v4 2/2] event/sw: support device stop flush callback
> 
> > From: Eads, Gage
> > Sent: Tuesday, March 20, 2018 2:13 PM
> > To: dev@dpdk.org
> > Cc: jerin.jacob@caviumnetworks.com; Van Haaren, Harry
> > <harry.van.haaren@intel.com>; hemant.agrawal@nxp.com; Richardson,
> > Bruce <bruce.richardson@intel.com>; santosh.shukla@caviumnetworks.com;
> > nipun.gupta@nxp.com
> > Subject: [PATCH v4 2/2] event/sw: support device stop flush callback
> >
> > This commit also adds a flush callback test to the sw eventdev's
> > selftest suite.
> >
> > Signed-off-by: Gage Eads <gage.eads@intel.com>
> > ---
> >  drivers/event/sw/sw_evdev.c          | 25 ++++++++++-
> >  drivers/event/sw/sw_evdev_selftest.c | 80
> > +++++++++++++++++++++++++++++++++++-
> >  2 files changed, 102 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
> > index 0e89f11..11f394f 100644
> > --- a/drivers/event/sw/sw_evdev.c
> > +++ b/drivers/event/sw/sw_evdev.c
> > @@ -362,8 +362,25 @@ sw_init_qid_iqs(struct sw_evdev *sw)  }
> >
> >  static void
> > -sw_clean_qid_iqs(struct sw_evdev *sw)
> > +sw_flush_iq(struct rte_eventdev *dev, struct sw_iq *iq)
> >  {
> > +	struct sw_evdev *sw = sw_pmd_priv(dev);
> > +
> > +	while (iq_count(iq) > 0) {
> > +		struct rte_event event;
> > +
> > +		iq_dequeue_burst(sw, iq, &event, 1);
> > +
> > +		dev->dev_ops->dev_stop_flush(dev->data->dev_id,
> > +					     event,
> > +					     dev->data->dev_stop_flush_arg);
> 
> 
> Adding check that dev_stop_flush() is non-NULL?
> 
> [Update: Ah I see you do this below already. Still, better check twice I think, the
> data path isn't running here anyway in case future me decides to call
> sw_flush_iq() without performing the check]

Agreed, will fix in v5.

> 
> if(dev->dev_ops->dev_stop_flush)
>    dev->dev_ops->dev_stop_flush(...);
> 
> 
> 
> 
> > @@ -702,7 +723,7 @@ static void
> >  sw_stop(struct rte_eventdev *dev)
> >  {
> >  	struct sw_evdev *sw = sw_pmd_priv(dev);
> > -	sw_clean_qid_iqs(sw);
> > +	sw_clean_qid_iqs(dev);
> 
> Based on the port buffers comment on 1/2, we probably need a
> sw_clean_port_buffers(sw); here to return any events in the port owned SW
> buffers?
> 

Agreed, if there is buy-in on the approach discussed in patch #1.

  reply	other threads:[~2018-03-26 22:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-05 23:01 [dpdk-dev] [PATCH 1/2] eventdev: add " Gage Eads
2018-03-05 23:01 ` [dpdk-dev] [PATCH 2/2] event/sw: support " Gage Eads
2018-03-08 23:10 ` [dpdk-dev] [PATCH v2 1/2] eventdev: add " Gage Eads
2018-03-08 23:10   ` [dpdk-dev] [PATCH v2 2/2] event/sw: support " Gage Eads
2018-03-12  6:25   ` [dpdk-dev] [PATCH v2 1/2] eventdev: add " Jerin Jacob
2018-03-12 14:30     ` Eads, Gage
2018-03-12 14:38       ` Jerin Jacob
2018-03-15  4:12   ` [dpdk-dev] [PATCH v3 " Gage Eads
2018-03-15  4:12     ` [dpdk-dev] [PATCH v3 2/2] event/sw: support " Gage Eads
2018-03-20  7:44     ` [dpdk-dev] [PATCH v3 1/2] eventdev: add " Jerin Jacob
2018-03-20 14:11       ` Eads, Gage
2018-03-20 14:13     ` [dpdk-dev] [PATCH v4 " Gage Eads
2018-03-20 14:13       ` [dpdk-dev] [PATCH v4 2/2] event/sw: support " Gage Eads
2018-03-23 17:05         ` Van Haaren, Harry
2018-03-26 22:01           ` Eads, Gage [this message]
2018-04-02  8:03             ` Jerin Jacob
2018-04-02 15:50               ` Eads, Gage
2018-04-02 17:08                 ` Jerin Jacob
2018-03-23 16:57       ` [dpdk-dev] [PATCH v4 1/2] eventdev: add " Van Haaren, Harry
2018-03-26 21:59         ` Eads, Gage
2018-03-27  8:20           ` Van Haaren, Harry
2018-03-29 11:02             ` Van Haaren, Harry
2018-03-29 18:34               ` Jerin Jacob
2018-03-30  9:54               ` Liang, Ma
2018-04-02  8:01       ` Jerin Jacob
2018-04-02 18:03       ` [dpdk-dev] [PATCH v5] " Gage Eads
2018-04-03  1:26         ` Jerin Jacob
2018-04-03  1:31           ` Jerin Jacob

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=9184057F7FC11744A2107296B6B8EB1E3FA88B56@FMSMSX108.amr.corp.intel.com \
    --to=gage.eads@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=nipun.gupta@nxp.com \
    --cc=santosh.shukla@caviumnetworks.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).