MPTCP Linux Development
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: mptcp@lists.linux.dev
Cc: Dmytro Shytyi <dmytro@shytyi.net>
Subject: [PATCH mptcp-next 1/2] Squash-to: "mptcp: implement delayed seq generation for passive fastopen"
Date: Fri, 11 Nov 2022 12:18:58 +0100	[thread overview]
Message-ID: <00a831a7ae3ffb0573dca58f270a98799f5230bf.1668165456.git.pabeni@redhat.com> (raw)

is_mptfo is only used/accessed at the subflow level, we are better
off tracking it in the subflow struct and avoid the (currently missing)
_ONCE() accessors.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 net/mptcp/options.c  | 2 +-
 net/mptcp/protocol.h | 5 +++--
 net/mptcp/subflow.c  | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 398f5afac124..7138b10d28a2 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -950,7 +950,7 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
 	if (TCP_SKB_CB(skb)->seq != subflow->ssn_offset + 1) {
 		if (subflow->mp_join)
 			goto reset;
-		if (msk->is_mptfo && mp_opt->suboptions & OPTION_MPTCP_MPC_ACK)
+		if (subflow->is_mptfo && mp_opt->suboptions & OPTION_MPTCP_MPC_ACK)
 			goto set_fully_established;
 		return subflow->mp_capable;
 	}
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index f805036e3c93..c81bb7d6aab7 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -291,7 +291,6 @@ struct mptcp_sock {
 	bool		use_64bit_ack; /* Set when we received a 64-bit DSN */
 	bool		csum_enabled;
 	bool		allow_infinite_fallback;
-	bool		is_mptfo;
 	u8		mpc_endpoint_id;
 	u8		recvmsg_inq:1,
 			cork:1,
@@ -482,7 +481,9 @@ struct mptcp_subflow_context {
 		disposable : 1,	    /* ctx can be free at ulp release time */
 		stale : 1,	    /* unable to snd/rcv data, do not use for xmit */
 		local_id_valid : 1, /* local_id is correctly initialized */
-		valid_csum_seen : 1;        /* at least one csum validated */
+		valid_csum_seen : 1,        /* at least one csum validated */
+		is_mptfo : 1,	    /* subflow is doing TFO */
+		__unused : 8;
 	enum mptcp_data_avail data_avail;
 	bool	scheduled;
 	u32	remote_nonce;
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index ff9716e53786..9c6f6c9a1f9a 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -686,7 +686,7 @@ void mptcp_subflow_fully_established(struct mptcp_subflow_context *subflow,
 	subflow->can_ack = 1;
 	WRITE_ONCE(msk->fully_established, true);
 
-	if (msk->is_mptfo)
+	if (subflow->is_mptfo)
 		mptcp_gen_msk_ackseq_fastopen(msk, subflow, mp_opt);
 }
 
-- 
2.38.1


             reply	other threads:[~2022-11-11 11:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 11:18 Paolo Abeni [this message]
2022-11-11 11:18 ` [PATCH mptcp-next 2/2] Squash-to: "mptcp: add subflow_v(4,6)_send_synack()" Paolo Abeni
2022-11-11 17:13   ` kernel test robot
2022-11-19  7:49   ` kernel test robot
2022-11-11 17:27 ` [PATCH mptcp-next 1/2] Squash-to: "mptcp: implement delayed seq generation for passive fastopen" Matthieu Baerts
2022-11-11 19:04 ` kernel test robot

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=00a831a7ae3ffb0573dca58f270a98799f5230bf.1668165456.git.pabeni@redhat.com \
    --to=pabeni@redhat.com \
    --cc=dmytro@shytyi.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