From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>
Cc: bernard.iremonger@intel.com
Subject: Re: [dpdk-dev] [PATCH] ethdev: remove useless parameter in callback process
Date: Thu, 28 Dec 2017 22:56:35 +0100 [thread overview]
Message-ID: <2205083.4lcr8qjecY@xps> (raw)
In-Reply-To: <1953628.EychQmWvfA@xps>
28/12/2017 22:54, Thomas Monjalon:
> 22/12/2017 04:08, Ferruh Yigit:
> > On 11/28/2017 2:09 PM, Thomas Monjalon wrote:
> > > The pointer to the user parameter of the callback registration is
> > > automatically pass to the callback function.
> > > There is no point to allow changing this user parameter by a caller.
> > > That's why this parameter is always set to NULL by PMDs and set only
> > > in ethdev layer before calling the callback function.
> >
> > It can be helpful to mention a little from history:
> >
> > user cb_arg overwrite introduced by [1], to enable driver pass a pointer to user
> > callback function and carry some information back from app to driver.
> >
> > Later to prevent usage of cb_arg as both input and output, an explicit output
> > (ret_param) added [2] to _rte_eth_dev_callback_process() but previous cb_arg
> > overwriting kept without any user.
> >
> > [1]: c1ceaf3ad056 ("ethdev: add an argument to internal callback function")
> >
> > [2]: d6af1a13d7a1 ("ethdev: add return values to callback process API")
> >
> > >
> > > The NULL parameter in the internal callback processing function
> > > is now removed. It makes clear that the callback parameter is user
> > > managed and opaque from a DPDK point of view.
> > >
> > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> >
> > Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
>
> Applied
Sorry, not applied (should be applied on next-net).
I will send a v2 with a more detailed explanation.
next prev parent reply other threads:[~2017-12-28 21:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 22:09 Thomas Monjalon
2017-12-22 3:08 ` Ferruh Yigit
2017-12-28 21:54 ` Thomas Monjalon
2017-12-28 21:56 ` Thomas Monjalon [this message]
2017-12-28 22:10 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
2017-12-29 13:29 ` 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=2205083.4lcr8qjecY@xps \
--to=thomas@monjalon.net \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.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).