[dpdk-dev] [PATCH v2] ethdev: remove useless parameter in callback process
Thomas Monjalon
thomas at monjalon.net
Fri Dec 29 14:29:21 CET 2017
28/12/2017 23:10, Thomas Monjalon:
> 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.
>
> The history is that the user parameter was initially used
> by the callback implementation to pass some information
> between the application and the driver:
> c1ceaf3ad056 ("ethdev: add an argument to internal callback function")
> Then a new parameter has been added to leave the user parameter
> to its standard usage of context given at registration:
> 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>
> ---
> v2: add history explanation
This patch is now part of the patchset v3 for new ethdev notifications.
More information about the dev
mailing list