mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Matthew Wilcox <willy@infradead.org>, Byungchul Park <byungchul@sk.com>
Cc: netdev@vger.kernel.org, kuba@kernel.org,
	linux-kernel@vger.kernel.org, kernel_team@skhynix.com,
	harry.yoo@oracle.com, david@redhat.com, toke@redhat.com,
	almasrymina@google.com, anthony.l.nguyen@intel.com,
	przemyslaw.kitszel@intel.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	intel-wired-lan@lists.osuosl.org
Subject: Re: [PATCH net-next] ice: access @pp through netmem_desc instead of page
Date: Wed, 17 Dec 2025 13:11:28 +0000	[thread overview]
Message-ID: <37b642bd-9f26-477e-9fca-1e3c931c0efb@gmail.com> (raw)
In-Reply-To: <aUDd9lLy76sBejrP@casper.infradead.org>

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


  reply	other threads:[~2025-12-17 13:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-16  4:07 Byungchul Park
2025-12-16  4:20 ` Matthew Wilcox
2025-12-17 13:11   ` Pavel Begunkov [this message]
2026-01-08 15:59     ` [Intel-wired-lan] " Alexander Lobakin
2025-12-17 11:46 ` Loktionov, Aleksandr
2025-12-17 13:15   ` Pavel Begunkov
2025-12-17 14:34     ` Loktionov, Aleksandr
2025-12-18  0:40       ` Byungchul Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=37b642bd-9f26-477e-9fca-1e3c931c0efb@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=almasrymina@google.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=byungchul@sk.com \
    --cc=davem@davemloft.net \
    --cc=david@redhat.com \
    --cc=edumazet@google.com \
    --cc=harry.yoo@oracle.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kernel_team@skhynix.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=toke@redhat.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®