[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <640e7e633acec_24c5ed2088c@willemb.c.googlers.com.notmuch>
Date: Sun, 12 Mar 2023 21:37:39 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Stephen Hemminger <stephen@...workplumber.org>,
Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
pabeni@...hat.com, alexanderduyck@...com, roman.gushchin@...ux.dev
Subject: Re: [RFC net-next 1/3] net: provide macros for commonly copied
lockless queue stop/wake code
Stephen Hemminger wrote:
> On Fri, 10 Mar 2023 21:01:28 -0800
> Jakub Kicinski <kuba@...nel.org> wrote:
>
> > A lot of drivers follow the same scheme to stop / start queues
> > without introducing locks between xmit and NAPI tx completions.
> > I'm guessing they all copy'n'paste each other's code.
> >
> > Smaller drivers shy away from the scheme and introduce a lock
> > which may cause deadlocks in netpoll.
> >
> > Provide macros which encapsulate the necessary logic.
>
> Could any of these be inline functions instead for type safety?
I suppose not because of the condition that is evaluated.
Btw: perdicate -> predicate
Powered by blists - more mailing lists