aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorAndrey Ignatov <rdna@fb.com>2018-07-30 17:42:28 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2018-07-31 09:33:48 +0200
commitd692f1138a4bac2efd2c8656ca15556b63479e82 (patch)
treebb4e0c18aad7c5c72620848bf51ff911f53927ef /tools/testing/selftests
parentnfp: fix variable dereferenced before check in nfp_app_ctrl_rx_raw() (diff)
downloadlinux-dev-d692f1138a4bac2efd2c8656ca15556b63479e82.tar.xz
linux-dev-d692f1138a4bac2efd2c8656ca15556b63479e82.zip
bpf: Support bpf_get_socket_cookie in more prog types
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@fb.com> Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions