MPTCP Linux Development
 help / color / mirror / Atom feed
* [PATCH mptcp-next 1/2] Squash-to: "mptcp: implement delayed seq generation for passive fastopen"
@ 2022-11-11 11:18 Paolo Abeni
  2022-11-11 11:18 ` [PATCH mptcp-next 2/2] Squash-to: "mptcp: add subflow_v(4,6)_send_synack()" Paolo Abeni
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Paolo Abeni @ 2022-11-11 11:18 UTC (permalink / raw)
  To: mptcp; +Cc: Dmytro Shytyi

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-19  7:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-11 11:18 [PATCH mptcp-next 1/2] Squash-to: "mptcp: implement delayed seq generation for passive fastopen" Paolo Abeni
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox