aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/common.c
diff options
context:
space:
mode:
authorStanislav Fomichev <[email protected]>2020-07-06 23:01:25 +0000
committerDaniel Borkmann <[email protected]>2020-07-07 23:03:31 +0000
commitf5836749c9c04a10decd2742845ad4870965fdef (patch)
tree44335764c2ebba2099ba8bf26267bdfac7c36ed1 /tools/bpf/bpftool/common.c
parentmvpp2: fix pointer check (diff)
downloadkernel-f5836749c9c04a10decd2742845ad4870965fdef.tar.gz
kernel-f5836749c9c04a10decd2742845ad4870965fdef.zip
bpf: Add BPF_CGROUP_INET_SOCK_RELEASE hook
Sometimes it's handy to know when the socket gets freed. In particular, we'd like to try to use a smarter allocation of ports for bpf_bind and explore the possibility of limiting the number of SOCK_DGRAM sockets the process can have. Implement BPF_CGROUP_INET_SOCK_RELEASE hook that triggers on inet socket release. It triggers only for userspace sockets (not in-kernel ones) and therefore has the same semantics as the existing BPF_CGROUP_INET_SOCK_CREATE. Signed-off-by: Stanislav Fomichev <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/bpf/bpftool/common.c')
0 files changed, 0 insertions, 0 deletions