linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Yunsheng Lin <linyunsheng@huawei.com>,
	davem@davemloft.net, linmiaohe@huawei.com,
	martin.varghese@nokia.com, pabeni@redhat.com, pshelar@ovn.org,
	fw@strlen.de, gnault@redhat.com, steffen.klassert@secunet.com,
	kyk.segfault@gmail.com, viro@zeniv.linux.org.uk,
	vladimir.oltean@nxp.com, edumazet@google.com, saeed@kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linuxarm@huawei.com
Subject: Re: [PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb()
Date: Wed, 18 Nov 2020 16:57:57 +0100	[thread overview]
Message-ID: <20201118155757.GY3121392@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20201118074348.3bbd1468@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>

On Wed, Nov 18, 2020 at 07:43:48AM -0800, Jakub Kicinski wrote:

> TBH the last sentence I wrote isn't clear even to me at this point ;D
> 
> Maybe using just the macros from preempt.h - like this?
> 
> #define lockdep_assert_in_softirq()                                    \
> do {                                                                   \
>        WARN_ON_ONCE(__lockdep_enabled                  &&              \
>                     (!in_softirq() || in_irq() || in_nmi())	\
> } while (0)
> 
> We know what we're doing so in_softirq() should be fine (famous last
> words).

So that's not actually using any lockdep state. But if that's what you
need, I don't have any real complaints.

  reply	other threads:[~2020-11-18 15:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 11:34 [PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb() Yunsheng Lin
2020-10-31 22:38 ` Jakub Kicinski
2020-11-02  3:14   ` Yunsheng Lin
2020-11-02 19:41     ` Jakub Kicinski
2020-11-18  1:57       ` Yunsheng Lin
2020-11-18 15:43         ` Jakub Kicinski
2020-11-18 15:57           ` Peter Zijlstra [this message]
2020-11-18 16:26             ` Jakub Kicinski
2020-11-19  9:19               ` Yunsheng Lin
2020-11-19 11:41                 ` Peter Zijlstra
2020-11-19 12:29                   ` Yunsheng Lin

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=20201118155757.GY3121392@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=gnault@redhat.com \
    --cc=kuba@kernel.org \
    --cc=kyk.segfault@gmail.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=linyunsheng@huawei.com \
    --cc=martin.varghese@nokia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pshelar@ovn.org \
    --cc=saeed@kernel.org \
    --cc=steffen.klassert@secunet.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=vladimir.oltean@nxp.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).