netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 net-next 0/7] add XDP support to mvneta driver
@ 2019-10-16 21:03 Lorenzo Bianconi
  2019-10-16 21:03 ` [PATCH v4 net-next 1/7] net: mvneta: introduce mvneta_update_stats routine Lorenzo Bianconi
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Lorenzo Bianconi @ 2019-10-16 21:03 UTC (permalink / raw)
  To: netdev
  Cc: lorenzo.bianconi, davem, thomas.petazzoni, brouer,
	ilias.apalodimas, matteo.croce, mw, jakub.kicinski

Add XDP support to mvneta driver for devices that rely on software
buffer management. Supported verdicts are:
- XDP_DROP
- XDP_PASS
- XDP_REDIRECT
- XDP_TX
Moreover set ndo_xdp_xmit net_device_ops function pointer in order
to support redirecting from other device (e.g. virtio-net).
Convert mvneta driver to page_pool API.
This series is based on previous work done by Jesper and Ilias.
We will send follow-up patches to reduce DMA-sync operations.

Changes since v3:
- rename MVNETA_XDP_CONSUMED in MVNETA_XDP_DROPPED
- squash patch 4/8 and patch 3/8
- fix dma sync for XDP_TX verdict
- fix queue_index in xdp_rxq_info_reg
- cosmetics

Changes since v2:
- rely on page_pool_recycle_direct instead of xdp_return_buff for XDP_DROP
- define xdp buffer in mvneta_rx_swbm and avoid default initializations
- use dma_sync_single_for_cpu instead of dma_sync_single_range_for_cpu
- run page_pool_release_page in mvneta_swbm_add_rx_fragment even if
  the buffer contains just ETH_FCS

Changes since v1:
- sync dma buffers before refilling hw queues
- fix stats accounting

Changes since RFC:
- implement XDP_TX
- make tx pending buffer list agnostic
- code refactoring
- check if device is running in mvneta_xdp_setup

Lorenzo Bianconi (7):
  net: mvneta: introduce mvneta_update_stats routine
  net: mvneta: introduce page pool API for sw buffer manager
  net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine
  net: mvneta: add basic XDP support
  net: mvneta: move header prefetch in mvneta_swbm_rx_frame
  net: mvneta: make tx buffer array agnostic
  net: mvneta: add XDP_TX support

 drivers/net/ethernet/marvell/Kconfig  |   1 +
 drivers/net/ethernet/marvell/mvneta.c | 632 +++++++++++++++++++-------
 2 files changed, 473 insertions(+), 160 deletions(-)

-- 
2.21.0


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

end of thread, other threads:[~2019-10-17  9:58 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 21:03 [PATCH v4 net-next 0/7] add XDP support to mvneta driver Lorenzo Bianconi
2019-10-16 21:03 ` [PATCH v4 net-next 1/7] net: mvneta: introduce mvneta_update_stats routine Lorenzo Bianconi
2019-10-17  1:01   ` Jakub Kicinski
2019-10-16 21:03 ` [PATCH v4 net-next 2/7] net: mvneta: introduce page pool API for sw buffer manager Lorenzo Bianconi
2019-10-17  1:14   ` Jakub Kicinski
2019-10-17  9:58     ` Lorenzo Bianconi
2019-10-16 21:03 ` [PATCH v4 net-next 3/7] net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine Lorenzo Bianconi
2019-10-17  1:19   ` Jakub Kicinski
2019-10-16 21:03 ` [PATCH v4 net-next 4/7] net: mvneta: add basic XDP support Lorenzo Bianconi
2019-10-17  1:26   ` Jakub Kicinski
2019-10-17  9:46     ` Lorenzo Bianconi
2019-10-16 21:03 ` [PATCH v4 net-next 5/7] net: mvneta: move header prefetch in mvneta_swbm_rx_frame Lorenzo Bianconi
2019-10-16 21:03 ` [PATCH v4 net-next 6/7] net: mvneta: make tx buffer array agnostic Lorenzo Bianconi
2019-10-16 21:03 ` [PATCH v4 net-next 7/7] net: mvneta: add XDP_TX support Lorenzo Bianconi
2019-10-17  1:28   ` Jakub Kicinski
2019-10-17  9:44     ` 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).