| From: |
| Jesper Dangaard Brouer <brouer-AT-redhat.com> |
| To: |
| David Ahern <dsahern-AT-gmail.com>, bpf-AT-vger.kernel.org, netdev-AT-vger.kernel.org |
| Subject: |
| [PATCH bpf-next RFC 0/3] bpf: dynamic map-value config layout via BTF |
| Date: |
| Fri, 29 May 2020 17:59:35 +0200 |
| Message-ID: |
| <159076794319.1387573.8722376887638960093.stgit@firesoul> |
| Cc: |
| Jesper Dangaard Brouer <brouer-AT-redhat.com>, Daniel Borkmann <borkmann-AT-iogearbox.net>, Alexei Starovoitov <alexei.starovoitov-AT-gmail.com>, Andrii Nakryiko <andrii.nakryiko-AT-gmail.com> |
| Archive-link: |
| Article |
This patchset is based on top of David Ahern's work V3: "bpf: Add support
for XDP programs in DEVMAP entries"[1]. The purpose is to address the kABI
interfaces that is introduced in that patchset, before it is released.
[1] https://lore.kernel.org/netdev/20200529052057.69378-1-dsa...
The map-value of these special maps are evolving into configuration
interface between userspace and kernel. The approach in[1] is to expose a
binary struct layout that can only be grown in the end of the struct.
With the BTF technology it is possible to create an interface that is much
more dynamic and flexible.
---
Jesper Dangaard Brouer (3):
bpf: move struct bpf_devmap_val out of UAPI
bpf: devmap dynamic map-value storage area based on BTF
samples/bpf: change xdp_fwd to use new BTF config interface
include/uapi/linux/bpf.h | 9 -
kernel/bpf/devmap.c | 227 +++++++++++++++++---
samples/bpf/xdp_fwd.h | 24 ++
samples/bpf/xdp_fwd_kern.c | 5
samples/bpf/xdp_fwd_user.c | 9 +
tools/include/uapi/linux/bpf.h | 9 -
.../selftests/bpf/prog_tests/xdp_devmap_attach.c | 18 +-
.../bpf/progs/test_xdp_with_devmap_helpers.c | 10 +
8 files changed, 252 insertions(+), 59 deletions(-)
create mode 100644 samples/bpf/xdp_fwd.h
--