From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: netdev@vger.kernel.org
Cc: oss-drivers@netronome.com, alexei.starovoitov@gmail.com,
daniel@iogearbox.net, bblanco@gmail.com,
Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [RFC 00/12] bpf: add offload as a first class citizen
Date: Tue, 31 Oct 2017 18:52:05 -0700 [thread overview]
Message-ID: <20171101015217.10666-1-jakub.kicinski@netronome.com> (raw)
Hi!
This series is my stab at what was discussed at a recent IOvisor
bi-weekly call. The idea is to make the device translator run at
the program load time. This makes the offload more explicit to
the user space. It also makes it easy for the device translator
to insert information into the original verifier log.
The first patch renames the ndo_xdp into ndo_bpf, because I use
it to mux the BPF program load calls. I'm not sure if that's
necessary.
Note, this RFC will not apply, the NFP patches have conflicts
both with Alexei's stack work and TC block work.
Jakub Kicinski (12):
net: bpf: rename ndo_xdp to ndo_bpf
bpf: offload: add infrastructure for loading programs for a specific
netdev
bpf: report offload info to user space
bpftool: print program device bound info
xdp: allow attaching programs loaded for specific device
cls_bpf: allow attaching programs loaded for specific device
nfp: bpf: drop support for cls_bpf with legacy actions
nfp: bpf: refactor offload logic
nfp: bpf: require seamless reload for program replace
nfp: bpf: remove the register renumbering leftovers
nfp: bpf: move to new BPF program offload infrastructure
bpf: remove old offload/analyzer
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 2 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 2 +-
drivers/net/ethernet/cavium/thunder/nicvf_main.c | 4 +-
drivers/net/ethernet/intel/i40e/i40e_main.c | 6 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 +-
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 6 +-
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 +-
drivers/net/ethernet/netronome/nfp/bpf/jit.c | 194 ++-----------
drivers/net/ethernet/netronome/nfp/bpf/main.c | 84 +++---
drivers/net/ethernet/netronome/nfp/bpf/main.h | 60 ++--
drivers/net/ethernet/netronome/nfp/bpf/offload.c | 317 +++++++++------------
drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 54 +---
drivers/net/ethernet/netronome/nfp/nfp_app.h | 37 +++
drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 -
.../net/ethernet/netronome/nfp/nfp_net_common.c | 12 +-
drivers/net/ethernet/qlogic/qede/qede.h | 2 +-
drivers/net/ethernet/qlogic/qede/qede_filter.c | 2 +-
drivers/net/ethernet/qlogic/qede/qede_main.c | 4 +-
drivers/net/tun.c | 4 +-
drivers/net/virtio_net.c | 4 +-
include/linux/bpf.h | 47 +++
include/linux/bpf_verifier.h | 12 +-
include/linux/netdevice.h | 37 ++-
include/uapi/linux/bpf.h | 8 +
kernel/bpf/Makefile | 1 +
kernel/bpf/core.c | 10 +-
kernel/bpf/offload.c | 194 +++++++++++++
kernel/bpf/syscall.c | 52 +++-
kernel/bpf/verifier.c | 78 +----
net/core/dev.c | 40 +--
net/core/filter.c | 42 ---
net/core/rtnetlink.c | 4 +-
net/sched/cls_bpf.c | 10 +-
tools/bpf/bpftool/prog.c | 31 ++
tools/include/uapi/linux/bpf.h | 8 +
36 files changed, 700 insertions(+), 680 deletions(-)
create mode 100644 kernel/bpf/offload.c
--
2.14.1
next reply other threads:[~2017-11-01 1:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 1:52 Jakub Kicinski [this message]
2017-11-01 1:52 ` [RFC 01/12] net: bpf: rename ndo_xdp to ndo_bpf Jakub Kicinski
2017-11-01 7:41 ` Jesper Dangaard Brouer
2017-11-01 16:00 ` Jakub Kicinski
2017-11-01 1:52 ` [RFC 02/12] bpf: offload: add infrastructure for loading programs for a specific netdev Jakub Kicinski
2017-11-01 5:23 ` Alexei Starovoitov
2017-11-01 6:04 ` Jakub Kicinski
2017-11-01 1:52 ` [RFC 03/12] bpf: report offload info to user space Jakub Kicinski
2017-11-01 1:52 ` [RFC 04/12] bpftool: print program device bound info Jakub Kicinski
2017-11-01 1:52 ` [RFC 05/12] xdp: allow attaching programs loaded for specific device Jakub Kicinski
2017-11-01 1:52 ` [RFC 06/12] cls_bpf: " Jakub Kicinski
2017-11-01 1:52 ` [RFC 07/12] nfp: bpf: drop support for cls_bpf with legacy actions Jakub Kicinski
2017-11-01 1:52 ` [RFC 08/12] nfp: bpf: refactor offload logic Jakub Kicinski
2017-11-01 1:52 ` [RFC 09/12] nfp: bpf: require seamless reload for program replace Jakub Kicinski
2017-11-01 1:52 ` [RFC 10/12] nfp: bpf: remove the register renumbering leftovers Jakub Kicinski
2017-11-01 1:52 ` [RFC 11/12] nfp: bpf: move to new BPF program offload infrastructure Jakub Kicinski
2017-11-01 1:52 ` [RFC 12/12] bpf: remove old offload/analyzer Jakub Kicinski
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=20171101015217.10666-1-jakub.kicinski@netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=alexei.starovoitov@gmail.com \
--cc=bblanco@gmail.com \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
/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).