DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: "Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
Cc: dev@dpdk.org, bruce.richardson@intel.com
Subject: Re: [dpdk-dev] [RFC 1/1] eventdev: add distributed software (DSW) event device
Date: Mon, 27 Aug 2018 15:10:03 +0530	[thread overview]
Message-ID: <20180827094001.GA22264@jerin> (raw)
In-Reply-To: <de18c3ec-7a33-71d8-3e9c-71d3e2337317@ericsson.com>

-----Original Message-----
> Date: Mon, 27 Aug 2018 11:23:59 +0200
> From: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> CC: dev@dpdk.org, bruce.richardson@intel.com
> Subject: Re: [dpdk-dev] [RFC 1/1] eventdev: add distributed software (DSW)
>  event device
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
>  Thunderbird/52.9.1
> 
> External Email
> 
> On 2018-07-22 13:32, Jerin Jacob wrote:
> 
> > > +static void
> > > +dsw_stop(struct rte_eventdev *dev __rte_unused)
> > > +{
> > 
> > You may implement, eventdev_stop_flush_t callback to free up the
> > outstanding events in the eventdev.
> > 
> 
> Is this support mandatory, or is it OK to leave it to the user to empty
> the machinery before calling stop in the initial driver version?

This is useful to avoid event buffer leak. The application may call stop()
abruptly or some reason event device cannot provide the event on
dequeue().

Any trivial implementation could be doing dequeue() in the driver on
stop().

> 
> I can't find any other event device supporting the callback.

drivers/event/sw and drivers/event/octeontx/ supports it.

$ grep -r "dev_stop_flush" drivers/event/
drivers/event/octeontx/ssovf_evdev.c:	if (dev->dev_ops->dev_stop_flush != NULL)
drivers/event/octeontx/ssovf_evdev.c: dev->dev_ops->dev_stop_flush(dev->data->dev_id, event,
dev->data->dev_stop_flush_arg);
drivers/event/sw/sw_evdev_selftest.c:dev_stop_flush(struct test *t) /*
test to check we can properly flush events */
drivers/event/sw/sw_evdev_selftest.c:	if
(rte_event_dev_stop_flush_callback_register(evdev, flush, &count)) {
drivers/event/sw/sw_evdev_selftest.c:	if
(rte_event_dev_stop_flush_callback_register(evdev, NULL, NULL)) {
drivers/event/sw/sw_evdev_selftest.c:	ret = dev_stop_flush(t);
drivers/event/sw/sw_evdev.c:	eventdev_stop_flush_t flush;
drivers/event/sw/sw_evdev.c:	flush = dev->dev_ops->dev_stop_flush;
drivers/event/sw/sw_evdev.c:	arg = dev->data->dev_stop_flush_arg;
drivers/event/sw/sw_evdev.c:	eventdev_stop_flush_t flush;
drivers/event/sw/sw_evdev.c:	flush = dev->dev_ops->dev_stop_flush;
drivers/event/sw/sw_evdev.c:	arg = dev->data->dev_stop_flush_arg;

> 
> In DSW, the events can be a little here-and-there - in the output
> buffers, in the pause buffer, and on the input rings.

Any trivial implementation could be doing dequeue() in the driver on
stop().

> 
> That said, assuming the worker lcore threads have stopped using the
> device and issued the appropriate barriers, it should be possible to
> round up the events from the thread running 'rte_event_dev_stop'.

  reply	other threads:[~2018-08-27  9:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180711210844.5467-1-mattias.ronnblom@ericsson.com>
     [not found] ` <20180711210844.5467-2-mattias.ronnblom@ericsson.com>
2018-07-22 11:32   ` Jerin Jacob
2018-08-19  6:11     ` Jerin Jacob
2018-08-23 13:08       ` Mattias Rönnblom
2018-08-23 13:44         ` Jerin Jacob
2018-08-23 20:08           ` Mattias Rönnblom
2018-08-27  9:23     ` Mattias Rönnblom
2018-08-27  9:40       ` Jerin Jacob [this message]
2018-08-27 10:24         ` Mattias Rönnblom
2018-07-11 21:21 [dpdk-dev] [RFC 0/1] A Distributed Software Event Device Mattias Rönnblom
2018-07-11 21:21 ` [dpdk-dev] [RFC 1/1] eventdev: add distributed software (DSW) event device Mattias Rönnblom

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=20180827094001.GA22264@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=mattias.ronnblom@ericsson.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).