lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <01509510-1248-468b-ad6c-50ab61d4a916@davidwei.uk>
Date: Mon, 2 Feb 2026 07:23:14 +0900
From: David Wei <dw@...idwei.uk>
To: Jakub Kicinski <kuba@...nel.org>, Daniel Borkmann <daniel@...earbox.net>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.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, toke@...hat.com,
 yangzhenze@...edance.com, wangdongdong.6@...edance.com
Subject: Re: [PATCH net-next v8 07/16] net: Proxy netdev_queue_get_dma_dev for
 leased queues

On 2026-02-01 09:04, Jakub Kicinski wrote:
> On Thu, 29 Jan 2026 23:28:21 +0100 Daniel Borkmann wrote:
>> - * Get dma device for zero-copy operations to be used for this queue.
>> + * Get dma device for zero-copy operations to be used for this queue. If the
>> + * queue is leased to a physical queue, we retrieve the latter's dma device.
>>    * When such device is not available or valid, the function will return NULL.
>>    *
>>    * Return: Device or NULL on error
>>    */
>>   struct device *netdev_queue_get_dma_dev(struct net_device *dev, int idx)
>>   {
>> -	const struct netdev_queue_mgmt_ops *queue_ops = dev->queue_mgmt_ops;
>> +	const struct netdev_queue_mgmt_ops *queue_ops;
>>   	struct device *dma_dev;
>>   
>> +	if (idx < dev->real_num_rx_queues) {
>> +		struct netdev_rx_queue *rxq = __netif_get_rx_queue(dev, idx);
>> +
>> +		if (rxq->lease) {
>> +			rxq = rxq->lease;
>> +			dev = rxq->dev;
>> +			idx = get_netdev_rx_queue_index(rxq);
>> +		}
>> +	}
>> +
>> +	queue_ops = dev->queue_mgmt_ops;
> 
> We're gonna call physical device's op without locking it no?

Yeah, sorry about that. I'll change this to be similar to the new
mp_open.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ