DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ethdev: rte_eth_dev_callback_unregister() fails with cb_arg == -1
@ 2020-01-07 15:51 Ricardo Roldan
  2020-01-13 16:45 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Roldan @ 2020-01-07 15:51 UTC (permalink / raw)
  To: dev; +Cc: Ricardo Roldan

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-13 16:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 15:51 [dpdk-dev] [PATCH] ethdev: rte_eth_dev_callback_unregister() fails with cb_arg == -1 Ricardo Roldan
2020-01-13 16:45 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).