[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230311082826.3d2050c9@hermes.local>
Date: Sat, 11 Mar 2023 08:28:26 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: 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
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?
Powered by blists - more mailing lists