From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-net v2 7/9] selftests: mptcp: join: check backup support in signal endp
Date: Thu, 18 Jul 2024 13:15:00 +0200 [thread overview]
Message-ID: <3302c193-7820-401b-b55b-e1aca11b3585@kernel.org> (raw)
In-Reply-To: <59cdfb0ae86ea0f2e45c2fecbe0a0ceb7848a1f6.camel@kernel.org>
On 17/07/2024 06:39, Geliang Tang wrote:
> On Tue, 2024-07-16 at 22:53 +0200, Matthieu Baerts (NGI0) wrote:
>> Before the previous commit, 'signal' endpoints with the 'backup' flag
>> were ignored when sending the MP_JOIN.
>>
>> The MPTCP Join selftest has then been modified to validate this case:
>> the "single address, backup" test, is now validating the MP_JOIN with
>> a
>> backup flag as it is what we expect it to do with such name. The
>> previous version has been kept, but renamed to "single address,
>> switch
>> to backup" to avoid confusions.
>>
>> The "single address with port, backup" test is also now validating
>> the
>> MPJ with a backup flag, which makes more sense than checking the
>> switch
>> to backup with an MP_PRIO.
>>
>> The "mpc backup both sides" test is now validating that the backup
>> flag
>> is also set in MP_JOIN from and to the addresses used in the initial
>> subflow, using the special ID 0.
>>
>> The 'Fixes' tag here below is the same as the one from the previous
>> commit: this patch here is not fixing anything wrong in the
>> selftests,
>> but it validates the previous fix for an issue introduced by this
>> commit
>> ID.
>>
>> Fixes: 4596a2c1b7f5 ("mptcp: allow creating non-backup subflows")
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
>> ---
>> Notes:
>> - v2:
>> - Also validating MPJ to/from ID0 with backup
>> ---
>> tools/testing/selftests/net/mptcp/mptcp_join.sh | 34
>> ++++++++++++++++++++-----
>> 1 file changed, 28 insertions(+), 6 deletions(-)
>>
>> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh
>> b/tools/testing/selftests/net/mptcp/mptcp_join.sh
>> index 175127a9c00c..ffcf558b4610 100755
>> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
>> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
>> @@ -2639,6 +2639,19 @@ backup_tests()
>>
>> # single address, backup
>> if reset "single address, backup" &&
>> + continue_if mptcp_lib_kallsyms_has
>> "subflow_rebuild_header$"; then
>> + pm_nl_set_limits $ns1 0 1
>> + pm_nl_add_endpoint $ns1 10.0.2.1 flags signal,backup
>> + pm_nl_set_limits $ns2 1 1
>> + sflags=nobackup speed=slow \
>> + run_tests $ns1 $ns2 10.0.1.1
>> + chk_join_nr 1 1 1
>> + chk_add_nr 1 1
>> + chk_prio_nr 1 0 0 1
>> + fi
>> +
>> + # single address, switch to backup
>> + if reset "single address, switch to backup" &&
>> continue_if mptcp_lib_kallsyms_has
>> "subflow_rebuild_header$"; then
>> pm_nl_set_limits $ns1 0 1
>> pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
>> @@ -2654,13 +2667,13 @@ backup_tests()
>
> '''
>> if reset "single address with port, backup" &&
>> continue_if mptcp_lib_kallsyms_has
>> "subflow_rebuild_header$"; then
>> pm_nl_set_limits $ns1 0 1
>> - pm_nl_add_endpoint $ns1 10.0.2.1 flags signal port
>> 10100
>> + pm_nl_add_endpoint $ns1 10.0.2.1 flags signal,backup
>> port 10100
>> pm_nl_set_limits $ns2 1 1
>> - sflags=backup speed=slow \
>> + sflags=nobackup speed=slow \
>> run_tests $ns1 $ns2 10.0.1.1
>> chk_join_nr 1 1 1
>> chk_add_nr 1 1
>> - chk_prio_nr 1 1 0 0
>> + chk_prio_nr 1 0 0 1
>> fi
> '''
>
> How about keep this block unchanged. "nobackup" is already tested in
> the above newly added test "single address, backup"? They are almost
> the same now.
The switch from 'nobackup' to 'backup' during the connection is also
tested just before, in "single address, switch to backup".
I think it makes more sense to validate the cases where the endpoints
are set with the backup flag before establishing connections: that
sounds like the most common use-cases. I guess people don't play with
the 'endpoint change (no)backup' option that often, no?
Supporting the switch of the backup flag for existing connections seems
like a nice to have feature to me, but not the main one related to the
backup case. So I think we should reflect that in our test suite. (And
still, we validate the switch here, but now we also check that the flag
is correctly set in the most common cases).
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2024-07-18 11:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-16 20:53 [PATCH mptcp-net v2 0/9] mptcp: fix inconsistent backup usage Matthieu Baerts (NGI0)
2024-07-16 20:53 ` [PATCH mptcp-net v2 1/9] mptcp: sched: check both directions for backup Matthieu Baerts (NGI0)
2024-07-17 4:25 ` Geliang Tang
2024-07-18 11:00 ` Matthieu Baerts
2024-07-16 20:53 ` [PATCH mptcp-net v2 2/9] mptcp: distinguish rcv vs sent backup flag in requests Matthieu Baerts (NGI0)
2024-07-16 20:53 ` [PATCH mptcp-net v2 3/9] mptcp: pm: only set request_bkup flag when sending MP_PRIO Matthieu Baerts (NGI0)
2024-07-16 20:53 ` [PATCH mptcp-net v2 4/9] mptcp: mib: count MPJ with backup flag Matthieu Baerts (NGI0)
2024-07-16 20:53 ` [PATCH mptcp-net v2 5/9] selftests: mptcp: join: validate backup in MPJ Matthieu Baerts (NGI0)
2024-07-17 1:25 ` Geliang Tang
2024-07-18 11:09 ` Matthieu Baerts
2024-07-16 20:53 ` [PATCH mptcp-net v2 6/9] mptcp: pm: fix backup support in signal endpoints Matthieu Baerts (NGI0)
2024-07-17 3:04 ` Geliang Tang
2024-07-18 15:11 ` Matthieu Baerts
2024-07-16 20:53 ` [PATCH mptcp-net v2 7/9] selftests: mptcp: join: check backup support in signal endp Matthieu Baerts (NGI0)
2024-07-17 4:39 ` Geliang Tang
2024-07-18 11:15 ` Matthieu Baerts [this message]
2024-07-16 20:53 ` [PATCH mptcp-net v2 8/9] Squash to "selftests/bpf: Add bpf_bkup scheduler & test" Matthieu Baerts (NGI0)
2024-07-16 20:53 ` [PATCH mptcp-net v2 9/9] Squash to "selftests/bpf: Add bpf_burst " Matthieu Baerts (NGI0)
2024-07-16 21:45 ` [PATCH mptcp-net v2 0/9] mptcp: fix inconsistent backup usage MPTCP CI
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=3302c193-7820-401b-b55b-e1aca11b3585@kernel.org \
--to=matttbe@kernel.org \
--cc=geliang@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 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.