Please update the commit log:
'''
This patch adds the round-robin BPF MPTCP scheduler test: test_rr(). Use
sysctl to set net.mptcp.scheduler to use this sched. Add two veth net
devices to simulate the multiple addresses case. Use 'ip mptcp endpoint'
command to add the new endpoint ADDR_2 to PM netlink. Send data and check
bytes_sent of 'ss' output after it to make sure the data has been sent on
both net devices.
'''
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
tools/testing/selftests/bpf/prog_tests/mptcp.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
index 0fc446c20d72..8b2fe1004323 100644
--- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
+++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
@@ -366,18 +366,17 @@ static void test_rr(void)
return;
}
- add_veth();
- system("ip mptcp endpoint add 10.0.1.1 subflow");
- system("sysctl -qw net.mptcp.scheduler=bpf_rr");
- server_fd = start_mptcp_server(AF_INET, NULL, 0, 0);
+ sched_init("subflow", "bpf_rr");
+ server_fd = start_mptcp_server(AF_INET, ADDR_1, 0, 0);
client_fd = connect_to_fd(server_fd, 0);
send_data(server_fd, client_fd);
- ASSERT_OK(system("ss -MOenita | grep '10.0.1.1' | grep -q 'bytes_sent:'"), "ss");
+ ASSERT_OK(has_bytes_sent(ADDR_1), "has_bytes_sent addr 1");
+ ASSERT_OK(has_bytes_sent(ADDR_2), "has_bytes_sent addr 2");
close(client_fd);
close(server_fd);
- cleanup();
+ sched_cleanup();
bpf_link__destroy(link);
mptcp_bpf_rr__destroy(rr_skel);
}
--
2.34.1