From: Geliang Tang <geliang.tang@suse.com>
To: Matthieu Baerts <matthieu.baerts@tessares.net>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v4 6/6] selftests: mptcp: userspace pm remove id 0 address
Date: Sun, 20 Aug 2023 20:23:44 +0800 [thread overview]
Message-ID: <20230820122344.GB13838@localhost> (raw)
In-Reply-To: <db9abb06-d74c-4e4f-bb39-380bce0b009f@tessares.net>
On Fri, Aug 18, 2023 at 11:34:00AM +0200, Matthieu Baerts wrote:
> Hi Geliang,
>
> On 18/08/2023 09:12, Geliang Tang wrote:
> > This patch adds a selftest for userpsace PM to remove id 0 address.
> >
> > A new helper userspace_pm_rm_id_0_address_ns2() is added, in it use
> >
> > ./pm_nl_ctl rem token $tk id 0
> >
> > to remove id 0 address.
> >
> > Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> > ---
> > .../testing/selftests/net/mptcp/mptcp_join.sh | 29 +++++++++++++++++++
> > 1 file changed, 29 insertions(+)
> >
> > diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > index 322adac0cb1b..1c5c0bbae38f 100755
> > --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > @@ -3336,6 +3336,14 @@ userspace_pm_rm_id_0_subflow_ns2()
> > wait_rm_sf $ns2 1
> > }
> >
> > +userspace_pm_rm_id_0_address_ns2()
> > +{
> > + local tk=$(evts_get_info token "$evts_ns2")
> > +
> > + ip netns exec $ns2 ./pm_nl_ctl rem token $tk id 0
> > + wait_rm_addr $ns2 1
> > +}
> > +
> > # $1: subflows in ns1 ; $2: subflows in ns2
> > chk_subflows()
> > {
> > @@ -3514,6 +3522,27 @@ userspace_tests()
> > kill_events_pids
> > wait $tests_pid
> > fi
> > +
> > + # userspace pm remove id 0 address
> > + if reset_with_events "userspace pm remove id 0 address" &&
> > + continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
> > + set_userspace_pm $ns2
> > + pm_nl_set_limits $ns1 0 1
> > + speed=10 \
> > + run_tests $ns1 $ns2 10.0.1.1 &
> > + local tests_pid=$!
> > + wait_mpj $ns2
> > + userspace_pm_add_sf 10.0.3.2 20
> > + chk_join_nr 1 1 1
> > + chk_mptcp_info subflows 1 subflows 1
> > + chk_subflows 2 2
> > + userspace_pm_rm_id_0_address_ns2
> > + chk_rm_nr 1 0
> > + chk_mptcp_info subflows 1 subflows 1
> > + chk_subflows 1 1
>
> When we only send a REMOVE_ADDR, why do we have one subflow that is
> being removed? Is it because the other peer disconnected the subflow
> linked to ID=0?
Yes. And remove id 0 subflow test got this "chk_subflows 1 1" too.
When closing the initial subflow in __mptcp_close_ssk(), dispose_it is
false, then tcp_disconnect is invoked. This will send a MP_RST to close
a subflow on the peer too. So chk_subflows after closing the initial
subflow is '1 1', not '2 1'.
In v5, chk_rst_nr() is added in these tests.
Thanks,
-Geliang
>
> Do you mind checking this please?
> Because the remove address command should not result in a host sending
> both a REMOVE_ADDR and a FIN. That's up to the other host to take an
> action when the REMOVE_ADDR is received, no?
>
> Cheers,
> Matt
>
> > + kill_events_pids
> > + wait $tests_pid
> > + fi
> > }
> >
> > endpoint_tests()
>
> --
> Tessares | Belgium | Hybrid Access Solutions
> www.tessares.net
prev parent reply other threads:[~2023-08-20 12:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-18 7:11 [PATCH mptcp-next v4 0/6] userspace pm remove id 0 subflow & address Geliang Tang
2023-08-18 7:12 ` [PATCH mptcp-next v4 1/6] selftests: mptcp: add evts_get_info helper Geliang Tang
2023-08-18 7:12 ` [PATCH mptcp-next v4 2/6] selftests: mptcp: userspace pm remove id 0 subflow Geliang Tang
2023-08-18 7:12 ` [PATCH mptcp-next v4 3/6] mptcp: userspace pm allow creating " Geliang Tang
2023-08-18 7:12 ` [PATCH mptcp-next v4 4/6] selftests: mptcp: userspace pm create " Geliang Tang
2023-08-18 7:12 ` [PATCH mptcp-next v4 5/6] mptcp: userspace pm remove id 0 address Geliang Tang
2023-08-18 9:30 ` Matthieu Baerts
2023-08-20 12:18 ` Geliang Tang
2023-08-18 7:12 ` [PATCH mptcp-next v4 6/6] selftests: " Geliang Tang
2023-08-18 9:34 ` Matthieu Baerts
2023-08-20 12:23 ` Geliang Tang [this message]
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=20230820122344.GB13838@localhost \
--to=geliang.tang@suse.com \
--cc=matthieu.baerts@tessares.net \
--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