From: Geliang Tang <geliang@kernel.org>
To: Matthieu Baerts <matttbe@kernel.org>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next 1/2] Squash to "selftests: mptcp: connect: add dedicated port counter"
Date: Thu, 7 Mar 2024 18:03:25 +0800 [thread overview]
Message-ID: <ZemQ7eI8ZT4fMGOB@t480> (raw)
In-Reply-To: <ef4e2d4d-4de1-4d56-b92d-3fb2602e2e8e@kernel.org>
Hi Matt,
On Thu, Mar 07, 2024 at 10:25:44AM +0100, Matthieu Baerts wrote:
> Hi Geliang,
>
> On 07/03/2024 02:14, Geliang Tang wrote:
> > From: Geliang Tang <tanggeliang@kylinos.cn>
> >
> > Move port++ from the beginning of do_transfer to the end of it, then
> > 9999 can be set to 10000, the same as 19999.
>
> I initially wanted to do that, but...
>
> > Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> > ---
> > tools/testing/selftests/net/mptcp/mptcp_connect.sh | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> > index 5942256857a5..8feb4eef0931 100755
> > --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> > +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> > @@ -33,7 +33,7 @@ do_tcp=0
> > checksum=false
> > filesize=0
> > connect_per_transfer=1
> > -port=$((10000 - 1))
> > +port=10000
> >
> > if [ $tc_loss -eq 100 ];then
> > tc_loss=1%
> > @@ -320,8 +320,6 @@ do_transfer()
> > local local_addr="$6"
> > local extra_args="$7"
> >
> > - port=$((port + 1))
> > -
> > if [ "$rcvbuf" -gt 0 ]; then
> > extra_args+=" -R $rcvbuf"
> > fi
> > @@ -446,6 +444,8 @@ do_transfer()
> > return 1
>
> ... the counter will not be incremented in case of failure.
Yes, let's drop this patch.
Thanks,
-Geliang
>
> To avoid incrementing the counter from different places, I found it
> safer to start it one off the first one. We can still see it's 10000.
>
> > fi
> >
> > + port=$((port+1))
>
> (it is not really the end of the function :) )
>
> > +
> > mptcp_lib_check_transfer $sin $cout "file received by client"
> > retc=$?
> > mptcp_lib_check_transfer $cin $sout "file received by server"
> > @@ -719,7 +719,7 @@ EOF
> >
> > mptcp_lib_pr_info "test $msg"
> >
> > - port=$((20000 - 1))
> > + port=20000
> > local extra_args="-o TRANSPARENT"
> > do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP \
> > ${connect_addr} ${local_addr} "${extra_args}"
>
> Cheers,
> Matt
> --
> Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2024-03-07 10:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 1:14 [PATCH mptcp-next 0/2] squash-to patches for "add helpers in mptcp_lib.sh" Geliang Tang
2024-03-07 1:14 ` [PATCH mptcp-next 1/2] Squash to "selftests: mptcp: connect: add dedicated port counter" Geliang Tang
2024-03-07 9:25 ` Matthieu Baerts
2024-03-07 10:03 ` Geliang Tang [this message]
2024-03-07 1:14 ` [PATCH mptcp-next 2/2] Squash to "selftests: mptcp: connect: use += operator to append strings" Geliang Tang
2024-03-07 2:04 ` Squash to "selftests: mptcp: connect: use += operator to append strings": Tests Results MPTCP CI
2024-03-07 3:29 ` MPTCP CI
2024-03-07 9:42 ` [PATCH mptcp-next 2/2] Squash to "selftests: mptcp: connect: use += operator to append strings" Matthieu Baerts
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=ZemQ7eI8ZT4fMGOB@t480 \
--to=geliang@kernel.org \
--cc=matttbe@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox