[dpdk-dev] [PATCH] ethdev: remove useless parameter in callback process
thomas at monjalon.net
Thu Dec 28 22:54:07 CET 2017
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 , 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  to _rte_eth_dev_callback_process() but previous cb_arg
> overwriting kept without any user.
> : c1ceaf3ad056 ("ethdev: add an argument to internal callback function")
> : 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 at monjalon.net>
> Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
More information about the dev