OSDN Git Service

bpf: Add test_sock_fields for skb->sk and bpf_tcp_sock
authorMartin KaFai Lau <kafai@fb.com>
Sun, 10 Feb 2019 07:22:28 +0000 (23:22 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 11 Feb 2019 03:46:17 +0000 (19:46 -0800)
commite0b27b3f97b8fce620331baad563833617c1f303
treeacbb0d1786bcccde256ee57a9be1fd731885c1cf
parentfb47d1d931f8419645db15ef5fc0dc7a857c8f4e
bpf: Add test_sock_fields for skb->sk and bpf_tcp_sock

This patch adds a C program to show the usage on
skb->sk and bpf_tcp_sock.

Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/bpf_helpers.h
tools/testing/selftests/bpf/test_sock_fields.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_sock_fields_kern.c [new file with mode: 0644]