linux-stable/tools/bpf
Quentin Monnet a20693b6e7 tools: bpftool: Clean up function to dump map entry
The function used to dump a map entry in bpftool is a bit difficult to
follow, as a consequence to earlier refactorings. There is a variable
("num_elems") which does not appear to be necessary, and the error
handling would look cleaner if moved to its own function. Let's clean it
up. No functional change.

v2:
- v1 was erroneously removing the check on fd maps in an attempt to get
  support for outer map dumps. This is already working. Instead, v2
  focuses on cleaning up the dump_map_elem() function, to avoid
  similar confusion in the future.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200910102652.10509-2-quentin@isovalent.com
2020-09-10 17:29:20 -07:00
..
bpftool tools: bpftool: Clean up function to dump map entry 2020-09-10 17:29:20 -07:00
resolve_btfids Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-09-01 13:22:59 -07:00
runqslower bpf, runqslower: include proper uapi/bpf.h 2020-05-09 18:01:33 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-08-05 20:13:21 -07:00
Makefile.helpers treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
bpf_asm.c docs: networking: convert filter.txt to ReST 2020-04-28 14:39:46 -07:00
bpf_dbg.c docs: networking: convert filter.txt to ReST 2020-04-28 14:39:46 -07:00
bpf_exp.l bpf: fix cbpf parser bug for octal numbers 2018-06-03 07:46:55 -07:00
bpf_exp.y tools, bpf_asm: Warn when jumps are out of range 2019-11-07 16:01:34 +01:00
bpf_jit_disasm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 232 2019-06-19 17:09:06 +02:00