[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250328060450.45064-1-kuniyu@amazon.com>
Date: Thu, 27 Mar 2025 23:03:28 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <kuba@...nel.org>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <netdev@...r.kernel.org>,
<pabeni@...hat.com>, <sdf@...ichev.me>, <stfomichev@...il.com>
Subject: Re: [PATCH net v2 06/11] netdevsim: add dummy device notifiers
From: Jakub Kicinski <kuba@...nel.org>
Date: Thu, 27 Mar 2025 14:46:09 -0700
> On Thu, 27 Mar 2025 14:04:06 -0700 Stanislav Fomichev wrote:
> > > Can we register empty notifiers in nsim (just to make sure it has
> > > a callback) but do the validation in rtnl_net_debug.c
> > > I guess we'd need to transform rtnl_net_debug.c a little,
> > > make it less rtnl specific, compile under DEBUG_NET and ifdef
> > > out the small rtnl parts?
> >
> > s/rtnl_net_debug.c/notifiers_debug.c/ + DEBUG_NET? Or I can keep the
> > name and only do the DEBUG_NET part.
>
> I was thinking lock or locking as in net/core/lock_debug.c
Maybe lock.c (or netdev_lock.c like netdev_lock.h) and move all
locking stuff (netdev_lock_type[], netdev_lock_pos(), etc) there
later + ifdef where necessary ?
> But yeah, it's locking in notifier locking, maybe
> net/core/notifier_lock_debug.c then? No strong feelings.
>
> > Not sure what needs to be ifdef-ed out,
> > but will take a look (probably just enough to make it compile with
> > !CONFIG_DEBUG_NET_SMALL_RTNL ?).
>
> You're right, looking at the code we need all of it.
> Somehow I thought its doing extra netns related stuff but it just
> register a notifier in each ns.
> I guess we may not need any ifdef at all.
>
> > That should work for the regular notifiers,
> > but I think register_netdevice_notifier_dev_net needs a netdev?
>
> Hm. Yes. Not sure if we need anything extra in the notifier for nsim
> or we just want to make make sure it registers one. If the latter
> I guess we could export rtnl_net_debug_event (modulo rename) and
> call it from netdevsim? I mean - we would probably have the same
> exact asserts in both?
>
Powered by blists - more mailing lists