Re: [PATCH net-next v1 1/2] net: netmem: document netmem and memory provider design in comments
From: Mina Almasry
Date: Wed Oct 07 2026 - 22:11:08 EST
On Wed, Oct 7, 2026 at 12:43 AM Jesper Dangaard Brouer <hawk@xxxxxxxxxx> wrote:
>
>
>
> On 10/5/26 02:49, Mina Almasry wrote:
> > Clarify the netmem, memory provider, page_pool, and skb fragment design
> > principles in header and code comments:
> >
> > - Memory providers allocate struct net_iov or struct page, cast them to
> > netmem_ref, and pass them to page_pool; page_pool, drivers, and the
> > core stack operate on netmem_ref and must not downcast to page or
> > net_iov outside dedicated netmem helpers.
> > - Memory providers are not restricted to net_iov and may supply
> > page-backed netmems.
> > - net_iov is not inherently unreadable; future readable net_iov types
> > are allowed.
> > - Per-provider logic belongs in memory_provider_ops, and per-netmem-type
> > logic belongs in netmem helpers.
> > - All frags in an skb must share the same backing netmem memory type,
> > and skbs with different frag memory types must not be coalesced.
> >
> > Cc: Luigi Rizzo <lrizzo@xxxxxxxxxx>
> > Cc: Björn Töpel <bjorn@xxxxxxxxxx>
> > Cc: Stanislav Fomichev <sdf@xxxxxxxxxxx>
> > Cc: Pavel Begunkov <asml.silence@xxxxxxxxx>
> > Signed-off-by: Mina Almasry <almasrymina@xxxxxxxxxx>
> > ---
> > include/linux/skbuff.h | 4 ++++
> > include/net/netmem.h | 29 ++++++++++++++++---------
>
> ./scripts/get_maintainer.pl --file include/net/netmem.h
>
> Returns "maintainer:NETWORKING [GENERAL]"
>
> > include/net/page_pool/helpers.h | 18 ++++++++++-----
> > include/net/page_pool/memory_provider.h | 8 +++++++
> > include/net/page_pool/types.h | 6 ++---
> > net/core/skbuff.c | 3 +++
> > 6 files changed, 50 insertions(+), 18 deletions(-)
>
> Changes LGTM.
>
> I suggest that you Mina is added the MAINTAINERS for PAGE POOL.
I'm thrilled to be considered and more than happy to help.
> And do we want a new section for NETMEM ?
>
I'm fine either way.
--
Thanks,
Mina