ethdev: rte_eth_dev_callback_unregister() fails with cb_arg == -1
PATCH 1/1 ethdev: rte_eth_dev_callback_unregister() fails with cb_arg == -1
The function was checking -1 against the callback data instead of the given cb_arg parameter.
Signed-off-by Ricardo Roldan <[email protected]>
--- lib/librte_ethdev/rte_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_ethdev/rte_ethdev.c +1 -1
@@ -4039,7 +4039,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id, next =TAILQ_NEXT (cb, next);if (cb->cb_fn != cb_fn || cb->event != event || - (cb->cb_arg != (void *)-1 && cb->cb_arg != cb_arg)) + (cb_arg != (void *)-1 && cb->cb_arg != cb_arg))continue ;/*
Signature · 1 line
2.23.0
Quoted 4 lines · Ricardo Roldan
The function was checking -1 against the callback data instead of the given
cb_argparameter.Signed-off-by Ricardo Roldan <[email protected]>
Updated title as:
ethdev: fix callback unregister with wildcard argument list
Also adding following metadata to the commit log:
Fixes af75078fece3 ("first public release")
Reviewed-by Ferruh Yigit <[email protected]>
Applied to dpdk-next-net/master, thanks.
(This bug seems as old as DPDK itself J, thanks for fixing it.)