[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <37b642bd-9f26-477e-9fca-1e3c931c0efb@gmail.com>
Date: Wed, 17 Dec 2025 13:11:28 +0000
From: Pavel Begunkov <asml.silence@...il.com>
To: Matthew Wilcox <willy@...radead.org>, Byungchul Park <byungchul@...com>
Cc: netdev@...r.kernel.org, kuba@...nel.org, linux-kernel@...r.kernel.org,
kernel_team@...ynix.com, harry.yoo@...cle.com, david@...hat.com,
toke@...hat.com, almasrymina@...gle.com, anthony.l.nguyen@...el.com,
przemyslaw.kitszel@...el.com, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, pabeni@...hat.com, intel-wired-lan@...ts.osuosl.org
Subject: Re: [PATCH net-next] ice: access @pp through netmem_desc instead of
page
On 12/16/25 04:20, Matthew Wilcox wrote:
> On Tue, Dec 16, 2025 at 01:07:23PM +0900, Byungchul Park wrote:
>> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
>> @@ -1251,7 +1251,7 @@ static int ice_lbtest_receive_frames(struct ice_rx_ring *rx_ring)
>> rx_buf = &rx_ring->rx_fqes[i];
>> page = __netmem_to_page(rx_buf->netmem);
>> received_buf = page_address(page) + rx_buf->offset +
>> - page->pp->p.offset;
>> + pp_page_to_nmdesc(page)->pp->p.offset;
>
> Shouldn't we rather use:
>
> nmdesc = __netmem_to_nmdesc(rx_buf->netmem);
> received_buf = nmdesc_address(nmdesc) + rx_buf->offset +
> nmdesc->pp->p_offset;
>
> (also. i think we're missing a nmdesc_address() function in our API).
It wouldn't make sense as net_iov backed nmdescs don't have/expose
host addresses (only dma addresses). nmdesc_address() would still
need to rely on the caller knowing that it's a page. An explicit
cast with *netmem_to_page() should be better.
--
Pavel Begunkov
Powered by blists - more mailing lists