selftests/bpf: Add struct send_recv_arg
authorGeliang Tang <tanggeliang@kylinos.cn>
Thu, 11 Apr 2024 05:43:11 +0000 (13:43 +0800)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 11 Apr 2024 18:17:56 +0000 (11:17 -0700)
commit68acca6e6f99b1f928a2c05b92bb1c272edb8ae7
tree3767bece7681558b7ac282a88a2cc74070123365
parentd75142dbeb2bd1587b9cc19f841578f541275a64
selftests/bpf: Add struct send_recv_arg

Avoid setting total_bytes and stop as global variables, this patch adds
a new struct named send_recv_arg to pass arguments between threads. Put
these two variables together with fd into this struct and pass it to
server thread, so that server thread can access these two variables without
setting them as global ones.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Link: https://lore.kernel.org/r/ca1dd703b796f6810985418373e750f7068b4186.1712813933.git.tanggeliang@kylinos.cn
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c