Pengcheng Yang
a71df406a6
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:03:26 +02:00
..
2019-05-21 12:33:38 -07:00
2022-01-27 09:19:35 +01:00
2022-03-02 11:41:06 +01:00
2019-06-06 08:34:50 +02:00
2022-04-15 14:18:33 +02:00
2021-06-23 14:41:24 +02:00
2019-11-01 14:57:52 -07:00
2021-12-08 09:01:09 +01:00
2021-04-14 08:24:13 +02:00
2022-03-28 08:46:44 +02:00
2022-04-15 14:18:33 +02:00
2019-06-04 19:26:49 -07:00
2021-12-08 09:01:13 +01:00
2022-04-15 14:18:37 +02:00
2020-09-12 14:18:54 +02:00
2020-01-29 16:45:22 +01:00
2021-01-12 20:16:15 +01:00
2020-08-11 15:33:40 +02:00
2021-09-12 08:56:40 +02:00
2021-09-12 08:56:40 +02:00
2022-04-27 13:50:45 +02:00
2021-12-22 09:29:36 +01:00
2022-01-27 09:19:54 +01:00
2022-04-27 13:50:45 +02:00
2019-05-21 10:50:45 +02:00
2020-01-04 19:18:39 +01:00
2019-09-20 18:23:33 -07:00
2022-01-27 09:19:54 +01:00
2022-05-09 09:03:25 +02:00
2019-10-01 18:42:15 +02:00
2019-06-21 18:35:51 +02:00
2022-02-01 17:24:39 +01:00
2019-05-25 11:00:50 -07:00
2019-06-18 20:48:45 -04:00
2021-08-04 12:27:39 +02:00
2020-06-03 08:21:34 +02:00
2019-07-05 15:01:15 -07:00
2021-06-18 09:58:59 +02:00
2020-06-03 08:20:52 +02:00
2019-05-07 17:22:09 -07:00
2022-02-16 12:52:51 +01:00
2020-04-01 11:02:05 +02:00
2019-05-28 21:37:30 -07:00
2019-05-21 10:50:45 +02:00
2020-11-18 19:20:17 +01:00
2019-05-21 10:50:45 +02:00
2021-12-01 09:23:33 +01:00
2022-03-02 11:41:05 +01:00
2019-06-17 20:20:36 -07:00
2019-05-30 11:26:32 -07:00
2020-03-18 07:17:38 +01:00
2022-02-01 17:24:39 +01:00
2021-11-02 19:46:11 +01:00
2020-11-18 19:20:32 +01:00
2020-08-19 08:16:23 +02:00
2021-08-18 08:57:01 +02:00
2019-05-21 10:50:45 +02:00
2022-04-15 14:18:16 +02:00
2019-05-21 10:50:45 +02:00
2021-05-14 09:44:33 +02:00
2021-12-01 09:23:33 +01:00
2019-05-30 11:26:32 -07:00
2019-10-13 10:13:08 -07:00
2021-09-22 12:26:33 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2022-05-09 09:03:26 +02:00
2022-04-27 13:50:46 +02:00
2019-05-21 10:50:45 +02:00
2019-05-01 11:47:54 -04:00
2022-05-09 09:03:24 +02:00
2019-05-21 10:50:45 +02:00
2021-08-12 13:20:56 +02:00
2022-05-09 09:03:25 +02:00
2022-05-09 09:03:24 +02:00
2021-02-03 23:26:02 +01:00
2019-05-21 10:50:45 +02:00
2021-02-07 15:35:47 +01:00
2020-01-23 08:22:45 +01:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2022-03-19 13:40:17 +01:00
2019-05-21 10:50:45 +02:00
2020-03-18 07:17:38 +01:00
2021-08-12 13:20:56 +02:00
2019-05-21 10:50:45 +02:00
2022-04-15 14:18:01 +02:00
2019-05-30 11:26:32 -07:00
2020-04-29 16:33:11 +02:00
2020-01-04 19:18:58 +01:00
2019-05-30 11:26:32 -07:00
2019-06-06 08:34:50 +02:00
2019-06-06 08:34:50 +02:00