[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <839d5486-a92a-4ae8-a536-b4a0e3d595ea@gmail.com>
Date: Tue, 15 Jul 2025 11:23:47 +0100
From: Pavel Begunkov <asml.silence@...il.com>
To: Jakub Kicinski <kuba@...nel.org>, Harry Yoo <harry.yoo@...cle.com>
Cc: Vlastimil Babka <vbabka@...e.cz>, Byungchul Park <byungchul@...com>,
willy@...radead.org, netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, kernel_team@...ynix.com, almasrymina@...gle.com,
ilias.apalodimas@...aro.org, hawk@...nel.org, akpm@...ux-foundation.org,
davem@...emloft.net, john.fastabend@...il.com, andrew+netdev@...n.ch,
toke@...hat.com, tariqt@...dia.com, edumazet@...gle.com, pabeni@...hat.com,
saeedm@...dia.com, leon@...nel.org, ast@...nel.org, daniel@...earbox.net,
david@...hat.com, lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com,
rppt@...nel.org, surenb@...gle.com, mhocko@...e.com, horms@...nel.org,
linux-rdma@...r.kernel.org, bpf@...r.kernel.org, vishal.moola@...il.com,
hannes@...xchg.org, ziy@...dia.com, jackmanb@...gle.com
Subject: Re: [PATCH net-next v7 1/7] netmem: introduce struct netmem_desc
mirroring struct page
On 7/15/25 02:47, Jakub Kicinski wrote:
> On Mon, 14 Jul 2025 22:58:31 +0900 Harry Yoo wrote:
>>>> Could you please share your thoughts on why it's hard to judge them and
>>>> what's missing from the series, such as in the comments, changelog, or
>>>> the cover letter?
>
> My main concern (as shared on earlier revisions) is the type hierarchy
Quick overview. struct netmem_desc is a common denominator b/w pp pages
and net_iov, and contains fields used by the pp generic path, e.g.
refcount, dma_addr. Before, pp was using type casting hacks to keep
code generic with some overhead on bit masking, now it'll be able to
look up netmem_desc from a netmem and use it directly.
That's pretty much what I was suggesting niov / page aliasing to be
1+ years ago, but unfortunately that didn't happen. It definitely
removes some type casting hackiness.
> exposed to the drivers.
v10 adds a bunch of "pp_page_to_nmdesc(page)->pp" in the drivers,
Not sure I have a strong opinion, but it can be turned into a helper.
Converting things back and forth or blindly
> downcasting to netmem and upcasting back to the CPU-readable type is
> no good.
--
Pavel Begunkov
Powered by blists - more mailing lists