[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d89ddd81-c2dc-481c-8cd6-d83ed06c2605@iogearbox.net>
Date: Mon, 22 Sep 2025 19:01:45 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Stanislav Fomichev <stfomichev@...il.com>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, kuba@...nel.org,
davem@...emloft.net, razor@...ckwall.org, pabeni@...hat.com,
willemb@...gle.com, sdf@...ichev.me, john.fastabend@...il.com,
martin.lau@...nel.org, jordan@...fe.io, maciej.fijalkowski@...el.com,
magnus.karlsson@...el.com, David Wei <dw@...idwei.uk>
Subject: Re: [PATCH net-next 13/20] xsk: Proxy pool management for mapped
queues
On 9/22/25 6:48 PM, Stanislav Fomichev wrote:
> On 09/19, Daniel Borkmann wrote:
[...]
>> @@ -143,6 +146,10 @@ int xsk_reg_pool_at_qid(struct net_device *dev, struct xsk_buff_pool *pool,
>> return -EINVAL;
>> if (xsk_get_pool_from_qid(dev, queue_id))
>> return -EBUSY;
>> + if (queue_id < dev->real_num_rx_queues)
>> + __netif_get_rx_queue_peer(&dev, &queue_id);
>> + if (xsk_get_pool_from_qid(dev, queue_id))
>> + return -EBUSY;
>>
>> pool->netdev = dev;
>> pool->queue_id = queue_id;
>
> I feel like both of the above are also gonna be problematic wrt netdev
> lock. The callers lock the netdev, the callers will also have
> to resolve the virtual->real queue mapping. Hacking up the
> queue/netdev deep in the call stack in a few places is not gonna work.
>
> Maybe also add assert for the (new) netdev lock to __netif_get_rx_queue_peer
> to trigger these.
Good idea, and I'll look into this, thx!
Powered by blists - more mailing lists