Re: [PATCH net-next 13/15] eth: bnxt: Receive into XDP-only memory providers

From: netdev-bot+sashiko

Date: Wed Nov 25 2026 - 09:10:12 EST


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