OSDN Git Service

bpf: Add bpf_skc_to_{tcp, tcp_timewait, tcp_request}_sock() helpers
authorYonghong Song <yhs@fb.com>
Tue, 23 Jun 2020 23:08:11 +0000 (16:08 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 25 Jun 2020 01:37:59 +0000 (18:37 -0700)
commit478cfbdf5f13dfe09cfd0b1cbac821f5e27f6108
treefebcb078fe63001ae8c004f218e9ff1acc2a68e2
parentaf7ec13833619e17f03aa73a785a2f871da6d66b
bpf: Add bpf_skc_to_{tcp, tcp_timewait, tcp_request}_sock() helpers

Three more helpers are added to cast a sock_common pointer to
an tcp_sock, tcp_timewait_sock or a tcp_request_sock for
tracing programs.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20200623230811.3988277-1-yhs@fb.com
include/linux/bpf.h
include/uapi/linux/bpf.h
kernel/trace/bpf_trace.c
net/core/filter.c
scripts/bpf_helpers_doc.py
tools/include/uapi/linux/bpf.h