netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: netdev@vger.kernel.org, jaswinder.singh@linaro.org
Cc: ard.biesheuvel@linaro.org, bjorn.topel@intel.com,
	magnus.karlsson@intel.com, brouer@redhat.com,
	daniel@iogearbox.net, ast@kernel.org,
	makita.toshiaki@lab.ntt.co.jp, jakub.kicinski@netronome.com,
	john.fastabend@gmail.com, davem@davemloft.net,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>
Subject: [RFC, PATCH 0/2, net-next] net: netsec: Add XDP Support
Date: Tue, 25 Jun 2019 18:06:17 +0300	[thread overview]
Message-ID: <1561475179-7686-1-git-send-email-ilias.apalodimas@linaro.org> (raw)

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. 

The first patch changes the buffer allocation from 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.
Use of locking (to avoid messing up the Tx queue since ndo_xdp_xmit
and the normal stack can co-exist) is one thing. 
We also need to track down the 'buffer type' for TX and properly free or 
recycle the packet depending on it's nature. Since we use page_pool API in 
the XDP_TX case the buffers are already mapped for us and we only need to 
sync them, while on the ndo_xdp_xmit we need to map and send them

Ilias Apalodimas (2):
  net: netsec: Use page_pool API
  net: netsec: add XDP support

 drivers/net/ethernet/socionext/Kconfig  |   1 +
 drivers/net/ethernet/socionext/netsec.c | 459 ++++++++++++++++++++----
 2 files changed, 394 insertions(+), 66 deletions(-)

-- 
2.20.1


             reply	other threads:[~2019-06-25 15:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25 15:06 Ilias Apalodimas [this message]
2019-06-25 15:06 ` [RFC, PATCH 1/2, net-next] net: netsec: Use page_pool API Ilias Apalodimas
2019-06-27  9:37   ` Jesper Dangaard Brouer
2019-06-27  9:40     ` Ilias Apalodimas
2019-06-25 15:06 ` [RFC, PATCH 2/2, net-next] net: netsec: add XDP support Ilias Apalodimas
2019-06-27 12:23   ` Jesper Dangaard Brouer
2019-06-27 12:24     ` Ilias Apalodimas
2019-06-27 14:18   ` Maciej Fijalkowski
2019-06-28  6:54     ` Ilias Apalodimas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1561475179-7686-1-git-send-email-ilias.apalodimas@linaro.org \
    --to=ilias.apalodimas@linaro.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@intel.com \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=john.fastabend@gmail.com \
    --cc=magnus.karlsson@intel.com \
    --cc=makita.toshiaki@lab.ntt.co.jp \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).