lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKhg4tKtsDgaNkmcH8RXVTVq_c2-SOxZTsTDTw_KH5FZ+sZuBQ@mail.gmail.com>
Date: Mon, 27 Nov 2023 12:23:55 +0800
From: Liang Chen <liangchen.linux@...il.com>
To: Yunsheng Lin <linyunsheng@...wei.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, 
	pabeni@...hat.com, hawk@...nel.org, ilias.apalodimas@...aro.org, 
	netdev@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH net-next v3 3/3] skbuff: Optimization of SKB coalescing
 for page pool

On Sat, Nov 25, 2023 at 8:16 PM Yunsheng Lin <linyunsheng@...wei.com> wrote:
>
> On 2023/11/24 15:34, Liang Chen wrote:
>
> ...
>
> > --- a/include/net/page_pool/helpers.h
> > +++ b/include/net/page_pool/helpers.h
> > @@ -402,4 +402,26 @@ static inline void page_pool_nid_changed(struct page_pool *pool, int new_nid)
> >               page_pool_update_nid(pool, new_nid);
> >  }
> >
> > +static inline bool page_pool_is_pp_page(struct page *page)
> > +{
>
> We have a page->pp_magic checking in napi_pp_put_page() in skbuff.c already,
> it seems better to move it to skbuff.c or skbuff.h and use it for
> napi_pp_put_page() too, as we seem to have chosen to demux the page_pool
> owned page and non-page_pool owned page handling in the skbuff core.
>
> If we move it to skbuff.c or skbuff.h, we might need a better prefix than
> page_pool_* too.
>

How about keeping the 'page_pool_is_pp_page' function in 'helper.h'
and letting 'skbbuff.c' use it? It seems like the function's logic is
better suited to be internal to the page pool, and it might be needed
outside of 'skbuff.c' in the future.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ