Re: [PATCH net-next v1 05/11] xsk: Install UMEM page pool providers in the core
From: Björn Töpel
Date: Sun Nov 15 2026 - 13:58:25 EST
Mina Almasry <almasrymina@xxxxxxxxxx> writes:
> On Tue, Nov 10, 2026 at 2:21 AM Björn Töpel <bjorn@xxxxxxxxxx> wrote:
>> diff --git a/net/xdp/xsk_pp.c b/net/xdp/xsk_pp.c
>> index fdd55265a6cd..c2214e718cdb 100644
>> --- a/net/xdp/xsk_pp.c
>> +++ b/net/xdp/xsk_pp.c
[...]
>> +/* Called with RTNL and the instance lock of the device */
>> +void xsk_pp_unbind(struct xsk_buff_pool *pool)
>> +{
>> + struct xsk_pp *pp = pool->pp;
>> + struct pp_memory_provider_params mp = {
>> + .mp_ops = &xsk_pp_ops,
>> + .mp_priv = pp,
>> + };
>> +
>> + /* Unregister removed the provider already */
>> + if (!pp->rxq)
>> + return;
>> +
>> + netif_mp_close_rxq(pool->netdev, pool->queue_id, &mp);
>> + xsk_pp_detach(pp);
>
> Need to handle netif_mp_close_rxq() failing here maybe?
Ya, Sashiko found that too... a failed restart leaves the old queue
running on the provider, and this unmaps the UMEM under it. I have a net
fix that keeps the provider on such a queue and retries the removal; it
covers io_uring zcrx too, which drops the error the same way. The fix
then releases the UMEM only once the queue DMA has stopped.
Björn