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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <28993569-cfa7-40d4-b15a-5251073a0ae4@gmail.com>
Date: Sat, 21 Dec 2024 01:04:58 +0000
From: Pavel Begunkov <asml.silence@...il.com>
To: Jakub Kicinski <kuba@...nel.org>, David Wei <dw@...idwei.uk>
Cc: io-uring@...r.kernel.org, netdev@...r.kernel.org,
 Jens Axboe <axboe@...nel.dk>, Paolo Abeni <pabeni@...hat.com>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jesper Dangaard Brouer <hawk@...nel.org>, David Ahern <dsahern@...nel.org>,
 Mina Almasry <almasrymina@...gle.com>,
 Stanislav Fomichev <stfomichev@...il.com>, Joe Damato <jdamato@...tly.com>,
 Pedro Tammela <pctammela@...atatu.com>
Subject: Re: [PATCH net-next v9 14/20] io_uring/zcrx: dma-map area for the
 device

On 12/20/24 22:38, Jakub Kicinski wrote:
> On Tue, 17 Dec 2024 16:37:40 -0800 David Wei wrote:
>> diff --git a/include/uapi/linux/netdev.h b/include/uapi/linux/netdev.h
>> index e4be227d3ad6..13d810a28ed6 100644
>> --- a/include/uapi/linux/netdev.h
>> +++ b/include/uapi/linux/netdev.h
> 
> The top of this file says:
> 
> /* Do not edit directly, auto-generated from: */
> /*	Documentation/netlink/specs/netdev.yaml */

Ok

>> +static void io_zcrx_refill_slow(struct page_pool *pp, struct io_zcrx_ifq *ifq)
>> +{
>> +	struct io_zcrx_area *area = ifq->area;
>> +
>> +	spin_lock_bh(&area->freelist_lock);
>> +	while (area->free_count && pp->alloc.count < PP_ALLOC_CACHE_REFILL) {
>> +		struct net_iov *niov = __io_zcrx_get_free_niov(area);
>> +		netmem_ref netmem = net_iov_to_netmem(niov);
>> +
>> +		page_pool_set_pp_info(pp, netmem);
>> +		page_pool_mp_return_in_cache(pp, netmem);
>>
>> +		pp->pages_state_hold_cnt++;
> 
> But the kdoc on page_pool_mp_return_in_cache() says:
> 
> + * Return already allocated and accounted netmem to the page pool's allocation
>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Ok, I'll reword it

> 
>> +		trace_page_pool_state_hold(pp, netmem, pp->pages_state_hold_cnt);
>> +	}
>> +	spin_unlock_bh(&area->freelist_lock);
>> +}
> 
>> +	if (page_pool_unref_netmem(netmem, 1) == 0)
> 
> page_pool_unref_and_test()

That would make the series to depend on net-next, which would make
merging with io_uring trickier. I actually used page_pool_is_last_ref()
for a brief moment until it got renamed.

-- 
Pavel Begunkov


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ