mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH mptcp-next] Squash-to: "mptcp: use fastclose on more edge scenarios"
@ 2022-09-26 13:26 Paolo Abeni
  2022-09-26 15:05 ` Squash-to: "mptcp: use fastclose on more edge scenarios": Tests Results MPTCP CI
  2022-09-26 17:16 ` [PATCH mptcp-next] Squash-to: "mptcp: use fastclose on more edge scenarios" Matthieu Baerts
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Abeni @ 2022-09-26 13:26 UTC (permalink / raw)
  To: mptcp

The orginal commit applied fastclose too aggressivly.
Specifically, we don't need a fastclose after the completion of
the data_fin handshakr for an orphaned socket.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
paired pktdrill update:
https://github.com/multipath-tcp/packetdrill/pull/88
---
 net/mptcp/protocol.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 0eeb8115c9d0..c99eb4ce948e 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -2607,12 +2607,15 @@ static void mptcp_worker(struct work_struct *work)
 	 * closed, but we need the msk around to reply to incoming DATA_FIN,
 	 * even if it is orphaned and in FIN_WAIT2 state
 	 */
-	if (sock_flag(sk, SOCK_DEAD) &&
-	    (mptcp_check_close_timeout(sk) || sk->sk_state == TCP_CLOSE)) {
-		inet_sk_state_store(sk, TCP_CLOSE);
-		mptcp_do_fastclose(sk);
-		__mptcp_destroy_sock(sk);
-		goto unlock;
+	if (sock_flag(sk, SOCK_DEAD)) {
+		if (mptcp_check_close_timeout(sk)) {
+			inet_sk_state_store(sk, TCP_CLOSE);
+			mptcp_do_fastclose(sk);
+		}
+		if (sk->sk_state == TCP_CLOSE) {
+			__mptcp_destroy_sock(sk);
+			goto unlock;
+		}
 	}
 
 	if (test_and_clear_bit(MPTCP_WORK_CLOSE_SUBFLOW, &msk->flags))
-- 
2.37.3


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

end of thread, other threads:[~2022-09-26 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-26 13:26 [PATCH mptcp-next] Squash-to: "mptcp: use fastclose on more edge scenarios" Paolo Abeni
2022-09-26 15:05 ` Squash-to: "mptcp: use fastclose on more edge scenarios": Tests Results MPTCP CI
2022-09-26 17:16 ` [PATCH mptcp-next] Squash-to: "mptcp: use fastclose on more edge scenarios" Matthieu Baerts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).