netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/9] bpf: offload program and map sharing
@ 2018-07-17  2:37 Jakub Kicinski
  2018-07-17  2:37 ` [PATCH bpf-next 1/9] netdevsim: add switch_id attribute Jakub Kicinski
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Jakub Kicinski @ 2018-07-17  2:37 UTC (permalink / raw)
  To: alexei.starovoitov, daniel; +Cc: oss-drivers, netdev, Jakub Kicinski

Hi!

This patchset adds support for sharing BPF objects within one ASIC.
This will allow us to reuse of the same program on multiple ports of
a device leading to better code store utilization.  It also enables
sharing maps between programs attached to different ports of a device.

Jakub Kicinski (9):
  netdevsim: add switch_id attribute
  netdevsim: add shared netdevsim devices
  netdevsim: associate bound programs with shared dev
  nfp: add .ndo_init() and .ndo_uninit() callbacks
  bpf: offload: aggregate offloads per-device
  bpf: offload: allow program and map sharing per-ASIC
  netdevsim: allow program sharing between devices
  nfp: bpf: allow program sharing within ASIC
  selftests/bpf: add test for sharing objects between netdevs

 drivers/net/ethernet/netronome/nfp/bpf/main.c |  23 ++
 drivers/net/ethernet/netronome/nfp/bpf/main.h |   4 +
 .../net/ethernet/netronome/nfp/bpf/offload.c  |  10 +-
 drivers/net/ethernet/netronome/nfp/nfp_app.c  |  17 ++
 drivers/net/ethernet/netronome/nfp/nfp_app.h  |   8 +
 .../ethernet/netronome/nfp/nfp_net_common.c   |   2 +
 .../net/ethernet/netronome/nfp/nfp_net_repr.c |   2 +
 drivers/net/netdevsim/bpf.c                   |  50 +++-
 drivers/net/netdevsim/netdev.c                | 103 +++++++-
 drivers/net/netdevsim/netdevsim.h             |  23 +-
 include/linux/bpf.h                           |  10 +-
 kernel/bpf/offload.c                          | 223 ++++++++++++++----
 kernel/bpf/verifier.c                         |   2 +-
 tools/testing/selftests/bpf/test_offload.py   | 151 +++++++++++-
 14 files changed, 543 insertions(+), 85 deletions(-)

-- 
2.17.1

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

end of thread, other threads:[~2018-07-17  3:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-17  2:37 [PATCH bpf-next 0/9] bpf: offload program and map sharing Jakub Kicinski
2018-07-17  2:37 ` [PATCH bpf-next 1/9] netdevsim: add switch_id attribute Jakub Kicinski
2018-07-17  2:37 ` [PATCH bpf-next 2/9] netdevsim: add shared netdevsim devices Jakub Kicinski
2018-07-17  2:37 ` [PATCH bpf-next 3/9] netdevsim: associate bound programs with shared dev Jakub Kicinski
2018-07-17  2:37 ` [PATCH bpf-next 4/9] nfp: add .ndo_init() and .ndo_uninit() callbacks Jakub Kicinski
2018-07-17  2:37 ` [PATCH bpf-next 5/9] bpf: offload: aggregate offloads per-device Jakub Kicinski
2018-07-17  2:37 ` [PATCH bpf-next 6/9] bpf: offload: allow program and map sharing per-ASIC Jakub Kicinski
2018-07-17  3:00   ` Alexei Starovoitov
2018-07-17  3:18     ` Jakub Kicinski
2018-07-17  2:37 ` [PATCH bpf-next 7/9] netdevsim: allow program sharing between devices Jakub Kicinski
2018-07-17  2:37 ` [PATCH bpf-next 8/9] nfp: bpf: allow program sharing within ASIC Jakub Kicinski
2018-07-17  2:37 ` [PATCH bpf-next 9/9] selftests/bpf: add test for sharing objects between netdevs Jakub Kicinski

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