Searched hist:f649f992deeeab020257b886e054cc407154cbfc (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/tools/testing/selftests/bpf/progs/ |
H A D | setget_sockopt.c | diff f649f992deeeab020257b886e054cc407154cbfc Thu Sep 01 19:29:37 CDT 2022 Martin KaFai Lau <martin.lau@kernel.org> selftest/bpf: Add test for bpf_getsockopt()
This patch removes the __bpf_getsockopt() which directly reads the sk by using PTR_TO_BTF_ID. Instead, the test now directly uses the kernel bpf helper bpf_getsockopt() which supports all the required optname now.
TCP_SAVE[D]_SYN and TCP_MAXSEG are not tested in a loop for all the hooks and sock_ops's cb. TCP_SAVE[D]_SYN only works in passive connection. TCP_MAXSEG only works when it is setsockopt before the connection is established and the getsockopt return value can only be tested after the connection is established.
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://lore.kernel.org/r/20220902002937.2896904-1-kafai@fb.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
|
H A D | bpf_tracing_net.h | diff f649f992deeeab020257b886e054cc407154cbfc Thu Sep 01 19:29:37 CDT 2022 Martin KaFai Lau <martin.lau@kernel.org> selftest/bpf: Add test for bpf_getsockopt()
This patch removes the __bpf_getsockopt() which directly reads the sk by using PTR_TO_BTF_ID. Instead, the test now directly uses the kernel bpf helper bpf_getsockopt() which supports all the required optname now.
TCP_SAVE[D]_SYN and TCP_MAXSEG are not tested in a loop for all the hooks and sock_ops's cb. TCP_SAVE[D]_SYN only works in passive connection. TCP_MAXSEG only works when it is setsockopt before the connection is established and the getsockopt return value can only be tested after the connection is established.
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://lore.kernel.org/r/20220902002937.2896904-1-kafai@fb.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
|