From: Stephen Hemminger <stephen@networkplumber.org>
To: longli@linuxonhyperv.com
Cc: Tyler Retzlaff <roretzla@linux.microsoft.com>,
dev@dpdk.org, Malcolm Bumgardner <mbumgard@cisco.com>,
stable@dpdk.org, Long Li <longli@microsoft.com>
Subject: Re: [PATCH] eal: fix device unregister for event registered with device_name NULL
Date: Tue, 24 Sep 2024 08:50:29 -0700 [thread overview]
Message-ID: <20240924085029.6a033be4@fedora> (raw)
In-Reply-To: <1721331448-9225-1-git-send-email-longli@linuxonhyperv.com>
On Thu, 18 Jul 2024 12:37:28 -0700
longli@linuxonhyperv.com wrote:
> From: Malcolm Bumgardner <mbumgard@cisco.com>
>
> In the device event unregister code, it unconditionally remove all
> callbacks which are registered with device_name set to NULL. This results
> in many callbacks uncorrectly removed.
>
> Fix this by only removing callbacks with matching cb_fn and cb_arg.
>
> Signed-off-by: Malcolm Bumgardner <mbumgard@cisco.com>
>
> Fixes: a753e53d517b ("eal: add device event monitor framework")
> Cc: stable@dpdk.org
> Signed-off-by: Long Li <longli@microsoft.com>
> ---
> lib/eal/common/eal_common_dev.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
This patch solves the problem in the netvsc driver.
The netvsc driver registers a device event callback to discover when the VF
is added/removed. When the netvsc driver is stoppped, it unregisters this callback.
The bug is that the rte_dev code would end up removing all callbacks, including
the callback for other netvsc devices.
Perhaps a bugzilla entry or more direct example would have gotten more attention
on this.
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
next prev parent reply other threads:[~2024-09-24 15:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 19:37 longli
2024-09-24 15:50 ` Stephen Hemminger [this message]
2024-10-10 10:00 ` David Marchand
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=20240924085029.6a033be4@fedora \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=longli@linuxonhyperv.com \
--cc=longli@microsoft.com \
--cc=mbumgard@cisco.com \
--cc=roretzla@linux.microsoft.com \
--cc=stable@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 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).