Thread (33 messages) 33 messages, 6 authors, 2024-01-05

Re: [RFC PATCH net-next v1 4/4] net: page_pool: use netmem_t instead of struct page in API

flat view

From: Shakeel Butt <hidden>
Date: 2023-12-15 16:47:59
Also in: bpf, lkml

On Fri, Dec 15, 2023 at 3:04 AM Yunsheng Lin [off-list ref] wrote:
On 2023/12/15 10:11, Shakeel Butt wrote:
quoted
On Thu, Dec 14, 2023 at 08:27:55AM -0800, Mina Almasry wrote:
quoted
On Thu, Dec 14, 2023 at 4:05 AM Yunsheng Lin [off-list ref] wrote:
quoted
[...]
quoted
quoted
I perfer the second one personally, as devmem means that it is not
readable from cpu.
From my POV it has to be the first one. We want to abstract the memory
type from the drivers as much as possible, not introduce N new memory
types and ask the driver to implement new code for each of them
separately.
That was my initial thinking too:
https://www.spinics.net/lists/netdev/msg949376.html

But after discussion, it may make more sense to have two sets of API from the
driver's piont of view if we want a complete safe type protection, so that
compiler can check everything statically and devmem driver API have a clear
semantic:
1. devmem is not allowed to be called into mm subsystem.
2. it will not provide a API like page_address().
I think all of us are on the same page that there will be two sets of
APIs here but Mina's point was let's aim to not make that N set of
APIs.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help