The function was checking -1 against the callback data instead of
the given cb_arg parameter.
Signed-off-by: Ricardo Roldan <rroldan@bequant.com>
---
lib/librte_ethdev/rte_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 6e9cb243e..aec2d0f70 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;
/*
--
2.23.0