lkml.org 
[lkml]   [2021]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH net-next v6 3/5] page_pool: Allow drivers to hint on SKB recycling
On Sat, Jun 5, 2021 at 6:06 PM David Ahern <dsahern@gmail.com> wrote:
>
> On 6/4/21 2:42 AM, Ilias Apalodimas wrote:
> > [...]
> >>> + /* Driver set this to memory recycling info. Reset it on recycle.
> >>> + * This will *not* work for NIC using a split-page memory model.
> >>> + * The page will be returned to the pool here regardless of the
> >>> + * 'flipped' fragment being in use or not.
> >>> + */
> >>
> >> I am not sure I understand how does the last part of comment related
> >> to the code below, as there is no driver using split-page memory model
> >> will reach here because those driver will not call skb_mark_for_recycle(),
> >> right?
> >>
> >
> > Yes the comment is there to prohibit people (mlx5 only actually) to add the
> > recycling bit on their driver. Because if they do it will *probably* work
> > but they might get random corrupted packets which will be hard to debug.
> >
>
> What's the complexity for getting it to work with split page model?
> Since 1500 is the default MTU, requiring a page per packet means a lot
> of wasted memory.

We could create a new memory model, e.g. MEM_TYPE_PAGE_SPLIT, and
restore the behavior present in the previous versions of this serie,
which is, save xdp_mem_info in struct page.
As this could slightly impact the performances, this can be added in a
future change when the drivers which are doing it want to use this
recycling api.

--
per aspera ad upstream

\
 
 \ /
  Last update: 2021-06-05 18:36    [W:0.061 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site