diff options
| author | David Ahern <[email protected]> | 2018-11-08 13:00:07 -0800 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2018-11-09 10:03:59 +0100 |
| commit | bf598a8f0f771302d4ecb0ef0003c54732221597 (patch) | |
| tree | 39da7a18141381033f339f182a7255814a161497 /tools/perf/scripts/python/mem-phys-addr.py | |
| parent | 435f90a338ae42c0d7c0109a1742d1b16bc99bf6 (diff) | |
bpftool: Improve handling of ENOENT on map dumps
bpftool output is not user friendly when dumping a map with only a few
populated entries:
$ bpftool map
1: devmap name tx_devmap flags 0x0
key 4B value 4B max_entries 64 memlock 4096B
2: array name tx_idxmap flags 0x0
key 4B value 4B max_entries 64 memlock 4096B
$ bpftool map dump id 1
key:
00 00 00 00
value:
No such file or directory
key:
01 00 00 00
value:
No such file or directory
key:
02 00 00 00
value:
No such file or directory
key: 03 00 00 00 value: 03 00 00 00
Handle ENOENT by keeping the line format sane and dumping
"<no entry>" for the value
$ bpftool map dump id 1
key: 00 00 00 00 value: <no entry>
key: 01 00 00 00 value: <no entry>
key: 02 00 00 00 value: <no entry>
key: 03 00 00 00 value: 03 00 00 00
...
Signed-off-by: David Ahern <[email protected]>
Acked-by: Jakub Kicinski <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions