Pengcheng Yang
27e724bf7c
tcp: fix F-RTO may not work correctly when receiving DSACK
...
[ Upstream commit d9157f6806d1499e173770df1f1b234763de5c79 ]
Currently DSACK is regarded as a dupack, which may cause
F-RTO to incorrectly enter "loss was real" when receiving
DSACK.
Packetdrill to demonstrate:
// Enable F-RTO and TLP
0 `sysctl -q net.ipv4.tcp_frto=2`
0 `sysctl -q net.ipv4.tcp_early_retrans=3`
0 `sysctl -q net.ipv4.tcp_congestion_control=cubic`
// Establish a connection
+0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+0 bind(3, ..., ...) = 0
+0 listen(3, 1) = 0
// RTT 10ms, RTO 210ms
+.1 < S 0:0(0) win 32792 <mss 1000,sackOK,nop,nop,nop,wscale 7>
+0 > S. 0:0(0) ack 1 <...>
+.01 < . 1:1(0) ack 1 win 257
+0 accept(3, ..., ...) = 4
// Send 2 data segments
+0 write(4, ..., 2000) = 2000
+0 > P. 1:2001(2000) ack 1
// TLP
+.022 > P. 1001:2001(1000) ack 1
// Continue to send 8 data segments
+0 write(4, ..., 10000) = 10000
+0 > P. 2001:10001(8000) ack 1
// RTO
+.188 > . 1:1001(1000) ack 1
// The original data is acked and new data is sent(F-RTO step 2.b)
+0 < . 1:1(0) ack 2001 win 257
+0 > P. 10001:12001(2000) ack 1
// D-SACK caused by TLP is regarded as a dupack, this results in
// the incorrect judgment of "loss was real"(F-RTO step 3.a)
+.022 < . 1:1(0) ack 2001 win 257 <sack 1001:2001,nop,nop>
// Never-retransmitted data(3001:4001) are acked and
// expect to switch to open state(F-RTO step 3.b)
+0 < . 1:1(0) ack 4001 win 257
+0 %{ assert tcpi_ca_state == 0, tcpi_ca_state }%
Fixes: e33099f96d99 ("tcp: implement RFC5682 F-RTO")
Signed-off-by: Pengcheng Yang <yangpc@wangsu.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Tested-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/1650967419-2150-1-git-send-email-yangpc@wangsu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-09 09:14:39 +02:00
..
2020-08-10 12:06:44 -07:00
2022-01-27 11:03:50 +01:00
2022-03-02 11:47:56 +01:00
2021-06-30 15:51:09 -07:00
2022-04-13 20:59:05 +02:00
2021-11-25 09:49:07 +01:00
2021-09-03 13:52:29 +01:00
2021-12-08 09:04:38 +01:00
2022-03-16 14:23:36 +01:00
2022-04-27 14:38:52 +02:00
2022-04-13 20:59:05 +02:00
2022-02-23 12:03:10 +01:00
2021-12-08 09:04:49 +01:00
2022-04-13 20:59:16 +02:00
2022-02-23 12:03:10 +01:00
2021-08-31 12:03:33 +01:00
2021-05-17 15:29:35 -07:00
2021-01-29 20:39:14 -08:00
2021-10-14 07:54:47 -07:00
2021-08-13 06:41:22 -07:00
2021-12-17 10:30:13 +01:00
2021-12-22 09:32:40 +01:00
2022-01-27 11:05:35 +01:00
2022-04-13 20:59:04 +02:00
2020-08-19 14:06:36 +02:00
2021-03-01 13:32:12 -08:00
2022-01-27 11:05:35 +01:00
2022-05-09 09:14:36 +02:00
2021-02-03 14:51:39 -08:00
2020-08-25 06:28:02 -07:00
2022-03-02 11:48:01 +01:00
2021-09-14 14:24:31 +01:00
2021-01-08 19:25:35 -08:00
2021-07-31 09:14:46 -07:00
2021-07-27 20:11:44 +01:00
2021-06-30 15:51:09 -07:00
2021-06-02 13:27:03 -07:00
2021-07-27 20:11:44 +01:00
2022-02-16 12:56:29 +01:00
2020-08-18 16:02:16 -07:00
2021-02-26 12:28:03 -08:00
2020-11-16 08:08:54 -08:00
2021-04-18 22:04:16 +02:00
2021-12-01 09:04:49 +01:00
2022-03-02 11:47:52 +01:00
2021-11-18 19:16:33 +01:00
2021-05-17 15:29:35 -07:00
2021-07-13 09:28:29 -07:00
2022-02-01 17:27:14 +01:00
2022-04-08 14:23:41 +02:00
2022-05-09 09:14:37 +02:00
2021-06-15 18:01:05 +02:00
2021-08-11 15:00:15 -07:00
2022-04-08 14:23:40 +02:00
2021-05-04 11:58:28 -07:00
2021-12-01 09:04:52 +01:00
2021-08-16 17:25:49 -07:00
2020-07-06 13:23:03 -07:00
2020-07-06 13:23:03 -07:00
2022-05-09 09:14:39 +02:00
2021-12-29 12:28:42 +01:00
2021-03-28 17:31:13 -07:00
2020-12-14 16:40:27 -08:00
2022-05-09 09:14:35 +02:00
2021-08-02 10:20:56 +01:00
2022-05-09 09:14:37 +02:00
2022-05-09 09:14:35 +02:00
2021-07-27 20:07:21 +01:00
2020-08-24 17:31:20 -07:00
2021-06-29 11:28:21 -07:00
2020-10-13 17:11:52 -07:00
2020-07-06 13:23:03 -07:00
2021-06-29 11:54:36 -07:00
2022-03-19 13:47:50 +01:00
2021-05-17 15:29:35 -07:00
2021-10-26 12:29:33 -07:00
2021-07-13 09:28:29 -07:00
2020-07-24 15:41:54 -07:00
2021-08-31 12:03:33 +01:00
2021-01-07 12:53:29 -08:00
2022-03-02 11:47:59 +01:00
2020-07-10 13:54:00 -07:00
2022-01-11 15:35:18 +01:00
2021-05-17 15:29:35 -07:00
2020-05-11 15:12:27 +02:00
2021-05-17 15:29:35 -07:00
2020-05-06 09:40:08 +02:00
2021-06-09 09:38:52 +02:00