linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, jbrouer@redhat.com,
	mst@redhat.com, Jason Wang <jasowang@redhat.com>
Subject: [RFC PATCH net-next 0/5] XDP rx handler
Date: Mon, 13 Aug 2018 11:05:08 +0800	[thread overview]
Message-ID: <1534129513-4845-1-git-send-email-jasowang@redhat.com> (raw)

Hi:

This series tries to implement XDP support for rx hanlder. This would
be useful for doing native XDP on stacked device like macvlan, bridge
or even bond.

The idea is simple, let stacked device register a XDP rx handler. And
when driver return XDP_PASS, it will call a new helper xdp_do_pass()
which will try to pass XDP buff to XDP rx handler directly. XDP rx
handler may then decide how to proceed, it could consume the buff, ask
driver to drop the packet or ask the driver to fallback to normal skb
path.

A sample XDP rx handler was implemented for macvlan. And virtio-net
(mergeable buffer case) was converted to call xdp_do_pass() as an
example. For ease comparision, generic XDP support for rx handler was
also implemented.

Compared to skb mode XDP on macvlan, native XDP on macvlan (XDP_DROP)
shows about 83% improvement.

Please review.

Thanks

Jason Wang (5):
  net: core: generic XDP support for stacked device
  net: core: introduce XDP rx handler
  macvlan: count the number of vlan in source mode
  macvlan: basic XDP support
  virtio-net: support XDP rx handler

 drivers/net/macvlan.c      | 189 +++++++++++++++++++++++++++++++++++++++++++--
 drivers/net/virtio_net.c   |  11 +++
 include/linux/filter.h     |   1 +
 include/linux/if_macvlan.h |   1 +
 include/linux/netdevice.h  |  12 +++
 net/core/dev.c             |  34 ++++++++
 net/core/filter.c          |  28 +++++++
 7 files changed, 271 insertions(+), 5 deletions(-)

-- 
2.7.4


             reply	other threads:[~2018-08-13  3:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-13  3:05 Jason Wang [this message]
2018-08-13  3:05 ` [RFC PATCH net-next 1/5] net: core: generic XDP support for stacked device Jason Wang
2018-08-13  3:05 ` [RFC PATCH net-next 2/5] net: core: introduce XDP rx handler Jason Wang
2018-08-13  3:05 ` [RFC PATCH net-next 3/5] macvlan: count the number of vlan in source mode Jason Wang
2018-08-13  3:05 ` [RFC PATCH net-next 4/5] macvlan: basic XDP support Jason Wang
2018-08-13  3:05 ` [RFC PATCH net-next 5/5] virtio-net: support XDP rx handler Jason Wang
2018-08-13  3:17 ` [RFC PATCH net-next 0/5] " Jason Wang

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=1534129513-4845-1-git-send-email-jasowang@redhat.com \
    --to=jasowang@redhat.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jbrouer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --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).