From: Paolo Abeni <pabeni@redhat.com>
To: mptcp@lists.linux.dev
Cc: Geliang Tang <geliangtang@gmail.com>
Subject: [PATCH v5 mptcp-next 20/21] selftests: mptcp: enable checksum in mptcp_connect.sh
Date: Tue, 4 May 2021 23:29:30 +0200 [thread overview]
Message-ID: <da4d4412aaae341d512f9e5bad1e452457e1178d.1620162984.git.pabeni@redhat.com> (raw)
In-Reply-To: <cover.1620162984.git.pabeni@redhat.com>
From: Geliang Tang <geliangtang@gmail.com>
This patch added a new argument "-C" for the mptcp_connect.sh script to
set the sysctl checksum_enabled to 1 in ns1, ns2, ns3 and ns4 to enable
the data checksum.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
tools/testing/selftests/net/mptcp/mptcp_connect.sh | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
index 9236609731b1..96cec8c2d975 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
@@ -3,7 +3,7 @@
time_start=$(date +%s)
-optstring="S:R:d:e:l:r:h4cm:f:t"
+optstring="S:R:d:e:l:r:h4cm:f:tC"
ret=0
sin=""
sout=""
@@ -22,6 +22,7 @@ sndbuf=0
rcvbuf=0
options_log=true
do_tcp=0
+checksum=false
filesize=0
if [ $tc_loss -eq 100 ];then
@@ -47,6 +48,7 @@ usage() {
echo -e "\t-R: set rcvbuf value (default: use kernel default)"
echo -e "\t-m: test mode (poll, sendfile; default: poll)"
echo -e "\t-t: also run tests with TCP (use twice to non-fallback tcp)"
+ echo -e "\t-C: enable the MPTCP data checksum"
}
while getopts "$optstring" option;do
@@ -104,6 +106,9 @@ while getopts "$optstring" option;do
"t")
do_tcp=$((do_tcp+1))
;;
+ "C")
+ checksum=true
+ ;;
"?")
usage $0
exit 1
@@ -200,6 +205,12 @@ ip -net "$ns4" route add default via dead:beef:3::2
# use TCP syn cookies, even if no flooding was detected.
ip netns exec "$ns2" sysctl -q net.ipv4.tcp_syncookies=2
+if $checksum; then
+ for i in "$ns1" "$ns2" "$ns3" "$ns4";do
+ ip netns exec $i sysctl -q net.mptcp.checksum_enabled=1
+ done
+fi
+
set_ethtool_flags() {
local ns="$1"
local dev="$2"
--
2.26.2
next prev parent reply other threads:[~2021-05-04 21:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 21:29 [PATCH v5 mptcp-next 00/21] mptcp: data checksum support Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 01/21] mptcp: generate the data checksum Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 02/21] Squash-to: "mptcp: generate the data checksum" Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 03/21] mptcp: add csum_reqd in mptcp_out_options Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 04/21] mptcp: send out checksum for MP_CAPABLE with data Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 05/21] Squash-to: "mptcp: send out checksum for MP_CAPABLE with data" Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 06/21] mptcp: send out checksum for DSS Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 07/21] Squash-to "mptcp: send out checksum for DSS" Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 08/21] mptcp: add sk parameter for mptcp_parse_option Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 09/21] mptcp: add csum_reqd in mptcp_options_received Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 10/21] mptcp: receive checksum for MP_CAPABLE with data Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 11/21] Squash-to: "mptcp: receive checksum for MP_CAPABLE with data" Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 12/21] mptcp: receive checksum for DSS Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 13/21] Squash-to: "mptcp: receive checksum for DSS" Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 14/21] mptcp: validate the data checksum Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 15/21] Squash-to: " Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 16/21] mptcp: cleanup error path in subflow_check_data_avail() Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 17/21] mptcp: tune re-injections for csum enabled mode Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 18/21] mptcp: add the mib for data checksum Paolo Abeni
2021-05-04 21:29 ` [PATCH v5 mptcp-next 19/21] mptcp: add a new sysctl checksum_enabled Paolo Abeni
2021-05-04 21:29 ` Paolo Abeni [this message]
2021-05-04 21:29 ` [PATCH v5 mptcp-next 21/21] selftests: mptcp: enable checksum in mptcp_join.sh Paolo Abeni
2021-05-04 21:41 ` [PATCH v5 mptcp-next 00/21] mptcp: data checksum support Paolo Abeni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=da4d4412aaae341d512f9e5bad1e452457e1178d.1620162984.git.pabeni@redhat.com \
--to=pabeni@redhat.com \
--cc=geliangtang@gmail.com \
--cc=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.