Skip to content

bpftool support for sockmap use cases

John Fastabend netdev 3 versions – Applied

Status from this message: Applied, Thanks

Get series with b4
b4 am 20181015181857.8673.46183.stgit@john-Precision-Tower-5810

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesApplied
  2. v22 patches 2 repliesSuperseded
  3. v11 patch 2 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2bpf: bpftool, add support for attaching programs to mapstools/bpf/bpftool/Documentation/bpftool-prog.rst tools/bpf/bpftool/Documentation/bpftool.rst tools/bpf/bpftool/bash-completion/bpftool +1 more+128 -30 replies
2/2bpf: bpftool, add flag to allow non-compat map definitionstools/bpf/bpftool/Documentation/bpftool.rst tools/bpf/bpftool/bash-completion/bpftool tools/bpf/bpftool/main.c +5 more+37 -131 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJakub Kicinski
1/2R-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [bpf-next PATCH v3 0/2] bpftool support for sockmap use cases

The first patch adds support for attaching programs to maps. This is needed to support sock{map|hash} use from bpftool. Currently, I carry around custom code to do this so doing it using standard bpftool will be great.

The second patch adds a compat mode to ignore non-zero entries in the map def. This allows using bpftool with maps that have a extra fields that the user knows can be ignored. This is needed to work correctly with maps being loaded by other tools or directly via syscalls.

v3: add bash completion and doc updates for --mapcompat

---

John Fastabend (2):
bpf: bpftool, add support for attaching programs to maps
bpf: bpftool, add flag to allow non-compat map definitions

 tools/bpf/bpftool/Documentation/bpftool-prog.rst |   11 ++
 tools/bpf/bpftool/Documentation/bpftool.rst      |    6 +
 tools/bpf/bpftool/bash-completion/bpftool        |   21 ++++-
 tools/bpf/bpftool/main.c                         |    7 +-
 tools/bpf/bpftool/main.h                         |    3 -
 tools/bpf/bpftool/prog.c                         |  101 ++++++++++++++++++++++
 6 files changed, 142 insertions(+), 7 deletions(-)