netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH RFC 0/8] page_pool DMA handling and allow to recycles frames via SKB
@ 2018-12-06 23:25 Jesper Dangaard Brouer
  2018-12-06 23:25 ` [net-next PATCH RFC 1/8] page_pool: add helper functions for DMA Jesper Dangaard Brouer
                   ` (7 more replies)
  0 siblings, 8 replies; 30+ messages in thread
From: Jesper Dangaard Brouer @ 2018-12-06 23:25 UTC (permalink / raw)
  To: netdev, David S. Miller, Jesper Dangaard Brouer
  Cc: Toke Høiland-Jørgensen, ard.biesheuvel, Jason Wang,
	ilias.apalodimas, BjörnTöpel, w, Saeed Mahameed,
	mykyta.iziumtsev, Daniel Borkmann, Alexei Starovoitov,
	Tariq Toukan

This RFC 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, which also
involves extending sk_buff with the necessary information.

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.  The recycles code leverage the XDP recycle APIs.

The Marvell mvneta driver was used in this patchset to demonstrate how
to use the API, and tested on the EspressoBIN board.  We also have
patches enabling XDP for this driver, but they are not part of this
patchset as we want review of the general idea of the page_pool return
SKB hook.

A driver using page_pool and XDP redirecting into CPUMAP or veth, will
also take advantage of the new SKB return hook, this is currently only mlx5.


The longer term plans involves allowing other types of allocators to
use this return hook.  Particularly allowing zero-copy AF_XDP frames
to travel further into the netstack, if userspace page have been
restricted to read-only.

---

Ilias Apalodimas (4):
      page_pool: add helper functions for DMA
      net: mvneta: use page pool API for sw buffer manager
      net: core: add recycle capabilities on skbs via page_pool API
      net: mvneta: remove copybreak, prefetch and use build_skb

Jesper Dangaard Brouer (4):
      xdp: reduce size of struct xdp_mem_info
      mvneta: activate page recycling via skb using page_pool
      xdp: bpf: cpumap redirect must update skb->mem_info
      veth: xdp_frames redirected into veth need to transfer xdp_mem_info


 drivers/net/ethernet/marvell/Kconfig  |    1 
 drivers/net/ethernet/marvell/mvneta.c |  158 +++++++++++++++++----------------
 drivers/net/veth.c                    |    1 
 include/linux/skbuff.h                |    6 +
 include/net/page_pool.h               |    6 +
 include/net/xdp.h                     |    5 +
 kernel/bpf/cpumap.c                   |    2 
 net/core/page_pool.c                  |    7 +
 net/core/skbuff.c                     |    7 +
 net/core/xdp.c                        |   14 ++-
 10 files changed, 125 insertions(+), 82 deletions(-)

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

end of thread, other threads:[~2018-12-10  9:52 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-06 23:25 [net-next PATCH RFC 0/8] page_pool DMA handling and allow to recycles frames via SKB Jesper Dangaard Brouer
2018-12-06 23:25 ` [net-next PATCH RFC 1/8] page_pool: add helper functions for DMA Jesper Dangaard Brouer
2018-12-08  7:06   ` David Miller
2018-12-08  7:55     ` Ilias Apalodimas
2018-12-06 23:25 ` [net-next PATCH RFC 2/8] net: mvneta: use page pool API for sw buffer manager Jesper Dangaard Brouer
2018-12-06 23:25 ` [net-next PATCH RFC 3/8] xdp: reduce size of struct xdp_mem_info Jesper Dangaard Brouer
2018-12-06 23:25 ` [net-next PATCH RFC 4/8] net: core: add recycle capabilities on skbs via page_pool API Jesper Dangaard Brouer
2018-12-08  7:15   ` David Miller
2018-12-08  7:54     ` Ilias Apalodimas
2018-12-08  9:57   ` [net-next, RFC, " Florian Westphal
2018-12-08 11:36     ` Jesper Dangaard Brouer
2018-12-08 20:10       ` David Miller
2018-12-08 12:29     ` Eric Dumazet
2018-12-08 12:34       ` Eric Dumazet
2018-12-08 13:45       ` Jesper Dangaard Brouer
2018-12-08 14:57       ` Ilias Apalodimas
2018-12-08 17:07         ` Andrew Lunn
2018-12-08 19:26         ` Eric Dumazet
2018-12-08 20:11           ` Jesper Dangaard Brouer
2018-12-08 20:14             ` Ilias Apalodimas
2018-12-08 21:06               ` Willy Tarreau
2018-12-10  7:54                 ` Ilias Apalodimas
2018-12-08 22:36               ` Eric Dumazet
2018-12-08 20:21         ` David Miller
2018-12-08 20:29           ` Ilias Apalodimas
2018-12-10  9:51           ` Saeed Mahameed
2018-12-06 23:25 ` [net-next PATCH RFC 5/8] net: mvneta: remove copybreak, prefetch and use build_skb Jesper Dangaard Brouer
2018-12-06 23:25 ` [net-next PATCH RFC 6/8] mvneta: activate page recycling via skb using page_pool Jesper Dangaard Brouer
2018-12-06 23:26 ` [net-next PATCH RFC 7/8] xdp: bpf: cpumap redirect must update skb->mem_info Jesper Dangaard Brouer
2018-12-06 23:26 ` [net-next PATCH RFC 8/8] veth: xdp_frames redirected into veth need to transfer xdp_mem_info Jesper Dangaard Brouer

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).