diff options
author | Martin KaFai Lau <martin.lau@kernel.org> | 2022-09-01 17:29:37 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-09-02 20:34:32 -0700 |
commit | f649f992deeeab020257b886e054cc407154cbfc (patch) | |
tree | 7a922ac6e0db46244b5f47744066af73b75adc2a /include/linux/bpf_mem_alloc.h | |
parent | 38566ec06f52250c4abaa7447aae676e0b881c46 (diff) | |
download | linux-f649f992deeeab020257b886e054cc407154cbfc.tar.gz linux-f649f992deeeab020257b886e054cc407154cbfc.tar.bz2 linux-f649f992deeeab020257b886e054cc407154cbfc.zip |
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>
Diffstat (limited to 'include/linux/bpf_mem_alloc.h')
0 files changed, 0 insertions, 0 deletions