summaryrefslogtreecommitdiffstats
path: root/tools/cgroup/.gitignore
diff options
context:
space:
mode:
authorLorenz Bauer <lmb@cloudflare.com>2020-09-09 17:27:11 +0100
committerAlexei Starovoitov <ast@kernel.org>2020-09-10 12:31:55 -0700
commit0365351524d7560d8ed7a42801a15252c6c56f41 (patch)
tree7fd76c80163d4dc5a5a439e3c4ce7603c6dd0965 /tools/cgroup/.gitignore
parent654785a1afe1b1428106c322c7ea650e3f8d29e9 (diff)
downloadlinux-0365351524d7560d8ed7a42801a15252c6c56f41.tar.bz2
net: Allow iterating sockmap and sockhash
Add bpf_iter support for sockmap / sockhash, based on the bpf_sk_storage and hashtable implementation. sockmap and sockhash share the same iteration context: a pointer to an arbitrary key and a pointer to a socket. Both pointers may be NULL, and so BPF has to perform a NULL check before accessing them. Technically it's not possible for sockhash iteration to yield a NULL socket, but we ignore this to be able to use a single iteration point. Iteration will visit all keys that remain unmodified during the lifetime of the iterator. It may or may not visit newly added ones. Switch from using rcu_dereference_raw to plain rcu_dereference, so we gain another guard rail if CONFIG_PROVE_RCU is enabled. Signed-off-by: Lorenz Bauer <lmb@cloudflare.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20200909162712.221874-3-lmb@cloudflare.com
Diffstat (limited to 'tools/cgroup/.gitignore')
0 files changed, 0 insertions, 0 deletions