All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: 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: Sat, 11 Mar 2023 08:28:26 -0800	[thread overview]
Message-ID: <20230311082826.3d2050c9@hermes.local> (raw)
In-Reply-To: <20230311050130.115138-1-kuba@kernel.org>

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?

  parent reply	other threads:[~2023-03-11 16:28 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 ` Stephen Hemminger [this message]
2023-03-13  1:37   ` [RFC net-next 1/3] net: provide macros for commonly copied lockless queue stop/wake code Willem de Bruijn
2023-03-13  1:45     ` Stephen Hemminger
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=20230311082826.3d2050c9@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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.