From: Ricardo Roldan Date: Tue, 7 Jan 2020 15:51:36 +0000 (+0100) Subject: ethdev: fix callback unregister with wildcard argument list X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ba1e69f121b97b4c8673a48c98072accdbc5af46;p=dpdk.git ethdev: fix callback unregister with wildcard argument list The function was checking -1 against the callback data instead of the given cb_arg parameter. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Ricardo Roldan Reviewed-by: Ferruh Yigit --- diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 6e9cb243ea..aec2d0f704 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -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; /*