[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220311094150.6b69c6ae@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Fri, 11 Mar 2022 09:41:50 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Leon Romanovsky <leonro@...dia.com>
Cc: <idosch@...dia.com>, <petrm@...dia.com>,
<simon.horman@...igine.com>, <netdev@...r.kernel.org>,
<jiri@...nulli.us>
Subject: Re: [RFT net-next 1/6] devlink: expose instance locking and add
locked port registering
On Fri, 11 Mar 2022 09:39:13 -0800 Jakub Kicinski wrote:
> > I think so. It doesn't create shadow dependency on LOCKDEP.
> > In your variant, all users of this call will generate WARN
> > in production systems that run without lockdep.
>
> No, no, that function is mostly for rcu dereference checking.
> The calls should be eliminated as dead code on production systems.
>
> > So if you want the "eliminate" thing like you wrote in the comment,
> > the ifdef is a common solution.
>
> I think these days people try to use IS_ENABLED() whenever possible.
Let me wrap the implementation in an ifdef, I guess that may be least
confusing and the linker error vs runtime warning is worth the cost.
> > > Can do it you prefer, but I'd lean towards a version
> > > without an ifdef myself.
> >
> > So you need to add CONFIG_LOCKDEP dependency in devlink Kconfig.
>
> I don't see why.
Powered by blists - more mailing lists