Re: [PATCH net-next v2 09/15] eth: fbnic: Receive into XDP-only memory providers
From: Alexander Duyck
Date: Fri Dec 04 2026 - 17:34:57 EST
On Fri, 4 Dec 2026 17:27:14 +0100, Björn Töpel wrote:
> fbnic still handles RX heads by page address, so an XDP-only provider
> cannot back its RX pool.
[...]
> +static bool fbnic_has_xdp_only_mp(struct net_device *netdev)
> +{
> + unsigned int i;
> +
> + for (i = 0; i < netdev->real_num_rx_queues; i++)
> + if (netif_rxq_has_xdp_only_mp(netdev, i))
> + return true;
> + return false;
> +}
Not a blocker: net/core/dev.c already has this loop as the static
dev_has_xdp_only_mp function. Exporting it next to the
netif_rxq_has_xdp_only_mp function would save drivers a copy.
The rest looks good to me. Heads go back by netmem through pkt->head.
The rings are filled and drained only while the NAPI is disabled, and
the FBNIC_INTR_SET write in the open and restart paths runs the NAPI
once after the queue starts, as PP_FLAG_ALLOW_XDP_ONLY_NETMEM asks.
The fbnic_pkt_tx function still finds the head with virt_to_page, which
is safe only because the core turns XDP_TX of XDP-only buffers into
XDP_DROP.
Reviewed-by: Alexander Duyck <alexanderduyck@xxxxxx>