[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z-a6hF7Ki3uAnQTF@mini-arch>
Date: Fri, 28 Mar 2025 08:04:36 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Stanislav Fomichev <sdf@...ichev.me>, netdev@...r.kernel.org,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com
Subject: Re: [PATCH net v2 06/11] netdevsim: add dummy device notifiers
On 03/27, Jakub Kicinski wrote:
> 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
> 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?
SG, reusing the notifier handler makes sense, will do!
Powered by blists - more mailing lists