[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180118031332.32225-1-jakub.kicinski@netronome.com>
Date: Wed, 17 Jan 2018 19:13:24 -0800
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: daniel@...earbox.net, alexei.starovoitov@...il.com
Cc: netdev@...r.kernel.org, oss-drivers@...ronome.com, tehnerd@...com,
Jakub Kicinski <jakub.kicinski@...ronome.com>
Subject: [pull request bpf-next 0/8] bpf: offload: array maps, reporting and test
Hi!
This set bring in the rest of map offload code held up by urgent
fixes and improvements to the BPF arrays.
The first 3 patches take care of array map offload, similarly to
hash maps the attribute validation is split out to a separate map
op, and used for both offloaded and non-offloaded case (allocation
only happens if map is on the host). Offload support comes down
to allowing this map type through the offload check in the core.
NFP driver also rejects the delete operation in case of array maps.
Subsequent patches add reporting of target device in a very similar
way target device of programs is reported (ifindex+netns dev/ino).
Netdevsim is extended with a trivial map implementation allowing us
to test the offload in test_offload.py.
Last patch adds a small busy wait to NFP map IO, this improves the
response times which is especially useful for map dumps.
----------------------------------------------------------------
The following changes since commit e2e3224122e64ebe15fe02a63e8fe09b64a8c743:
samples/bpf: xdp2skb_meta comment explain why pkt-data pointers are invalidated (2018-01-18 01:49:09 +0100)
are available in the Git repository at:
git@...olite.kernel.org:pub/scm/linux/kernel/git/kuba/linux bpf-offload-array-maps-and-reporting
for you to fetch changes up to cebe56e2d9efaa883e0ea98b396328ed72fe1c46:
nfp: bpf: add short busy wait for FW replies (2018-01-17 19:00:12 -0800)
----------------------------------------------------------------
Jakub Kicinski (8):
bpf: arraymap: move checks out of alloc function
bpf: arraymap: use bpf_map_init_from_attr()
bpf: offload: allow array map offload
bpf: offload: report device information about offloaded maps
tools: bpftool: report device information for offloaded maps
netdevsim: bpf: support fake map offload
selftest/bpf: extend the offload test with map checks
nfp: bpf: add short busy wait for FW replies
drivers/net/ethernet/netronome/nfp/bpf/cmsg.c | 9 +-
drivers/net/ethernet/netronome/nfp/bpf/offload.c | 2 +
drivers/net/netdevsim/bpf.c | 246 +++++++++++++++++++++++
drivers/net/netdevsim/netdevsim.h | 3 +
include/linux/bpf.h | 2 +
include/uapi/linux/bpf.h | 3 +
kernel/bpf/arraymap.c | 49 +++--
kernel/bpf/offload.c | 58 +++++-
kernel/bpf/syscall.c | 6 +
tools/bpf/bpftool/map.c | 7 +-
tools/include/uapi/linux/bpf.h | 3 +
tools/testing/selftests/bpf/Makefile | 3 +-
tools/testing/selftests/bpf/sample_map_ret0.c | 34 ++++
tools/testing/selftests/bpf/test_offload.py | 206 ++++++++++++++++---
14 files changed, 583 insertions(+), 48 deletions(-)
create mode 100644 tools/testing/selftests/bpf/sample_map_ret0.c
Powered by blists - more mailing lists