diff options
author | Zijian Zhang <zijianzhang@bytedance.com> | 2024-10-17 02:48:37 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2024-11-26 22:42:03 +0300 |
commit | 3448ad23b34e43a2526bd0f9e1221e8de876adec (patch) | |
tree | c515984ddc1c0bd2ec0303da659078f49a48c0c9 /tools/perf/scripts/python/syscall-counts.py | |
parent | ca70b8baf2bd125b2a4d96e76db79375c07d7ff2 (diff) | |
download | linux-3448ad23b34e43a2526bd0f9e1221e8de876adec.tar.xz |
selftests/bpf: Add apply_bytes test to test_txmsg_redir_wait_sndmem in test_sockmap
Add this to more comprehensively test the socket memory accounting logic
in the __SK_REDIRECT and __SK_DROP cases of tcp_bpf_sendmsg. We don't have
test when apply_bytes are not zero in test_txmsg_redir_wait_sndmem.
test_send_large has opt->rate=2, it will invoke sendmsg two times.
Specifically, the first sendmsg will trigger the case where the ret value
of tcp_bpf_sendmsg_redir is less than 0; while the second sendmsg happens
after the 3 seconds timeout, and it will trigger __SK_DROP because socket
c2 has been removed from the sockmap/hash.
Signed-off-by: Zijian Zhang <zijianzhang@bytedance.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20241016234838.3167769-2-zijianzhang@bytedance.com
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions