All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ricardo Roldan <rroldan@bequant.com>
To: dev@dpdk.org
Cc: Ricardo Roldan <rroldan@bequant.com>
Subject: [dpdk-dev] [PATCH] ethdev: rte_eth_dev_callback_unregister() fails with cb_arg == -1
Date: Tue,  7 Jan 2020 16:51:36 +0100	[thread overview]
Message-ID: <20200107155136.70237-1-rroldan@bequant.com> (raw)

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


             reply	other threads:[~2020-01-07 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 15:51 Ricardo Roldan [this message]
2020-01-13 16:45 ` [dpdk-dev] [PATCH] ethdev: rte_eth_dev_callback_unregister() fails with cb_arg == -1 Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200107155136.70237-1-rroldan@bequant.com \
    --to=rroldan@bequant.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.