netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3, net-next, v2] net: netsec: Add XDP Support
@ 2019-06-29  5:23 Ilias Apalodimas
  2019-06-29  5:23 ` [net-next, PATCH 1/3, v2] net: netsec: Use page_pool API Ilias Apalodimas
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Ilias Apalodimas @ 2019-06-29  5:23 UTC (permalink / raw)
  To: netdev, jaswinder.singh
  Cc: ard.biesheuvel, bjorn.topel, magnus.karlsson, brouer, daniel,
	ast, makita.toshiaki, jakub.kicinski, john.fastabend, davem,
	maciejromanfijalkowski, Ilias Apalodimas

This is a respin of https://www.spinics.net/lists/netdev/msg526066.html
Since page_pool API fixes are merged into net-next we can now safely use 
it's DMA mapping capabilities. 

First patch changes the buffer allocation from napi/netdev_alloc_frag()
to page_pool API. Although this will lead to slightly reduced performance 
(on raw packet drops only) we can use the API for XDP buffer recycling. 
Another side effect is a slight increase in memory usage, due to using a 
single page per packet.

The second patch adds XDP support on the driver. 
There's a bunch of interesting options that come up due to the single 
Tx queue.
Locking is needed(to avoid messing up the Tx queues since ndo_xdp_xmit 
and the normal stack can co-exist). We also need to track down the 
'buffer type' for TX and properly free or recycle the packet depending 
on it's nature.


Changes since RFC:
- Bug fixes from Jesper and Maciej
- Added page pool API to retrieve the DMA direction

Changes since v1:
- Use page_pool_free correctly if xdp_rxq_info_reg() failed

Ilias Apalodimas (3):
  net: netsec: Use page_pool API
  net: page_pool: add helper function for retrieving dma direction
  net: netsec: add XDP support

 drivers/net/ethernet/socionext/Kconfig  |   1 +
 drivers/net/ethernet/socionext/netsec.c | 473 ++++++++++++++++++++----
 include/net/page_pool.h                 |   9 +
 3 files changed, 416 insertions(+), 67 deletions(-)

-- 
2.20.1


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

end of thread, other threads:[~2019-07-02  3:18 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-29  5:23 [PATCH 0/3, net-next, v2] net: netsec: Add XDP Support Ilias Apalodimas
2019-06-29  5:23 ` [net-next, PATCH 1/3, v2] net: netsec: Use page_pool API Ilias Apalodimas
2019-06-29  5:23 ` [net-next, PATCH 2/3, v2] net: page_pool: add helper function for retrieving dma direction Ilias Apalodimas
2019-06-29  5:23 ` [net-next, PATCH 3/3, v2] net: netsec: add XDP support Ilias Apalodimas
2019-06-29 10:36   ` Jesper Dangaard Brouer
2019-06-30 16:20   ` Ivan Khoronzhuk
2019-06-30 16:34     ` Ilias Apalodimas
2019-06-30 16:45       ` Ivan Khoronzhuk
2019-06-30 16:50         ` Ilias Apalodimas
2019-06-30 16:25   ` Ivan Khoronzhuk
2019-06-30 16:32     ` Ilias Apalodimas
2019-06-30 16:41       ` Ivan Khoronzhuk
2019-06-30 16:47         ` Ilias Apalodimas
2019-06-30 16:51           ` Ivan Khoronzhuk
2019-06-30 17:09           ` Ivan Khoronzhuk
2019-07-02  2:27 ` [PATCH 0/3, net-next, v2] net: netsec: Add XDP Support David Miller
2019-07-02  3:18   ` Ilias Apalodimas

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