linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/5] page_pool: recycle buffers
@ 2021-04-02 18:17 Matteo Croce
  2021-04-02 18:17 ` [PATCH net-next v2 1/5] xdp: reduce size of struct xdp_mem_info Matteo Croce
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Matteo Croce @ 2021-04-02 18:17 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, Jonathan Lemon, David S. Miller, Ilias Apalodimas,
	Jesper Dangaard Brouer, Lorenzo Bianconi, Saeed Mahameed,
	David Ahern, Saeed Mahameed, Andrew Lunn

From: Matteo Croce <mcroce@microsoft.com>

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.

[1] https://lore.kernel.org/netdev/154413868810.21735.572808840657728172.stgit@firesoul/

v1 -> v2:
- fix a commit message
- avoid setting pp_recycle multiple times on mvneta
- squash two patches to avoid breaking bisect

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

Jesper Dangaard Brouer (1):
  xdp: reduce size of struct xdp_mem_info

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

 .../chelsio/inline_crypto/ch_ktls/chcr_ktls.c |  2 +-
 drivers/net/ethernet/marvell/mvneta.c         |  7 ++-
 .../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                        | 35 ++++++++++++--
 include/net/page_pool.h                       | 15 ++++++
 include/net/xdp.h                             |  5 +-
 net/core/page_pool.c                          | 47 +++++++++++++++++++
 net/core/skbuff.c                             | 20 +++++++-
 net/core/xdp.c                                | 14 ++++--
 net/tls/tls_device.c                          |  2 +-
 13 files changed, 142 insertions(+), 27 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-04-09 20:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02 18:17 [PATCH net-next v2 0/5] page_pool: recycle buffers Matteo Croce
2021-04-02 18:17 ` [PATCH net-next v2 1/5] xdp: reduce size of struct xdp_mem_info Matteo Croce
2021-04-02 18:17 ` [PATCH net-next v2 2/5] mm: add a signature in struct page Matteo Croce
2021-04-02 18:17 ` [PATCH net-next v2 3/5] page_pool: Allow drivers to hint on SKB recycling Matteo Croce
2021-04-09 18:56   ` Jakub Kicinski
2021-04-09 19:01     ` Ilias Apalodimas
2021-04-09 19:29       ` Jakub Kicinski
2021-04-09 20:34         ` Ilias Apalodimas
2021-04-09 20:40       ` Jesper Dangaard Brouer
2021-04-02 18:17 ` [PATCH net-next v2 4/5] mvpp2: recycle buffers Matteo Croce
2021-04-02 18:17 ` [PATCH net-next v2 5/5] mvneta: " Matteo Croce

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).