lkml.org 
[lkml]   [2023]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH net-next v1 4/4] net: page_pool: use netmem_t instead of struct page in API
On Fri, Dec 15, 2023 at 3:04 AM Yunsheng Lin <linyunsheng@huawei.com> wrote:
>
> On 2023/12/15 10:11, Shakeel Butt wrote:
> > On Thu, Dec 14, 2023 at 08:27:55AM -0800, Mina Almasry wrote:
> >> On Thu, Dec 14, 2023 at 4:05 AM Yunsheng Lin <linyunsheng@huawei.com> wrote:
> >>>
> > [...]
> >>> 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.

\
 
 \ /
  Last update: 2023-12-15 17:48    [W:0.110 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site