From: "Björn Töpel" <bjorn@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>,
davem@davemloft.net, michael.chan@broadcom.com
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org,
pavan.chebbi@broadcom.com, joe@dama.to,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH net-next v2 1/7] eth: bnxt_en: order event data before setting the sp_event bit
Date: Sun, 22 Nov 2026 21:20:01 +0100 [thread overview]
Message-ID: <87h5h81uvi.fsf@all.your.base.are.belong.to.us> (raw)
In-Reply-To: <20261120035214.369158-2-kuba@kernel.org>
Jakub Kicinski <kuba@kernel.org> writes:
> Producers of sp_events may store data for bnxt_sp_task() right before
> raising the event, e.g. the IRQ affinity notifier publishes the new
> TPH Steering Tag, the async event handler records the FW echo request
> data or the FW reset wait limits. set_bit() is not ordered, so on
> weakly ordered architectures the event bit may become visible first.
> If bnxt_sp_task() is already running it can consume the event and
> read the stale data. The queue_work() which follows only re-runs
> the task with the event bit already cleared, so the update is lost.
>
> Add a helper which issues smp_mb__before_atomic() before setting
> the bit, it pairs with the fully ordered test_and_clear_bit() in
> bnxt_sp_task(). Use it for all events, including those which carry
> no data, so that new producers don't have to think about it.
>
> Reported by an LLM reviewer while working on subsequent patches.
> Very unlikely to matter in practice.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> v2:
> - convert the producers which set the bit directly (Björn)
Reviewed-by: Björn Töpel <bjorn@kernel.org>
next prev parent reply other threads:[~2026-11-22 20:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 3:52 [PATCH net-next v2 0/7] eth: bnxt_en: allocate memory on the right NUMA node Jakub Kicinski
2026-11-20 3:52 ` [PATCH net-next v2 1/7] eth: bnxt_en: order event data before setting the sp_event bit Jakub Kicinski
2026-11-22 20:20 ` Björn Töpel [this message]
2026-11-20 3:52 ` [PATCH net-next v2 2/7] eth: bnxt_en: follow explicitly set IRQ affinity when placing page pool Jakub Kicinski
2026-11-23 3:52 ` netdev-bot+sashiko
2026-11-20 3:52 ` [PATCH net-next v2 3/7] eth: bnxt_en: allocate per-queue SW state on the queue's NUMA node Jakub Kicinski
2026-11-20 3:52 ` [PATCH net-next v2 4/7] eth: bnxt_en: explicitly keep device-only memory on the device's node Jakub Kicinski
2026-11-20 3:52 ` [PATCH net-next v2 5/7] eth: bnxt_en: allocate fast path DMA rings on the queue's NUMA node Jakub Kicinski
2026-11-20 3:52 ` [PATCH net-next v2 6/7] eth: bnxt_en: add a local bp variable in the IRQ affinity notifier Jakub Kicinski
2026-11-20 3:52 ` [PATCH net-next v2 7/7] eth: bnxt_en: restart Rx queues when their IRQ moves to another NUMA node Jakub Kicinski
2026-11-21 2:18 ` Michael Chan
2026-11-23 3:52 ` netdev-bot+sashiko
2026-11-21 2:20 ` [PATCH net-next v2 0/7] eth: bnxt_en: allocate memory on the right " Michael Chan
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=87h5h81uvi.fsf@all.your.base.are.belong.to.us \
--to=bjorn@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=joe@dama.to \
--cc=kuba@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.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