bpftool: match programs and maps by names
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 2 repliesIn review
- v13 patches 9 repliesSuperseded
Changes in v2 from the cover letter
- Fix buffer overflow after realloc.
- Add example output to commit message.
- Properly close JSON arrays on errors.
- Fix style errors (line breaks, for loops, exit labels, type for tagname).
- Move do_show code for argc == 2 to do_show_subset functions.
- Rebase.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | bpftool: match several programs with same tagtools/ tools/ | +268 | 0 replies | |
| 2/3 | bpftool: match programs by nametools/ tools/ tools/ +2 more | +42 | 0 replies | |
| 3/3 | bpftool: match maps by nametools/ tools/ tools/ +1 more | +439 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Quentin Monnet |
|---|---|
| 1/3 | |
| 2/3 | R-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH bpf-next v2 0/3] bpftool: match programs and maps by names
When working with frequently modified BPF programs, both the ID and the tag may change. bpftool currently doesn't provide a "stable" way to match such programs. This patchset allows bpftool to match programs and maps by name.
When given a tag that matches several programs, bpftool currently only considers the first match. The first patch changes that behavior to either process all matching programs (for the show and dump commands) or error out. The second patch implements program lookup by name, with the same behavior as for tags in case of ambiguity. The last patch implements map lookup by name.
Changelogs:
Changes in v2:
- Fix buffer overflow after realloc.
- Add example output to commit message.
- Properly close JSON arrays on errors.
- Fix style errors (line breaks, for loops, exit labels, type for tagname).
- Move do_show code for argc == 2 to do_show_subset functions.
- Rebase.
Paul Chaignon (3):
bpftool: match several programs with same tag
bpftool: match programs by name
bpftool: match maps by name
.../bpf/bpftool/Documentation/bpftool-map.rst | 12 +- .../bpftool/Documentation/bpftool-prog.rst | 18 +- tools/bpf/bpftool/bash-completion/bpftool | 145 ++++++- tools/bpf/bpftool/main.h | 4 +- tools/bpf/bpftool/map.c | 384 +++++++++++++---- tools/bpf/bpftool/prog.c | 388 ++++++++++++------ 6 files changed, 737 insertions(+), 214 deletions(-)
Signature · 1 line
2.24.0