All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Cc: mptcp@lists.linux.dev, Mat Martineau <martineau@kernel.org>,
	Geliang Tang <geliang@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Florian Westphal <fw@strlen.de>,
	Kishen Maloor <kishen.maloor@intel.com>,
	Shuah Khan <shuah@kernel.org>,
	Peter Krystad <peter.krystad@linux.intel.com>,
	Christoph Paasch <cpaasch@apple.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net 05/10] mptcp: fix snd_wnd initialization for passive socket: manual merge
Date: Fri, 23 Feb 2024 17:35:30 +0100	[thread overview]
Message-ID: <0585f8a1-e0ca-483d-a21f-20617192cb28@kernel.org> (raw)
In-Reply-To: <20240223-upstream-net-20240223-misc-fixes-v1-5-162e87e48497@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]

Hi Jakub, Paolo, Stephen,

On 23/02/2024 5:14 pm, Matthieu Baerts (NGI0) wrote:
> From: Paolo Abeni <pabeni@redhat.com>
> 
> Such value should be inherited from the first subflow, but
> passive sockets always used 'rsk_rcv_wnd'.
> 
> Fixes: 6f8a612a33e4 ("mptcp: keep track of advertised windows right edge")
> Cc: stable@vger.kernel.org
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> Reviewed-by: Mat Martineau <martineau@kernel.org>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
>  net/mptcp/protocol.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 442fa7d9b57a..2c8f931c6d5b 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -3211,7 +3211,7 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk,
>  	msk->write_seq = subflow_req->idsn + 1;
>  	msk->snd_nxt = msk->write_seq;
>  	msk->snd_una = msk->write_seq;
> -	msk->wnd_end = msk->snd_nxt + req->rsk_rcv_wnd;
> +	msk->wnd_end = msk->snd_nxt + tcp_sk(ssk)->snd_wnd;

Please note that this patch will conflict with the following commit from
net-next:

  3f83d8a77eee ("mptcp: fix more tx path fields initialization")

That's because this commit modifies the same line as the one modified
here. We cannot avoid a conflict here. To fix it, please use
'WRITE_ONCE()' with the new line from -net:

  WRITE_ONCE(msk->wnd_end, msk->snd_nxt + tcp_sk(ssk)->snd_wnd);

A 3-way diff has been attached to this email.

>  	msk->setsockopt_seq = mptcp_sk(sk)->setsockopt_seq;
>  	mptcp_init_sched(msk, mptcp_sk(sk)->sched);
>  
> 

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.

[-- Attachment #2: conflict-mptcp-fix-more-tx-path-fields-initialization.diff --]
[-- Type: text/x-patch, Size: 1322 bytes --]

diff --cc net/mptcp/protocol.c
index 7833a49f6214,9df4eaddfd48..000000000000
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@@ -3242,25 -3204,18 +3247,25 @@@ struct sock *mptcp_sk_clone_init(const 
  
  	__mptcp_init_sock(nsk);
  
 +#if IS_ENABLED(CONFIG_MPTCP_IPV6)
 +	if (nsk->sk_family == AF_INET6)
 +		mptcp_copy_ip6_options(nsk, sk);
 +	else
 +#endif
 +		mptcp_copy_ip_options(nsk, sk);
 +
  	msk = mptcp_sk(nsk);
- 	msk->local_key = subflow_req->local_key;
- 	msk->token = subflow_req->token;
+ 	WRITE_ONCE(msk->local_key, subflow_req->local_key);
+ 	WRITE_ONCE(msk->token, subflow_req->token);
  	msk->in_accept_queue = 1;
  	WRITE_ONCE(msk->fully_established, false);
  	if (mp_opt->suboptions & OPTION_MPTCP_CSUMREQD)
  		WRITE_ONCE(msk->csum_enabled, true);
  
- 	msk->write_seq = subflow_req->idsn + 1;
- 	msk->snd_nxt = msk->write_seq;
- 	msk->snd_una = msk->write_seq;
- 	msk->wnd_end = msk->snd_nxt + tcp_sk(ssk)->snd_wnd;
+ 	WRITE_ONCE(msk->write_seq, subflow_req->idsn + 1);
+ 	WRITE_ONCE(msk->snd_nxt, msk->write_seq);
+ 	WRITE_ONCE(msk->snd_una, msk->write_seq);
 -	WRITE_ONCE(msk->wnd_end, msk->snd_nxt + req->rsk_rcv_wnd);
++	WRITE_ONCE(msk->wnd_end, msk->snd_nxt + tcp_sk(ssk)->snd_wnd);
  	msk->setsockopt_seq = mptcp_sk(sk)->setsockopt_seq;
  	mptcp_init_sched(msk, mptcp_sk(sk)->sched);
  

  reply	other threads:[~2024-02-23 16:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23 16:14 [PATCH net 00/10] mptcp: more misc. fixes for v6.8 Matthieu Baerts (NGI0)
2024-02-23 16:14 ` [PATCH net 01/10] mptcp: map v4 address to v6 when destroying subflow Matthieu Baerts (NGI0)
2024-02-23 16:14 ` [PATCH net 02/10] selftests: mptcp: rm subflow with v4/v4mapped addr Matthieu Baerts (NGI0)
2024-02-23 16:14 ` [PATCH net 03/10] mptcp: avoid printing warning once on client side Matthieu Baerts (NGI0)
2024-02-23 16:14 ` [PATCH net 04/10] mptcp: push at DSS boundaries Matthieu Baerts (NGI0)
2024-02-23 16:14 ` [PATCH net 05/10] mptcp: fix snd_wnd initialization for passive socket Matthieu Baerts (NGI0)
2024-02-23 16:35   ` Matthieu Baerts [this message]
2024-02-23 16:14 ` [PATCH net 06/10] mptcp: fix potential wake-up event loss Matthieu Baerts (NGI0)
2024-02-23 16:14 ` [PATCH net 07/10] selftests: mptcp: join: add ss mptcp support check Matthieu Baerts (NGI0)
2024-02-23 16:14 ` [PATCH net 08/10] mptcp: fix double-free on socket dismantle Matthieu Baerts (NGI0)
2024-02-23 16:14 ` [PATCH net 09/10] mptcp: fix possible deadlock in subflow diag Matthieu Baerts (NGI0)
2024-02-23 16:14 ` [PATCH net 10/10] selftests: mptcp: explicitly trigger the listener diag code-path Matthieu Baerts (NGI0)
2024-02-26 17:58   ` Simon Horman
2024-03-01 14:37   ` Jakub Kicinski
2024-03-01 15:10     ` Matthieu Baerts
2024-03-01 18:24       ` Matthieu Baerts
2024-03-01 18:55         ` Jakub Kicinski
2024-02-27  3:10 ` [PATCH net 00/10] mptcp: more misc. fixes for v6.8 patchwork-bot+netdevbpf

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=0585f8a1-e0ca-483d-a21f-20617192cb28@kernel.org \
    --to=matttbe@kernel.org \
    --cc=cpaasch@apple.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=geliang@kernel.org \
    --cc=kishen.maloor@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martineau@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peter.krystad@linux.intel.com \
    --cc=sfr@canb.auug.org.au \
    --cc=shuah@kernel.org \
    --cc=stable@vger.kernel.org \
    /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.