Thread (9 messages) 9 messages, 4 authors, 7d ago

Re: [PATCH net-next v1 1/2] net: netmem: document netmem and memory provider design in comments

flat view

From: Jesper Dangaard Brouer <hawk@kernel.org>
Date: 2026-10-07 07:43:56
Also in: bpf, linux-doc, lkml


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 <redacted>
Cc: Björn Töpel <bjorn@kernel.org>
Cc: Stanislav Fomichev <sdf@fomichev.me>
Cc: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Mina Almasry <redacted>
---
  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.
And do we want a new section for NETMEM ?

Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help