[PATCH mptcp-next] Squash to "selftests/bpf: Add mptcp subflow subtest" - set limits

Geliang Tang posted 1 patch 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/9dafce3091d30a8446897813d2a9d302625c09d0.1722327628.git.tanggeliang@kylinos.cn
tools/testing/selftests/bpf/prog_tests/mptcp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
[PATCH mptcp-next] Squash to "selftests/bpf: Add mptcp subflow subtest" - set limits
Posted by Geliang Tang 3 months ago
From: Geliang Tang <tanggeliang@kylinos.cn>

Need to set limits before adding endpoints.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
 tools/testing/selftests/bpf/prog_tests/mptcp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
index 00f63f3f19f4..ffc2cfacabee 100644
--- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
+++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
@@ -357,9 +357,12 @@ static int endpoint_init(char *flags)
 	SYS(fail, "ip -net %s link set dev veth1 up", NS_TEST);
 	SYS(fail, "ip -net %s addr add %s/24 dev veth2", NS_TEST, ADDR_2);
 	SYS(fail, "ip -net %s link set dev veth2 up", NS_TEST);
-	/* It would be better to use  "ip -net %s mptcp endpoint add %s %s",
+	/* It would be better to use
+	 *	ip -net %s mptcp limits set add_addr_accepted 8 subflows 8
+	 *	ip -net %s mptcp endpoint add %s %s
 	 * but the BPF CI is using an old version of IPRoute (5.5.0).
 	 */
+	SYS(fail, "ip netns exec %s ./mptcp_pm_nl_ctl limits 8 8", NS_TEST);
 	SYS(fail, "ip netns exec %s ./mptcp_pm_nl_ctl add %s flags %s", NS_TEST, ADDR_2, flags);
 
 	return 0;
-- 
2.43.0
Re: [PATCH mptcp-next] Squash to "selftests/bpf: Add mptcp subflow subtest" - set limits
Posted by Matthieu Baerts 3 months ago
Hi Geliang,

On 30/07/2024 10:24, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> Need to set limits before adding endpoints.

Why do we need to do that? Do we not have 2 subflows in these tests?
The default limits are set at 2 additional subflows, is it not enough?

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH mptcp-next] Squash to "selftests/bpf: Add mptcp subflow subtest" - set limits
Posted by Geliang Tang 3 months ago
On Tue, 2024-07-30 at 11:04 +0200, Matthieu Baerts wrote:
> Hi Geliang,
> 
> On 30/07/2024 10:24, Geliang Tang wrote:
> > From: Geliang Tang <tanggeliang@kylinos.cn>
> > 
> > Need to set limits before adding endpoints.
> 
> Why do we need to do that? Do we not have 2 subflows in these tests?
> The default limits are set at 2 additional subflows, is it not
> enough?

I thought the default value was 0. Indeed, subflows_max is set to 2 in
pm_nl_init_net(). It's enough for this test then.

Thanks,
-Geliang

> 
> Cheers,
> Matt