[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5e630ffb-9829-26e0-60dc-94df37e37e85@fb.com>
Date: Mon, 30 Jul 2018 16:49:09 -0700
From: Yonghong Song <yhs@...com>
To: Andrey Ignatov <rdna@...com>, <netdev@...r.kernel.org>
CC: <ast@...nel.org>, <daniel@...earbox.net>, <brakmo@...com>,
<kernel-team@...com>
Subject: Re: [PATCH bpf-next 1/4] bpf: Support bpf_get_socket_cookie in more
prog types
On 7/30/18 9:04 AM, Andrey Ignatov wrote:
> bpf_get_socket_cookie() helper can be used to identify skb that
> correspond to the same socket.
>
> Though socket cookie can be useful in many other use-cases where socket is
> available in program context. Specifically BPF_PROG_TYPE_CGROUP_SOCK_ADDR
> and BPF_PROG_TYPE_SOCK_OPS programs can benefit from it so that one of
> them can augment a value in a map prepared earlier by other program for
> the same socket.
>
> The patch adds support to call bpf_get_socket_cookie() from
> BPF_PROG_TYPE_CGROUP_SOCK_ADDR and BPF_PROG_TYPE_SOCK_OPS.
>
> It doesn't introduce new helpers. Instead it reuses same helper name
> bpf_get_socket_cookie() but adds support to this helper to accept
> `struct bpf_sock_addr` and `struct bpf_sock_ops`.
>
> Documentation in bpf.h is changed in a way that should not break
> automatic generation of markdown.
>
> Signed-off-by: Andrey Ignatov <rdna@...com>
Acked-by: Yonghong Song <yhs@...com>
Powered by blists - more mailing lists