two tc related patches
Subsystems (3)
Geliang Tang
reviewercover two tc related patches
From: Geliang Tang <[email protected]>
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(-)
Signature · 1 line
2.40.1
Geliang Tang
reviewerPATCH 1/2 selftests: mptcp: add tc check for check_tools
From: Geliang Tang <[email protected]>
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.
--- 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(-)
tools/testing/selftests/net/mptcp/mptcp_connect.sh +1 -1
@@ -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)
tools/testing/selftests/net/mptcp/mptcp_join.sh +1 -1
@@ -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)
tools/testing/selftests/net/mptcp/mptcp_lib.sh +6 -0
@@ -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"
tools/testing/selftests/net/mptcp/simult_flows.sh +1 -1
@@ -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
Signature · 1 line
2.40.1
Geliang Tang
reviewerPATCH 2/2 selftests: mptcp: add ms units for tc-netem delay
In reply to Geliang TangFrom: Geliang Tang <[email protected]>
'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.
--- 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(-)
tools/testing/selftests/net/mptcp/mptcp_join.sh +3 -3
@@ -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
tools/testing/selftests/net/mptcp/simult_flows.sh +2 -2
@@ -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
Signature · 1 line
2.40.1
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-normalFor 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)
Hi Geliang,
Quoted 7 lines · Geliang Tang
From: Geliang Tang <[email protected]>
Two tc related patches.
Geliang Tang (2):
selftests: mptcp: add tc check forcheck_tools
selftests: mptcp: add ms units for tc-netem delay
Thank you, it looks good to me:
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Matthieu Baerts
maintainerHi Geliang,
Quoted 7 lines · Matthieu Baerts
Hi Geliang,
Quoted 4 lines · Geliang Tang
From: Geliang Tang <[email protected]>
Two tc related patches.
Quoted 7 lines
Quoted 3 lines
Geliang Tang (2):
selftests: mptcp: add tc check forcheck_tools
selftests: mptcp: add ms units for tc-netem delayThank you, it looks good to me:
Reviewed-by Matthieu Baerts (NGI0) <[email protected]>
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:
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.