Thread (20 messages) 20 messages, 6 authors, 2021-05-13

[PATCH net-next v4 0/4] page_pool: recycle buffers

flat view
STALE2000d SUPERSEDED

From: Matteo Croce <hidden>
Date: 2021-05-11 13:31:49
Also in: bpf, linux-mm, linux-rdma, lkml
Subsystem: marvell gigabit ethernet drivers (skge/sky2), marvell mvneta ethernet driver, marvell mvpp2 ethernet driver, mellanox ethernet driver (mlx4_en), mellanox mlx4 core vpi driver, memory management - core, networking drivers, networking [general], networking [tls], page pool, the rest · Maintainers: Marcin Wojtas, Russell King, Tariq Toukan, Andrew Morton, David Hildenbrand, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, John Fastabend, Sabrina Dubroca, Jesper Dangaard Brouer, Ilias Apalodimas, Linus Torvalds

Status: Superseded by v8 (posted 2021-06-07). [go to v8]

Revision v4 (9 revisions archived).

Revisions (9)
From: Matteo Croce <redacted>

This is a respin of [1]

This patchset shows the plans for allowing page_pool to handle and
maintain DMA map/unmap of the pages it serves to the driver. For this
to work a return hook in the network core is introduced.

The overall purpose is to simplify drivers, by providing a page
allocation API that does recycling, such that each driver doesn't have
to reinvent its own recycling scheme. Using page_pool in a driver
does not require implementing XDP support, but it makes it trivially
easy to do so. Instead of allocating buffers specifically for SKBs
we now allocate a generic buffer and either wrap it on an SKB
(via build_skb) or create an XDP frame.
The recycling code leverages the XDP recycle APIs.

The Marvell mvpp2 and mvneta drivers are used in this patchset to
demonstrate how to use the API, and tested on a MacchiatoBIN
and EspressoBIN boards respectively.

Please let this going in on a future -rc1 so to allow enough time
to have wider tests.

Note that this series depends on the change "mm: fix struct page layout
on 32-bit systems"[2] which is not yet in master.

[1] https://lore.kernel.org/netdev/154413868810.21735.572808840657728172.stgit@firesoul/ (local)
[2] https://lore.kernel.org/linux-mm/20210510153211.1504886-1-willy@infradead.org/ (local)

Ilias Apalodimas (1):
  page_pool: Allow drivers to hint on SKB recycling

Matteo Croce (3):
  mm: add a signature in struct page
  mvpp2: recycle buffers
  mvneta: recycle buffers

 drivers/net/ethernet/marvell/mvneta.c         | 11 +++---
 .../net/ethernet/marvell/mvpp2/mvpp2_main.c   | 17 +++++-----
 drivers/net/ethernet/marvell/sky2.c           |  2 +-
 drivers/net/ethernet/mellanox/mlx4/en_rx.c    |  2 +-
 include/linux/mm_types.h                      |  1 +
 include/linux/skbuff.h                        | 34 ++++++++++++++++---
 include/net/page_pool.h                       | 11 ++++++
 net/core/page_pool.c                          | 27 +++++++++++++++
 net/core/skbuff.c                             | 20 +++++++++--
 net/tls/tls_device.c                          |  2 +-
 10 files changed, 105 insertions(+), 22 deletions(-)

-- 
2.31.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help