diff options
| author | Florent Revest <revest@chromium.org> | 2020-12-04 14:36:08 +0300 |
|---|---|---|
| committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-12-05 00:32:40 +0300 |
| commit | bd9b327e58f98aa7126291bf12b50720c660e787 (patch) | |
| tree | c675f7887871b6279c14de91bfb4722e006f4baf /tools/perf/scripts/python/stat-cpi.py | |
| parent | 593f6d41abbbc63e1ad297f7a36ab6060a812f0c (diff) | |
| download | linux-bd9b327e58f98aa7126291bf12b50720c660e787.tar.xz | |
selftests/bpf: Add an iterator selftest for bpf_sk_storage_get
The eBPF program iterates over all files and tasks. For all socket
files, it stores the tgid of the last task it encountered with a handle
to that socket. This is a heuristic for finding the "owner" of a socket
similar to what's done by lsof, ss, netstat or fuser. Potentially, this
information could be used from a cgroup_skb/*gress hook to try to
associate network traffic with processes.
The test makes sure that a socket it created is tagged with prog_tests's
pid.
Signed-off-by: Florent Revest <revest@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20201204113609.1850150-5-revest@google.com
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions
