Skip to contentSkip to conversation

Squash-to: mptcp: Retransmit DATA_FIN (again)

PATCH In review Mat Martineau 3 participants 3 messages Apr 23, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Squash-to: mptcp: Retransmit DATA_FIN (again)

Previous testing happened to involve cases where data had been sent and the retrans timer was already running. Packetdrill testing revealed that the timer was not being started in cases where no data had been transmitted, so __mptcp_retrans() was never called. This change starts the timer when the original DATA_FIN is sent, if the timer is not already running.

Packetdrill PR is forthcoming.

---
 net/mptcp/protocol.c | 2 ++
 1 file changed, 2 insertions(+)
net/mptcp/protocol.c +2 -0
index 6cbddfc18158..aec8e77b18e4 100644
@@ -2497,6 +2497,8 @@ void mptcp_subflow_shutdown(struct sock *sk, struct sock *ssk, int how)
 			pr_debug("Sending DATA_FIN on subflow %p", ssk);
 			mptcp_set_timeout(sk, ssk);
 			tcp_send_ack(ssk);
+			if (!mptcp_timer_pending(sk))
+				mptcp_reset_timer(sk);
 		}
 		break;
 	}
Signature · 1 line
2.31.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 19 lines · Mat Martineau

Previous testing happened to involve cases where data had been sent and the retrans timer was already running. Packetdrill testing revealed that the timer was not being started in cases where no data had been transmitted, so __mptcp_retrans() was never called. This change starts the timer when the original DATA_FIN is sent, if the timer is not already running.

Packetdrill PR is forthcoming.

---
 net/mptcp/protocol.c | 2 ++
 1 file changed, 2 insertions(+)
net/mptcp/protocol.c +0 -0
index 6cbddfc18158..aec8e77b18e4 100644

net/mptcp/protocol.c void mptcp_subflow_shutdown(struct sock *sk, struct sock *ssk, int how) · line 2504

Quoted 8 lines
net/mptcp/protocol.c +2 -0
@@ -2497,6 +2497,8 @@ void mptcp_subflow_shutdown(struct sock *sk, struct sock *ssk, int how)
 			pr_debug("Sending DATA_FIN on subflow %p", ssk);
 			mptcp_set_timeout(sk, ssk);
 			tcp_send_ack(ssk);
+			if (!mptcp_timer_pending(sk))
+				mptcp_reset_timer(sk);
 		}
 		break;
 	}

LGTM, thanks!

#2 lore raw
In reply to Mat Martineau

Hi Mat, Paolo,

Quoted 10 lines · Mat Martineau

Previous testing happened to involve cases where data had been sent and the retrans timer was already running. Packetdrill testing revealed that the timer was not being started in cases where no data had been transmitted, so __mptcp_retrans() was never called. This change starts the timer when the original DATA_FIN is sent, if the timer is not already running.

Packetdrill PR is forthcoming.

Thank you for the patch and the review!

- 820118888287: "squashed" in "mptcp: Retransmit DATA_FIN"
- Results: 9fb030889e08..0f7c6f5b4a89

Builds and tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20210423T152727
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export/20210423T152727

Cheers,
Matt

Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net