From: Stephen Hemminger <stephen@networkplumber.org>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, alexanderduyck@fb.com,
roman.gushchin@linux.dev
Subject: Re: [RFC net-next 1/3] net: provide macros for commonly copied lockless queue stop/wake code
Date: Sun, 12 Mar 2023 18:45:15 -0700 [thread overview]
Message-ID: <20230312184515.5eabc8df@hermes.local> (raw)
In-Reply-To: <640e7e633acec_24c5ed2088c@willemb.c.googlers.com.notmuch>
On Sun, 12 Mar 2023 21:37:39 -0400
Willem de Bruijn <willemdebruijn.kernel@gmail.com> wrote:
> Stephen Hemminger wrote:
> > On Fri, 10 Mar 2023 21:01:28 -0800
> > Jakub Kicinski <kuba@kernel.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.
It is more that the condition needs to evaluated after some other
pre-conditions.
next prev parent reply other threads:[~2023-03-13 1:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-11 5:01 [RFC net-next 1/3] net: provide macros for commonly copied lockless queue stop/wake code Jakub Kicinski
2023-03-11 5:01 ` [RFC net-next 2/3] ixgbe: use new queue try_stop/try_wake macros Jakub Kicinski
2023-03-11 5:01 ` [RFC net-next 3/3] bnxt: " Jakub Kicinski
2023-03-11 16:28 ` [RFC net-next 1/3] net: provide macros for commonly copied lockless queue stop/wake code Stephen Hemminger
2023-03-13 1:37 ` Willem de Bruijn
2023-03-13 1:45 ` Stephen Hemminger [this message]
2023-03-13 20:56 ` Jakub Kicinski
2023-04-04 3:29 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230312184515.5eabc8df@hermes.local \
--to=stephen@networkplumber.org \
--cc=alexanderduyck@fb.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=roman.gushchin@linux.dev \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).