From: netdev-bot+sashiko@kernel.org
To: bjorn@kernel.org
Cc: magnus.karlsson@intel.com, maciej.fijalkowski@intel.com,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, andrew+netdev@lunn.ch, ast@kernel.org,
daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com,
andrii@kernel.org, eddyz87@gmail.com, memxor@gmail.com,
ilias.apalodimas@linaro.org, alexanderduyck@fb.com,
saeedm@nvidia.com, tariqt@nvidia.com, mbloch@nvidia.com,
leon@kernel.org, michael.chan@broadcom.com,
pavan.chebbi@broadcom.com, corbet@lwn.net, shuah@kernel.org,
bpf@vger.kernel.org, netdev@vger.kernel.org, stuclar@meta.com,
sdf@fomichev.me, horms@kernel.org, martin.lau@linux.dev,
almasrymina@google.com, song@kernel.org, yonghong.song@linux.dev,
jolsa@kernel.org, emil@etsalapatis.com, ihor.solodrai@linux.dev,
rdunlap@infradead.org, kernel-team@meta.com,
dimitri.daskalakis1@gmail.com, bobbyeshleman@meta.com,
mohsin.bashr@gmail.com, kees@kernel.org, leitao@debian.org,
maxime.chevallier@bootlin.com, cuitao@kylinos.cn,
vadim.fedorenko@linux.dev, mike.marciniszyn@gmail.com,
kuniyu@google.com, jiayuan.chen@linux.dev, mkarsten@uwaterloo.ca,
razor@blackwall.org, dw@davidwei.uk, asml.silence@gmail.com,
linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 13/15] eth: bnxt: Receive into XDP-only memory providers
Date: Wed, 25 Nov 2026 14:08:32 +0000 [thread overview]
Message-ID: <179561571294.3135.1261628874481958794@kernel.org> (raw)
In-Reply-To: <20261124125654.183091-13-bjorn@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] eth: bnxt: permanent RX queue stall when XDP-only FILL ring is
empty at setup
--
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -3969,7 +3951,8 @@ static int bnxt_alloc_rx_page_pool(struct bnxt *bp,
> pp.dma_dir = bp->rx_dir;
> pp.max_len = PAGE_SIZE << pp.order;
> pp.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV |
> - PP_FLAG_ALLOW_UNREADABLE_NETMEM;
> + PP_FLAG_ALLOW_UNREADABLE_NETMEM |
> + PP_FLAG_ALLOW_XDP_ONLY_NETMEM;
> pp.queue_idx = rxr->bnapi->index;
>
> pool = page_pool_create(&pp);
[Severity: Medium]
With PP_FLAG_ALLOW_XDP_ONLY_NETMEM, rxr->page_pool can now be backed
by the AF_XDP sink, and the sink takes its buffers from the userspace
FILL ring. What happens if that ring is empty when bnxt fills the RX
ring?
bnxt_alloc_one_rx_ring_skb() breaks out of its loop on the first
bnxt_alloc_rx_data() failure. With an empty FILL ring, rx_prod is
left at 0, and rx_agg_prod is left at 0 by
bnxt_alloc_one_rx_ring_netmem(). bnxt_queue_mem_alloc() still returns
success, and bnxt_queue_start() rings the doorbell with nothing
posted.
As far as I can tell, bnxt only refills RX buffers from bnxt_rx_pkt()
while it handles a completion. With no descriptors posted, the NIC
never produces a completion. When userspace later fills the ring and
xsk_sink_wakeup() schedules NAPI, __bnxt_poll_work() finds no work
and returns without allocating, so the queue stays wedged.
This is the normal AF_XDP order: bind first, then populate FILL.
xsk_sink_bind() expects it by setting need_wakeup, and
testapp_stats_fill_empty() in this series exercises it. It can also
happen on netdev_rx_queue_reconfig(). There, new_mem is allocated
before the old queue's buffers go back to the sink, so FILL can be
dry at that point even if userspace keeps it topped up.
Does bnxt need a refill pass at the end of NAPI poll when the RX ring
is short, like mlx5 and fbnic have? Or did you have another way in
mind to prime the ring for an XDP-only provider?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261124112707.118678-1-bjorn%40kernel.org
next prev parent reply other threads:[~2026-11-25 14:08 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 11:26 [PATCH net-next 00/15] xsk: Receive in the device's buffer layout Björn Töpel
2026-11-24 12:56 ` [PATCH net-next 01/15] xdp: Let memory providers offer XDP a view of their net_iovs Björn Töpel
2026-11-25 14:07 ` netdev-bot+sashiko
2026-11-24 12:56 ` [PATCH net-next 02/15] xdp: Keep the shared info of a buffer in kernel memory Björn Töpel
2026-11-25 14:07 ` netdev-bot+sashiko
2026-11-24 12:56 ` [PATCH net-next 03/15] net: Add memory providers that only feed XDP Björn Töpel
2026-11-25 14:08 ` netdev-bot+sashiko
2026-11-24 12:56 ` [PATCH net-next 04/15] page_pool: Let memory providers take back net_iovs Björn Töpel
2026-11-25 14:08 ` netdev-bot+sashiko
2026-11-24 12:56 ` [PATCH net-next 05/15] xdp: Run programs on buffers that must not hold kernel structures Björn Töpel
2026-11-25 14:08 ` netdev-bot+sashiko
2026-11-24 12:56 ` [PATCH net-next 06/15] xsk: Lend UMEM chunks to the page pools of a queue Björn Töpel
2026-11-24 14:34 ` Magnus Karlsson
2026-11-24 15:12 ` Björn Töpel
2026-11-25 14:08 ` netdev-bot+sashiko
2026-11-24 12:56 ` [PATCH net-next 07/15] xsk: Deliver to the socket in the device's buffer layout Björn Töpel
2026-11-25 14:08 ` netdev-bot+sashiko
2026-11-24 12:56 ` [PATCH net-next 08/15] xsk: Receive " Björn Töpel
2026-11-25 14:08 ` netdev-bot+sashiko
2026-11-24 12:56 ` [PATCH net-next 09/15] eth: fbnic: Support XDP redirect Björn Töpel
2026-11-24 12:56 ` [PATCH net-next 10/15] eth: fbnic: Receive into XDP-only memory providers Björn Töpel
2026-11-24 12:56 ` [PATCH net-next 11/15] net: Add netif_rxq_has_xdp_only_mp() Björn Töpel
2026-11-24 12:56 ` [PATCH net-next 12/15] eth: mlx5e: Receive into XDP-only memory providers Björn Töpel
2026-11-25 14:08 ` netdev-bot+sashiko
2026-11-24 12:56 ` [PATCH net-next 13/15] eth: bnxt: " Björn Töpel
2026-11-25 14:08 ` netdev-bot+sashiko [this message]
2026-11-24 12:56 ` [PATCH net-next 14/15] selftests: net: xsk: Test the device's RX buffer layout Björn Töpel
2026-11-25 14:08 ` netdev-bot+sashiko
2026-11-24 12:56 ` [PATCH net-next 15/15] Documentation: networking: Describe AF_XDP RX in the device's layout Björn Töpel
2026-11-25 14:08 ` netdev-bot+sashiko
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=179561571294.3135.1261628874481958794@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=alexanderduyck@fb.com \
--cc=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrii@kernel.org \
--cc=asml.silence@gmail.com \
--cc=ast@kernel.org \
--cc=bjorn@kernel.org \
--cc=bobbyeshleman@meta.com \
--cc=bpf@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=cuitao@kylinos.cn \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dimitri.daskalakis1@gmail.com \
--cc=dw@davidwei.uk \
--cc=eddyz87@gmail.com \
--cc=edumazet@kernel.org \
--cc=emil@etsalapatis.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=ihor.solodrai@linux.dev \
--cc=ilias.apalodimas@linaro.org \
--cc=jiayuan.chen@linux.dev \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kees@kernel.org \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=leitao@debian.org \
--cc=leon@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=martin.lau@linux.dev \
--cc=maxime.chevallier@bootlin.com \
--cc=mbloch@nvidia.com \
--cc=memxor@gmail.com \
--cc=michael.chan@broadcom.com \
--cc=mike.marciniszyn@gmail.com \
--cc=mkarsten@uwaterloo.ca \
--cc=mohsin.bashr@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=razor@blackwall.org \
--cc=rdunlap@infradead.org \
--cc=saeedm@nvidia.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=stuclar@meta.com \
--cc=tariqt@nvidia.com \
--cc=vadim.fedorenko@linux.dev \
--cc=yonghong.song@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox