.../selftests/net/mptcp/mptcp_connect.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
This patch added the data checksum error mib counters check for the
script mptcp_connect.sh when the data checksum is enabled.
In do_transfer(), got the mib counters twice, before and after running
the mptcp_connect commands. The latter minus the former is the actual
number of the data checksum mib counter.
The output looks like this:
ns1 MPTCP -> ns2 (dead:beef:1::2:10007) MPTCP (duration 86ms) [ OK ]
ns1 MPTCP -> ns2 (10.0.2.1:10008 ) MPTCP (duration 66ms) [ FAIL ]
server got 1 data checksum error[s]
Fixes: 94d66ba1d8e48 ("selftests: mptcp: enable checksum in mptcp_connect.sh")
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
v2:
- get mib counters twice.
- Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/255
---
.../selftests/net/mptcp/mptcp_connect.sh | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
index cb5809b89081..5b7a40d73253 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
@@ -432,6 +432,8 @@ do_transfer()
local stat_ackrx_last_l=$(get_mib_counter "${listener_ns}" "MPTcpExtMPCapableACKRX")
local stat_cookietx_last=$(get_mib_counter "${listener_ns}" "TcpExtSyncookiesSent")
local stat_cookierx_last=$(get_mib_counter "${listener_ns}" "TcpExtSyncookiesRecv")
+ local stat_csum_err_s=$(get_mib_counter "${listener_ns}" "MPTcpExtDataCsumErr")
+ local stat_csum_err_c=$(get_mib_counter "${connector_ns}" "MPTcpExtDataCsumErr")
timeout ${timeout_test} \
ip netns exec ${listener_ns} \
@@ -524,6 +526,23 @@ do_transfer()
fi
fi
+ if $checksum; then
+ local csum_err_s=$(get_mib_counter "${listener_ns}" "MPTcpExtDataCsumErr")
+ local csum_err_c=$(get_mib_counter "${connector_ns}" "MPTcpExtDataCsumErr")
+
+ local csum_err_s_nr=$((csum_err_s - stat_csum_err_s))
+ if [ $csum_err_s_nr -gt 0 ]; then
+ printf "[ FAIL ]\nserver got $csum_err_s_nr data checksum error[s]"
+ rets=1
+ fi
+
+ local csum_err_c_nr=$((csum_err_c - stat_csum_err_c))
+ if [ $csum_err_c_nr -gt 0 ]; then
+ printf "[ FAIL ]\nclient got $csum_err_c_nr data checksum error[s]"
+ retc=1
+ fi
+ fi
+
if [ $retc -eq 0 ] && [ $rets -eq 0 ]; then
printf "[ OK ]"
fi
--
2.34.1
On Sun, 13 Feb 2022, Geliang Tang wrote: > This patch added the data checksum error mib counters check for the > script mptcp_connect.sh when the data checksum is enabled. > > In do_transfer(), got the mib counters twice, before and after running > the mptcp_connect commands. The latter minus the former is the actual > number of the data checksum mib counter. > > The output looks like this: > > ns1 MPTCP -> ns2 (dead:beef:1::2:10007) MPTCP (duration 86ms) [ OK ] > ns1 MPTCP -> ns2 (10.0.2.1:10008 ) MPTCP (duration 66ms) [ FAIL ] > server got 1 data checksum error[s] > > Fixes: 94d66ba1d8e48 ("selftests: mptcp: enable checksum in mptcp_connect.sh") > Signed-off-by: Geliang Tang <geliang.tang@suse.com> > --- > v2: > - get mib counters twice. > - Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/255 Looks good to me. Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> > --- > .../selftests/net/mptcp/mptcp_connect.sh | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh > index cb5809b89081..5b7a40d73253 100755 > --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh > +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh > @@ -432,6 +432,8 @@ do_transfer() > local stat_ackrx_last_l=$(get_mib_counter "${listener_ns}" "MPTcpExtMPCapableACKRX") > local stat_cookietx_last=$(get_mib_counter "${listener_ns}" "TcpExtSyncookiesSent") > local stat_cookierx_last=$(get_mib_counter "${listener_ns}" "TcpExtSyncookiesRecv") > + local stat_csum_err_s=$(get_mib_counter "${listener_ns}" "MPTcpExtDataCsumErr") > + local stat_csum_err_c=$(get_mib_counter "${connector_ns}" "MPTcpExtDataCsumErr") > > timeout ${timeout_test} \ > ip netns exec ${listener_ns} \ > @@ -524,6 +526,23 @@ do_transfer() > fi > fi > > + if $checksum; then > + local csum_err_s=$(get_mib_counter "${listener_ns}" "MPTcpExtDataCsumErr") > + local csum_err_c=$(get_mib_counter "${connector_ns}" "MPTcpExtDataCsumErr") > + > + local csum_err_s_nr=$((csum_err_s - stat_csum_err_s)) > + if [ $csum_err_s_nr -gt 0 ]; then > + printf "[ FAIL ]\nserver got $csum_err_s_nr data checksum error[s]" > + rets=1 > + fi > + > + local csum_err_c_nr=$((csum_err_c - stat_csum_err_c)) > + if [ $csum_err_c_nr -gt 0 ]; then > + printf "[ FAIL ]\nclient got $csum_err_c_nr data checksum error[s]" > + retc=1 > + fi > + fi > + > if [ $retc -eq 0 ] && [ $rets -eq 0 ]; then > printf "[ OK ]" > fi > -- > 2.34.1 > > > -- Mat Martineau Intel
Hi Geliang, Mat, On 13/02/2022 15:38, Geliang Tang wrote: > This patch added the data checksum error mib counters check for the > script mptcp_connect.sh when the data checksum is enabled. > > In do_transfer(), got the mib counters twice, before and after running > the mptcp_connect commands. The latter minus the former is the actual > number of the data checksum mib counter. > > The output looks like this: > > ns1 MPTCP -> ns2 (dead:beef:1::2:10007) MPTCP (duration 86ms) [ OK ] > ns1 MPTCP -> ns2 (10.0.2.1:10008 ) MPTCP (duration 66ms) [ FAIL ] > server got 1 data checksum error[s] > > Fixes: 94d66ba1d8e48 ("selftests: mptcp: enable checksum in mptcp_connect.sh") > Signed-off-by: Geliang Tang <geliang.tang@suse.com> > --- > v2: > - get mib counters twice. > - Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/255 I added this tag in the commit message. Please tell me if it was not fixing this issue. Thank you for the patch and the review! Now in our tree -- feat. for net-next but I guess it could be sent to -net, no? -- with Mat's RvB tag: - 8cf6b18d75cd: selftests: mptcp: add csum mib check for mptcp_connect - Results: 7cf2ef8f7b27..49fef9d3e44a Builds and tests are now in progress: https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220215T095400 https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export Cheers, Matt -- Tessares | Belgium | Hybrid Access Solutions www.tessares.net
© 2016 - 2024 Red Hat, Inc.