Skip to content
Commit fc1ca955 authored by Felix Maurer's avatar Felix Maurer Committed by Alexei Starovoitov
Browse files

selftests: bpf: Less strict size check in sockopt_sk

Originally, the kernel strictly checked the size of the optval in
getsockopt(TCP_ZEROCOPY_RECEIVE) to be equal to sizeof(struct
tcp_zerocopy_receive). With c8856c05, this was changed to allow
optvals of different sizes.

The bpf code in the sockopt_sk test was still performing the strict size
check. This fix adapts the kernel behavior from c8856c05 in the
selftest, i.e., just check if the required fields are there.

Fixes: 9cacf81f

 ("bpf: Remove extra lock_sock for TCP_ZEROCOPY_RECEIVE")
Signed-off-by: default avatarFelix Maurer <fmaurer@redhat.com>
Reviewed-by: default avatarStanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/r/6f569cca2e45473f9a724d54d03fdfb45f29e35f.1643129402.git.fmaurer@redhat.com
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 451c4260
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment