From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: Yafang Shao <laoar.shao@gmail.com>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Thomas Graf <tgraf@suug.ch>,
Paul McKenney <paulmck@kernel.org>,
"open list:BPF [RINGBUF]" <bpf@vger.kernel.org>,
Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH] net/cls_cgroup: Fix task_get_classid() during qdisc run
Date: Tue, 19 Aug 2025 15:26:08 +0200 [thread overview]
Message-ID: <20250819132608.ofNuEof6@linutronix.de> (raw)
In-Reply-To: <7d2f3767-64c5-4efa-862b-f463751a03bb@iogearbox.net>
On 2025-08-19 14:42:07 [+0200], Daniel Borkmann wrote:
> > --- a/include/net/cls_cgroup.h
> > +++ b/include/net/cls_cgroup.h
> > @@ -63,7 +63,7 @@ static inline u32 task_get_classid(const struct sk_buff *skb)
> > * calls by looking at the number of nested bh disable calls because
> > * softirqs always disables bh.
> > */
> > - if (in_serving_softirq()) {
> > + if (in_softirq()) {
> > struct sock *sk = skb_to_full_sk(skb);
> > /* If there is an sock_cgroup_classid we'll use that. */
…
> Looking at in_softirq(), the comment says "the following macros are deprecated and
> should not be used in new code", see commit 15115830c887 ("preempt: Cleanup the
> macro maze a bit"). Maybe Sebastian or Paul has input on whether in_softirq() is
> still supposed to be used.
it listed in the deprecated section so I would tend to suggest
softirq_count(). But then in_softirq() kind of describes what is done
while the other two (in_irq, in_interrupt) were ambiguous and people
often mixed them up.
Let me poke someone and then we maybe commit to clean up so leave the
limbo state.
> Thanks,
> Daniel
Sebastian
next prev parent reply other threads:[~2025-08-19 13:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 9:37 Yafang Shao
2025-08-19 12:42 ` Daniel Borkmann
2025-08-19 13:26 ` Sebastian Andrzej Siewior [this message]
2025-08-19 13:51 ` Yafang Shao
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=20250819132608.ofNuEof6@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=laoar.shao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paulmck@kernel.org \
--cc=tgraf@suug.ch \
--cc=willemb@google.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
all inboxes | Powered by JetHome®