From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org, sdf.kernel@gmail.com
Subject: Re: [PATCH net-next v2 1/2] net: use two lockdep classes for the netdev instance lock
Date: Mon, 28 Sep 2026 11:21:15 -0700 [thread overview]
Message-ID: <20260928112115.18a9d249@kernel.org> (raw)
In-Reply-To: <CANn89iLdVkThwG0A3tNTd57FdBSNk6xgp0p26f43u3FOBBYnww@mail.gmail.com>
On Sat, 26 Sep 2026 09:08:16 +0200 Eric Dumazet wrote:
> > mutex_init(&dev->lock);
> > + /* see also netdev_set_instance_lock_class() */
> > + lock_set_cmp_fn(&dev->lock, netdev_lock_cmp_fn, NULL);
> > netif_rx_mode_init(dev);
> >
> > dev->priv_flags = IFF_XMIT_DST_RELEASE | IFF_XMIT_DST_RELEASE_PERM;
>
> Some virttual drivers (like tun and wireguard) do not use yet
> netdev_lockdep_set_classes(),
> I'm not sure if they eventually will.
>
> We might ease their future request_ops_lock = true conversion by calling
> netdev_set_instance_lock_class(dev) directly inside register_netdevice()
>
> -> No EXPORT_SYMBOL_GPL(netdev_set_instance_lock_class) would be needed.
> In fact netdev_set_instance_lock_class couldd be static in net/core/dev.c
Ack, maybe I lazied out on this one a little. I wasn't sure what the
consequences are of not setting the class before the first lock use.
I _think_ I've seen a splat at some point when I did that.
I will investigate further if I need to respin
next prev parent reply other threads:[~2026-09-28 18:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-26 4:18 [PATCH net-next v2 1/2] net: use two lockdep classes for the netdev instance lock Jakub Kicinski
2026-09-26 4:18 ` [PATCH net-next v2 2/2] selftests: net: add test for netdev instance lock ordering on unregister Jakub Kicinski
2026-09-26 7:08 ` [PATCH net-next v2 1/2] net: use two lockdep classes for the netdev instance lock Eric Dumazet
2026-09-28 18:21 ` Jakub Kicinski [this message]
2026-09-28 16:40 ` Stanislav Fomichev
2026-09-29 11:19 ` Paolo Abeni
2026-09-29 11:30 ` patchwork-bot+netdevbpf
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=20260928112115.18a9d249@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf.kernel@gmail.com \
/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.