aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/skb_load_bytes.c
diff options
context:
space:
mode:
authorGeliang Tang <tanggeliang@kylinos.cn>2024-07-09 17:16:17 +0800
committerMartin KaFai Lau <martin.lau@kernel.org>2024-07-10 11:56:22 -0700
commita3016a27cea8e6d10b200b9e19c19961c402d106 (patch)
tree99c9cd6f12b6c9090379c6872f2930b108617f4e /tools/testing/selftests/bpf/prog_tests/skb_load_bytes.c
parenteeb23b54e447ea62b247d89681f0140abab00d7f (diff)
selftests/bpf: Add backlog for network_helper_opts
Some callers expect __start_server() helper to pass their own "backlog" value to listen() instead of the default of 1. So this patch adds struct member "backlog" for network_helper_opts to allow callers to set "backlog" value via start_server_str() helper. listen(fd, 0 /* backlog */) can be used to enforce syncookie. Meaning backlog 0 is a legit value. Using 0 as a default and changing it to 1 here is fine. It makes the test program easier to write for the common case. Enforcing syncookie mode by using backlog 0 is a niche use case but it should at least have a way for the caller to do that. Thus, -ve backlog value is used here for the syncookie use case. Please see the comment in network_helpers.h for the details. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Link: https://lore.kernel.org/r/1660229659b66eaad07aa2126e9c9fe217eba0dd.1720515893.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/skb_load_bytes.c')
0 files changed, 0 insertions, 0 deletions