path: root/drivers/net/mlx5/mlx5_ethdev.c
diff options
authorThomas Monjalon <>2018-01-04 17:01:08 +0100
committerFerruh Yigit <>2018-01-16 18:47:49 +0100
commitcebe3d7b3d2066981d9179b52b79966e69e68fd7 (patch)
tree8248469efdbb472297e98f98dff4d182ef5e16c8 /drivers/net/mlx5/mlx5_ethdev.c
parent1e3a958f40b305d66e8d067121a30efbd2753f2a (diff)
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 <> Reviewed-by: Ferruh Yigit <>
Diffstat (limited to 'drivers/net/mlx5/mlx5_ethdev.c')
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 278a4df..79a0248 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -1193,8 +1193,7 @@ mlx5_dev_link_status_handler(void *arg)
ret = priv_link_status_update(priv);
if (!ret)
- _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL,
- NULL);
+ _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
@@ -1216,11 +1215,9 @@ mlx5_dev_interrupt_handler(void *cb_arg)
events = priv_dev_status_handler(priv);
if (events & (1 << RTE_ETH_EVENT_INTR_LSC))
- _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL,
- NULL);
+ _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
if (events & (1 << RTE_ETH_EVENT_INTR_RMV))
- _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RMV, NULL,
- NULL);
+ _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RMV, NULL);