netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 net-next 0/3] add DMA-sync-for-device capability to page_pool API
@ 2019-11-15 19:01 Lorenzo Bianconi
  2019-11-15 19:01 ` [PATCH v3 net-next 1/3] net: mvneta: rely on page_pool_recycle_direct in mvneta_run_xdp Lorenzo Bianconi
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Lorenzo Bianconi @ 2019-11-15 19:01 UTC (permalink / raw)
  To: netdev; +Cc: davem, ilias.apalodimas, brouer, lorenzo.bianconi, mcroce

Introduce the possibility to sync DMA memory for device in the page_pool API.
This feature allows to sync proper DMA size and not always full buffer
(dma_sync_single_for_device can be very costly).
Please note DMA-sync-for-CPU is still device driver responsibility.
Relying on page_pool DMA sync mvneta driver improves XDP_DROP pps of
about 180Kpps:

- XDP_DROP DMA sync managed by mvneta driver:	~420Kpps
- XDP_DROP DMA sync managed by page_pool API:	~595Kpps

Changes since v2:
- rely on PP_FLAG_DMA_SYNC_DEV flag instead of dma_sync

Changes since v1:
- rename sync in dma_sync
- set dma_sync_size to 0xFFFFFFFF in page_pool_recycle_direct and
  page_pool_put_page routines
- Improve documentation

Lorenzo Bianconi (3):
  net: mvneta: rely on page_pool_recycle_direct in mvneta_run_xdp
  net: page_pool: add the possibility to sync DMA memory for device
  net: mvneta: get rid of huge dma sync in mvneta_rx_refill

 drivers/net/ethernet/marvell/mvneta.c | 24 +++++++++------
 include/net/page_pool.h               | 21 ++++++++++----
 net/core/page_pool.c                  | 42 +++++++++++++++++++++++----
 3 files changed, 66 insertions(+), 21 deletions(-)

-- 
2.21.0


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

end of thread, other threads:[~2019-11-16 14:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 19:01 [PATCH v3 net-next 0/3] add DMA-sync-for-device capability to page_pool API Lorenzo Bianconi
2019-11-15 19:01 ` [PATCH v3 net-next 1/3] net: mvneta: rely on page_pool_recycle_direct in mvneta_run_xdp Lorenzo Bianconi
2019-11-15 19:01 ` [PATCH v3 net-next 2/3] net: page_pool: add the possibility to sync DMA memory for device Lorenzo Bianconi
2019-11-15 19:35   ` Jonathan Lemon
2019-11-16 11:20   ` Jesper Dangaard Brouer
2019-11-16 11:36     ` Lorenzo Bianconi
2019-11-16 12:17       ` Jesper Dangaard Brouer
2019-11-16 14:17         ` Lorenzo Bianconi
2019-11-15 19:01 ` [PATCH v3 net-next 3/3] net: mvneta: get rid of huge dma sync in mvneta_rx_refill Lorenzo Bianconi

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