On 01/17/2019 04:41 PM, Stanislav Fomichev wrote:
> Currently, we have BPF_CGROUP_INET_SOCK_CREATE hook that triggers on
> socket creation and there is no way to know when the socket is being
> closed. Add new set of hooks BPF_CGROUP_INET{4,6}_SOCK_RELEASE
> that trigger when the socket is closed.
>
Are these hooks enough to capture a disconnect() operation ?
A socket can be reused (different flows) without inet_release() being ever
called.
> Initial intended usecase is to cleanup statistics after POST{4,6}_BIND.
> Hooks have read-only access to all fields of struct bpf_sock.
>
> First patch adds hooks, the rest of the patches add uapi and tests to make
> sure these hooks work.
>
- [PATCH bpf-next 0/5] add bpf cgroup hooks that trigger ... Stanislav Fomichev
- [PATCH bpf-next 2/5] tools: bpf: support BPF_CGROU... Stanislav Fomichev
- [PATCH bpf-next 3/5] selftests/bpf: add BPF_CGROUP... Stanislav Fomichev
- [PATCH bpf-next 1/5] bpf: add BPF_CGROUP_INET{4,6}... Stanislav Fomichev
- Re: [PATCH bpf-next 1/5] bpf: add BPF_CGROUP_I... Andrey Ignatov
- Re: [PATCH bpf-next 1/5] bpf: add BPF_CGROUP_I... kbuild test robot
- Re: [PATCH bpf-next 1/5] bpf: add BPF_CGROUP_I... kbuild test robot
- [PATCH bpf-next 5/5] selftests/bpf: add BPF_CGROUP... Stanislav Fomichev
- Re: [PATCH bpf-next 5/5] selftests/bpf: add BP... Andrey Ignatov
- [PATCH bpf-next 4/5] selftests/bpf: add BPF_CGROUP... Stanislav Fomichev
- Re: [PATCH bpf-next 0/5] add bpf cgroup hooks that... Eric Dumazet
- Re: [PATCH bpf-next 0/5] add bpf cgroup hooks ... Stanislav Fomichev
- Re: [PATCH bpf-next 0/5] add bpf cgroup hooks that... Andrey Ignatov
- Re: [PATCH bpf-next 0/5] add bpf cgroup hooks ... Stanislav Fomichev
- Re: [PATCH bpf-next 0/5] add bpf cgroup ho... Andrey Ignatov
- Re: [PATCH bpf-next 0/5] add bpf cgrou... Stanislav Fomichev
