mbox series

[net-next,v2,00/15] bpf: add offload as a first class citizen

Message ID 20171103205630.1083-1-jakub.kicinski@netronome.com
Headers show
Series bpf: add offload as a first class citizen | expand

Message

Jakub Kicinski Nov. 3, 2017, 8:56 p.m. UTC
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.

v2:
 - include linux/bug.h instead of asm/bug.h;
 - rebased on top of Craig's verifier fix (no changes, the last patch
   just removes more code now).  I checked the set doesn't conflict 
   with Jiri's, Josef's or Roman's patches, but missed Craig's fix :(
v1:
 - rename the ifindex member on load;
 - improve commit messages;
 - split nfp patches more.

Jakub Kicinski (15):
  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: remove the register renumbering leftovers
  nfp: bpf: remove unnecessary include of nfp_net.h
  nfp: bpf: refactor offload logic
  nfp: bpf: require seamless reload for program replace
  nfp: bpf: move program prepare and free into offload.c
  nfp: bpf: move translation prepare to offload.c
  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      |  87 +++----
 drivers/net/ethernet/netronome/nfp/bpf/main.h      |  59 ++---
 drivers/net/ethernet/netronome/nfp/bpf/offload.c   | 282 +++++++++------------
 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                       |  13 +-
 include/linux/netdevice.h                          |  37 ++-
 include/uapi/linux/bpf.h                           |   7 +
 kernel/bpf/Makefile                                |   1 +
 kernel/bpf/core.c                                  |  10 +-
 kernel/bpf/offload.c                               | 194 ++++++++++++++
 kernel/bpf/syscall.c                               |  52 +++-
 kernel/bpf/verifier.c                              |  84 +-----
 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                     |   7 +
 36 files changed, 686 insertions(+), 666 deletions(-)
 create mode 100644 kernel/bpf/offload.c

Comments

David Miller Nov. 5, 2017, 1:28 p.m. UTC | #1
From: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Fri,  3 Nov 2017 13:56:15 -0700

> 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.
> 
> v2:
>  - include linux/bug.h instead of asm/bug.h;
>  - rebased on top of Craig's verifier fix (no changes, the last patch
>    just removes more code now).  I checked the set doesn't conflict 
>    with Jiri's, Josef's or Roman's patches, but missed Craig's fix :(
> v1:
>  - rename the ifindex member on load;
>  - improve commit messages;
>  - split nfp patches more.

Series applied, thanks Jakub.