mbox series

[bpf-next,RFC,0/3] bpf: dynamic map-value config layout via BTF

Message ID 159076794319.1387573.8722376887638960093.stgit@firesoul
Headers show
Series bpf: dynamic map-value config layout via BTF | expand


Jesper Dangaard Brouer May 29, 2020, 3:59 p.m. UTC
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-dsahern@kernel.org

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