All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	linux-rt-devel@lists.linux.dev,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Jozsef Kadlecsik <kadlec@netfilter.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH nf-next v2 3/3] netfilter: nft_set_pipapo: Use nested-BH locking for nft_pipapo_scratch
Date: Mon, 18 Aug 2025 11:24:07 +0200	[thread overview]
Message-ID: <aKLxN7j8BTTxja8B@strlen.de> (raw)
In-Reply-To: <20250818091133.YJHx2Qmu@linutronix.de>

Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> > Not sure this is correct.  If RT allows to migrate in BH before
> > the local lock is taken, then the if (unlikely(!irq_fpu_usable()))
> > check needs to be done after the local lock was taken, no?
> 
> Looking at this again, that irq_fpu_usable() itself looks slightly
> placed at the wrong spot. It should be
> |	if (!irq_fpu_usable())
> |		return fallback_variant(); 
> |	local_bh_disable();
> 
> The reason is that if you expect calls from hardirq context then you
> shouldn't disable BH. Lockdep enabled kernels should complain in this
> case. But then this is networking and I would expect everything here
> should be injected via NAPI/ softirq (either via driver's NAPI or
> backlog's).

This is never called from hardirq context, its always process context
or softirq.  Are you saying that the irq_fpu_usable() is bogus
and can be axed?

> I've just started rebasing this patch on top of the testing branch. I
> see that you moved that code a bit around. I can't acquire the
> local_lock_t within kernel_fpu_begin(). I would need to move this back
> to pipapo_get_avx2().

Sure, I don't see why it can't be moved back to pipapo_get_avx2().

You can also just resubmit vs. nf-next main and I can rebase my
patches on top of the local_lock changes, up to you.

  reply	other threads:[~2025-08-18  9:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-15 16:09 [PATCH nf-next v2 0/3] netfilter: nft_set_pipapo: Use nested-BH locking for nft_pipapo_scratch Sebastian Andrzej Siewior
2025-08-15 16:09 ` [PATCH nf-next v2 1/3] netfilter: nft_set_pipapo: Store real pointer, adjust later Sebastian Andrzej Siewior
2025-08-15 16:09 ` [PATCH nf-next v2 2/3] netfilter: nft_set_pipapo_avx2: Drop the comment regarding protection Sebastian Andrzej Siewior
2025-08-15 16:09 ` [PATCH nf-next v2 3/3] netfilter: nft_set_pipapo: Use nested-BH locking for nft_pipapo_scratch Sebastian Andrzej Siewior
2025-08-16 14:25   ` Florian Westphal
2025-08-18  9:11     ` Sebastian Andrzej Siewior
2025-08-18  9:24       ` Florian Westphal [this message]
2025-08-18  9:56         ` Sebastian Andrzej Siewior
2025-08-19 15:49   ` kernel test robot
2025-08-21  6:03   ` kernel test robot
2025-08-16 15:15 ` [PATCH nf-next v2 0/3] " Florian Westphal

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=aKLxN7j8BTTxja8B@strlen.de \
    --to=fw@strlen.de \
    --cc=bigeasy@linutronix.de \
    --cc=coreteam@netfilter.org \
    --cc=kadlec@netfilter.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=tglx@linutronix.de \
    /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.