All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-next 0/2] two tc related patches
@ 2024-03-13  3:13 Geliang Tang
  2024-03-13  3:13 ` [PATCH mptcp-next 1/2] selftests: mptcp: add tc check for check_tools Geliang Tang
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Geliang Tang @ 2024-03-13  3:13 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

From: Geliang Tang <tanggeliang@kylinos.cn>

Two tc related patches.

Geliang Tang (2):
  selftests: mptcp: add tc check for check_tools
  selftests: mptcp: add ms units for tc-netem delay

 tools/testing/selftests/net/mptcp/mptcp_connect.sh | 2 +-
 tools/testing/selftests/net/mptcp/mptcp_join.sh    | 8 ++++----
 tools/testing/selftests/net/mptcp/mptcp_lib.sh     | 6 ++++++
 tools/testing/selftests/net/mptcp/simult_flows.sh  | 6 +++---
 4 files changed, 14 insertions(+), 8 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH mptcp-next 1/2] selftests: mptcp: add tc check for check_tools
  2024-03-13  3:13 [PATCH mptcp-next 0/2] two tc related patches Geliang Tang
@ 2024-03-13  3:13 ` Geliang Tang
  2024-03-13  3:13 ` [PATCH mptcp-next 2/2] selftests: mptcp: add ms units for tc-netem delay Geliang Tang
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Geliang Tang @ 2024-03-13  3:13 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

From: Geliang Tang <tanggeliang@kylinos.cn>

tc are used in some test scripts: mptcp_connect.sh, mptcp_join.sh and
simult_flows.sh. It makes sense to check if tc is installed before running
these scripts, just like other tools. So this patch add 'tc' check for
mptcp_lib_check_tools(), and check it in these test scripts.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
 tools/testing/selftests/net/mptcp/mptcp_connect.sh | 2 +-
 tools/testing/selftests/net/mptcp/mptcp_join.sh    | 2 +-
 tools/testing/selftests/net/mptcp/mptcp_lib.sh     | 6 ++++++
 tools/testing/selftests/net/mptcp/simult_flows.sh  | 2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
index 4c4248554826..90c1c5c9caca 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
@@ -147,7 +147,7 @@ cleanup()
 
 mptcp_lib_check_mptcp
 mptcp_lib_check_kallsyms
-mptcp_lib_check_tools ip
+mptcp_lib_check_tools ip tc
 
 sin=$(mktemp)
 sout=$(mktemp)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 5e9211e89825..8f95e730f4e1 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -142,7 +142,7 @@ init() {
 
 	mptcp_lib_check_mptcp
 	mptcp_lib_check_kallsyms
-	mptcp_lib_check_tools ip ss "${iptables}" "${ip6tables}"
+	mptcp_lib_check_tools ip tc ss "${iptables}" "${ip6tables}"
 
 	sin=$(mktemp)
 	sout=$(mktemp)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
index d529b4b37af8..1fa05405f65e 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
@@ -384,6 +384,12 @@ mptcp_lib_check_tools() {
 				exit ${KSFT_SKIP}
 			fi
 			;;
+		"tc")
+			if ! tc -help &> /dev/null; then
+				mptcp_lib_pr_skip "Could not run test without tc tool"
+				exit ${KSFT_SKIP}
+			fi
+			;;
 		"ss")
 			if ! ss -h | grep -q MPTCP; then
 				mptcp_lib_pr_skip "ss tool does not support MPTCP"
diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh
index 68ee92eccccb..72ea563c923c 100755
--- a/tools/testing/selftests/net/mptcp/simult_flows.sh
+++ b/tools/testing/selftests/net/mptcp/simult_flows.sh
@@ -45,7 +45,7 @@ cleanup()
 }
 
 mptcp_lib_check_mptcp
-mptcp_lib_check_tools ip
+mptcp_lib_check_tools ip tc
 
 #  "$ns1"              ns2                    ns3
 #     ns1eth1    ns2eth1   ns2eth3      ns3eth1
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH mptcp-next 2/2] selftests: mptcp: add ms units for tc-netem delay
  2024-03-13  3:13 [PATCH mptcp-next 0/2] two tc related patches Geliang Tang
  2024-03-13  3:13 ` [PATCH mptcp-next 1/2] selftests: mptcp: add tc check for check_tools Geliang Tang
@ 2024-03-13  3:13 ` Geliang Tang
  2024-03-13  4:11 ` [mptcp-next,0/2] two tc related patches MPTCP CI
  2024-03-13 10:15 ` [PATCH mptcp-next 0/2] " Matthieu Baerts
  3 siblings, 0 replies; 6+ messages in thread
From: Geliang Tang @ 2024-03-13  3:13 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

From: Geliang Tang <tanggeliang@kylinos.cn>

'delay 1' in tc-netem is confusing, not sure if it's a delay of 1 second or
1 millisecond. This patch explicitly adds millisecond units to make these
commands clearer.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh   | 6 +++---
 tools/testing/selftests/net/mptcp/simult_flows.sh | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 8f95e730f4e1..70621cbbab09 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -125,8 +125,8 @@ init_shapers()
 {
 	local i
 	for i in $(seq 1 4); do
-		tc -n $ns1 qdisc add dev ns1eth$i root netem rate 20mbit delay 1
-		tc -n $ns2 qdisc add dev ns2eth$i root netem rate 20mbit delay 1
+		tc -n $ns1 qdisc add dev ns1eth$i root netem rate 20mbit delay 1ms
+		tc -n $ns2 qdisc add dev ns2eth$i root netem rate 20mbit delay 1ms
 	done
 }
 
@@ -3212,7 +3212,7 @@ fail_tests()
 
 	# multiple subflows
 	if reset_with_fail "MP_FAIL MP_RST" 2; then
-		tc -n $ns2 qdisc add dev ns2eth1 root netem rate 1mbit delay 5
+		tc -n $ns2 qdisc add dev ns2eth1 root netem rate 1mbit delay 5ms
 		pm_nl_set_limits $ns1 0 1
 		pm_nl_set_limits $ns2 0 1
 		pm_nl_add_endpoint $ns2 10.0.2.2 dev ns2eth2 flags subflow
diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh
index 72ea563c923c..e129fcb5a598 100755
--- a/tools/testing/selftests/net/mptcp/simult_flows.sh
+++ b/tools/testing/selftests/net/mptcp/simult_flows.sh
@@ -216,8 +216,8 @@ run_test()
 	shift 4
 	local msg=$*
 
-	[ $delay1 -gt 0 ] && delay1="delay $delay1" || delay1=""
-	[ $delay2 -gt 0 ] && delay2="delay $delay2" || delay2=""
+	[ $delay1 -gt 0 ] && delay1="delay ${delay1}ms" || delay1=""
+	[ $delay2 -gt 0 ] && delay2="delay ${delay2}ms" || delay2=""
 
 	for dev in ns1eth1 ns1eth2; do
 		tc -n $ns1 qdisc del dev $dev root >/dev/null 2>&1
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [mptcp-next,0/2] two tc related patches
  2024-03-13  3:13 [PATCH mptcp-next 0/2] two tc related patches Geliang Tang
  2024-03-13  3:13 ` [PATCH mptcp-next 1/2] selftests: mptcp: add tc check for check_tools Geliang Tang
  2024-03-13  3:13 ` [PATCH mptcp-next 2/2] selftests: mptcp: add ms units for tc-netem delay Geliang Tang
@ 2024-03-13  4:11 ` MPTCP CI
  2024-03-13 10:15 ` [PATCH mptcp-next 0/2] " Matthieu Baerts
  3 siblings, 0 replies; 6+ messages in thread
From: MPTCP CI @ 2024-03-13  4:11 UTC (permalink / raw)
  To: Geliang Tang; +Cc: mptcp

Hi Geliang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Success! ✅
- KVM Validation: btf (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/8259068044

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/cd3741dc2965
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=834831


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH mptcp-next 0/2] two tc related patches
  2024-03-13  3:13 [PATCH mptcp-next 0/2] two tc related patches Geliang Tang
                   ` (2 preceding siblings ...)
  2024-03-13  4:11 ` [mptcp-next,0/2] two tc related patches MPTCP CI
@ 2024-03-13 10:15 ` Matthieu Baerts
  2024-03-13 11:03   ` Matthieu Baerts
  3 siblings, 1 reply; 6+ messages in thread
From: Matthieu Baerts @ 2024-03-13 10:15 UTC (permalink / raw)
  To: Geliang Tang, mptcp; +Cc: Geliang Tang

Hi Geliang,

On 13/03/2024 04:13, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> Two tc related patches.
> 
> Geliang Tang (2):
>   selftests: mptcp: add tc check for check_tools
>   selftests: mptcp: add ms units for tc-netem delay

Thank you, it looks good to me:

Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH mptcp-next 0/2] two tc related patches
  2024-03-13 10:15 ` [PATCH mptcp-next 0/2] " Matthieu Baerts
@ 2024-03-13 11:03   ` Matthieu Baerts
  0 siblings, 0 replies; 6+ messages in thread
From: Matthieu Baerts @ 2024-03-13 11:03 UTC (permalink / raw)
  To: Geliang Tang, mptcp; +Cc: Geliang Tang

Hi Geliang,

On 13/03/2024 11:15, Matthieu Baerts wrote:
> Hi Geliang,
> 
> On 13/03/2024 04:13, Geliang Tang wrote:
>> From: Geliang Tang <tanggeliang@kylinos.cn>
>>
>> Two tc related patches.
>>
>> Geliang Tang (2):
>>   selftests: mptcp: add tc check for check_tools
>>   selftests: mptcp: add ms units for tc-netem delay
> 
> Thank you, it looks good to me:
> 
> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

Now in our tree (feat. for next):

New patches for t/upstream:
- 4daabed4354a: selftests: mptcp: add tc check for check_tools
- 3b184258a310: selftests: mptcp: add ms units for tc-netem delay
- Results: 02195e22026a..e2c5d9481519 (export)

Tests are now in progress:

- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/5f3aa05a0186bfbf6f4d4feeb99657c756a6f456/checks

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-13 11:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-13  3:13 [PATCH mptcp-next 0/2] two tc related patches Geliang Tang
2024-03-13  3:13 ` [PATCH mptcp-next 1/2] selftests: mptcp: add tc check for check_tools Geliang Tang
2024-03-13  3:13 ` [PATCH mptcp-next 2/2] selftests: mptcp: add ms units for tc-netem delay Geliang Tang
2024-03-13  4:11 ` [mptcp-next,0/2] two tc related patches MPTCP CI
2024-03-13 10:15 ` [PATCH mptcp-next 0/2] " Matthieu Baerts
2024-03-13 11:03   ` Matthieu Baerts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.