MPTCP Linux Development
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>,
	Geliang Tang <geliang.tang@suse.com>,
	mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v16 3/8] Squash to "mptcp: add mptcpi_subflows_total counter"
Date: Fri, 13 Oct 2023 12:46:07 +0200	[thread overview]
Message-ID: <b7f0d827-ff8f-4348-be2b-c33e56b736ff@kernel.org> (raw)
In-Reply-To: <e3769002c1ff6139f9359413cd1ad415e593a3f2.camel@redhat.com>

Hi Paolo,

On 13/10/2023 12:32, Paolo Abeni wrote:
> Hi,
> 
> On Fri, 2023-10-13 at 13:46 +0800, Geliang Tang wrote:
>> Update __mptcp_has_initial_subflow().
>>
>> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
>> ---
>>  net/mptcp/protocol.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
>> index 6508179e94a6..1fb4ac3727c4 100644
>> --- a/net/mptcp/protocol.h
>> +++ b/net/mptcp/protocol.h
>> @@ -1081,7 +1081,7 @@ static inline bool __mptcp_has_initial_subflow(const struct mptcp_sock *msk)
>>  {
>>  	struct sock *ssk = READ_ONCE(msk->first);
>>  
>> -	return ssk && inet_sk_state_load(ssk) != TCP_CLOSE;
>> +	return ssk && inet_sk_state_load(ssk) == TCP_ESTABLISHED;
> 
> I think the above is not correct, __mptcp_has_initial_subflow() will
> return false before connect completes and/or for listener sockets.

Please note that __mptcp_has_initial_subflow() is there just to count
the number of subflows. It is being used with 'msk->pm.subflows' and it
is supposed to have the same "behaviour". Then I don't think we should
increment the subflow counter for listener sockets, no?

> You can list explicitly add the valid states with something alike:
> 
> 	(1 << inet_sk_state_load(ssk)) & (TCPF_ESTABLISHED |
> TCPF_SYN_SENT | TCPF_SYN_RECV | TCPF_LISTEN | TCPF_CLOSE_WAIT)
> 
> I'm unsure if we should include CLOSE_WAIT here: the remote has shut
> down, but this end can still send data...

Maybe better, no? As long as the behaviour is similar to the one with
'msk->pm.subflows'.

> Side important note: you are too fast :) There are a lot of in-flight
> patches, and it's difficult to follow each series consistently. I
> suggest to focus on a small subset - possibly on a single series at the
> time.
> 
> e.g. The first 2 patches in this series are IMHO ready to be merged
> [*]. If Mat could apply them, you could follow-up with the remaining
> bits of this series.

Sure, I can do that.

Regarding patch 1/8, do you think we should send that to "-net"? The
patch looks OK to me but on the other hand, it is not a big issue to
reset the initial subflow (but not ideal) if we fear regressions due to
this patch. WDYT?

> [*] modulo some expansion to the changelog of patch 1, but that could
> happen even after merging IMHO.

Indeed. But we might forget :)
So if you have any suggestions, do not hesitate to share them :-)

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

  reply	other threads:[~2023-10-13 10:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13  5:46 [PATCH mptcp-next v16 0/8] userspace pm remove id 0 subflow & address Geliang Tang
2023-10-13  5:46 ` [PATCH mptcp-next v16 1/8] mptcp: add __mptcp_subflow_disconnect helper Geliang Tang
2023-10-13  5:46 ` [PATCH mptcp-next v16 2/8] selftests: mptcp: join: no RST when rm subflow/addr Geliang Tang
2023-10-13  5:46 ` [PATCH mptcp-next v16 3/8] Squash to "mptcp: add mptcpi_subflows_total counter" Geliang Tang
2023-10-13 10:32   ` Paolo Abeni
2023-10-13 10:46     ` Matthieu Baerts [this message]
2023-10-13 15:35       ` Paolo Abeni
2023-10-16 11:53         ` Matthieu Baerts
2023-10-16 13:50           ` Paolo Abeni
2023-10-16 20:26             ` Matthieu Baerts
2023-10-13  5:46 ` [PATCH mptcp-next v16 4/8] Squash to "selftests: mptcp: add chk_subflows_total helper" Geliang Tang
2023-10-13  5:46 ` [PATCH mptcp-next v16 5/8] selftests: mptcp: userspace pm remove initial subflow Geliang Tang
2023-10-13  5:46 ` [PATCH mptcp-next v16 6/8] mptcp: userspace pm send RM_ADDR for ID 0 Geliang Tang
2023-10-13  5:46 ` [PATCH mptcp-next v16 7/8] mptcp: userspace pm rename remove_err to out Geliang Tang
2023-10-13  5:46 ` [PATCH mptcp-next v16 8/8] selftests: mptcp: userspace pm send RM_ADDR for ID 0 Geliang Tang
2023-10-13  6:57   ` selftests: mptcp: userspace pm send RM_ADDR for ID 0: Tests Results MPTCP CI
2023-10-13 10:18   ` MPTCP CI
2023-10-13  8:31 ` [PATCH mptcp-next v16 0/8] userspace pm remove id 0 subflow & address Matthieu Baerts
2023-10-13  9:36   ` Matthieu Baerts
2023-10-13 11:30     ` Geliang Tang
2023-10-13 11:54       ` 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=b7f0d827-ff8f-4348-be2b-c33e56b736ff@kernel.org \
    --to=matttbe@kernel.org \
    --cc=geliang.tang@suse.com \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.com \
    /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