DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Bruce Richardson <bruce.richardson@intel.com>,
	"Sanford, Robert" <rsanford@akamai.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] Ethernet API - multiple post-RX-burst callbacks' run-order is opposite to their add-order
Date: Fri, 03 Jul 2015 12:02:38 +0200	[thread overview]
Message-ID: <3335065.GmhAzHV8Zp@xps13> (raw)
In-Reply-To: <20150703095741.GC7548@bricha3-MOBL3>

2015-07-03 10:57, Bruce Richardson:
> On Thu, Jul 02, 2015 at 09:04:48PM +0000, Sanford, Robert wrote:
> > When one adds multiple post-RX-burst callbacks to a queue, their execution order is the opposite of the order in which they are added. For example, we add callback A( ), and then we add callback B( ). When we call rte_eth_rx_burst, after invoking the device's rx_pkt_burst function, it will invoke B( ), and then A( ). The same goes for pre-TX-burst callbacks, too.
> > 
> > This is counter-intuitive. Shouldn't we either execute the callbacks in the same order that we add them (by changing the internals of the add-APIs), or change the add-APIs to allow one to specify whether a callback is added to the head or tail of the callback list? At the least, we could document the expected behavior.
> > Any thoughts on this?
> > 
> Makes sense. I would agree that having the callbacks called in order of addition
> makes more sense. 
> Having the order configurable might be useful, but would require an API change,
> so I'd only look to change that if it really proves necessary. If the callback
> order is consistent and behaves logically (i.e. order of call == order of add),
> can the app not ensure the callbacks are added in the correct order?

+1 to improve behaviour without changing the API.
If the applications can manage with a simple DPDK API, it's better for everyone.

  reply	other threads:[~2015-07-03 10:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02 21:04 Sanford, Robert
2015-07-03  9:57 ` Bruce Richardson
2015-07-03 10:02   ` Thomas Monjalon [this message]
2015-07-10 13:14 ` Mcnamara, John
2015-07-10 13:24   ` Thomas Monjalon
2015-07-10 13:52     ` Mcnamara, John
2015-07-10 14:02       ` Thomas Monjalon

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=3335065.GmhAzHV8Zp@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=rsanford@akamai.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).