ethdev: remove useless parameter in callback process
authorThomas Monjalon <thomas@monjalon.net>
Thu, 4 Jan 2018 16:01:08 +0000 (17:01 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
commitcebe3d7b3d2066981d9179b52b79966e69e68fd7
tree8248469efdbb472297e98f98dff4d182ef5e16c8
parent1e3a958f40b305d66e8d067121a30efbd2753f2a
ethdev: remove useless parameter in callback process

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@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
26 files changed:
doc/guides/prog_guide/poll_mode_drv.rst
drivers/net/avf/avf_vchnl.c
drivers/net/bnxt/rte_pmd_bnxt.c
drivers/net/bonding/rte_eth_bond_pmd.c
drivers/net/dpaa2/dpaa2_ethdev.c
drivers/net/e1000/em_ethdev.c
drivers/net/e1000/igb_ethdev.c
drivers/net/enic/enic_main.c
drivers/net/failsafe/failsafe_ether.c
drivers/net/fm10k/fm10k_ethdev.c
drivers/net/i40e/i40e_ethdev.c
drivers/net/i40e/i40e_ethdev_vf.c
drivers/net/i40e/i40e_pf.c
drivers/net/ixgbe/ixgbe_ethdev.c
drivers/net/ixgbe/ixgbe_pf.c
drivers/net/mlx4/mlx4_intr.c
drivers/net/mlx5/mlx5_ethdev.c
drivers/net/nfp/nfp_net.c
drivers/net/sfc/sfc_intr.c
drivers/net/thunderx/nicvf_ethdev.c
drivers/net/vhost/rte_eth_vhost.c
drivers/net/virtio/virtio_ethdev.c
drivers/net/vmxnet3/vmxnet3_ethdev.c
lib/librte_ether/rte_ethdev.c
lib/librte_ether/rte_ethdev.h
test/test/virtual_pmd.c