Yousuk Seung d4761754b4 tcp: invalidate rate samples during SACK reneging
Mark tcp_sock during a SACK reneging event and invalidate rate samples
while marked. Such rate samples may overestimate bw by including packets
that were SACKed before reneging.

< ack 6001 win 10000 sack 7001:38001
< ack 7001 win 0 sack 8001:38001 // Reneg detected
> seq 7001:8001 // RTO, SACK cleared.
< ack 38001 win 10000

In above example the rate sample taken after the last ack will count
7001-38001 as delivered while the actual delivery rate likely could
be much lower i.e. 7001-8001.

This patch adds a new field tcp_sock.sack_reneg and marks it when we
declare SACK reneging and entering TCP_CA_Loss, and unmarks it after
the last rate sample was taken before moving back to TCP_CA_Open. This
patch also invalidates rate samples taken while tcp_sock.is_sack_reneg
is set.

Fixes: b9f64820fb22 ("tcp: track data delivery rate for a TCP connection")
Signed-off-by: Yousuk Seung <ysseung@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Priyaranjan Jha <priyarjha@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-12-08 10:07:02 -05:00
..
2017-11-16 14:05:12 -08:00
2017-11-14 16:49:31 -08:00
2017-11-14 14:44:04 -08:00
2017-11-16 09:15:57 -08:00
2017-11-15 14:54:53 -08:00
2017-11-15 14:54:53 -08:00
2017-11-13 10:17:35 -08:00
2017-11-13 21:14:07 -08:00
2017-11-13 01:34:49 +01:00
2017-11-15 13:28:48 -08:00
2017-06-08 18:52:36 -07:00
2017-11-23 10:56:35 +01:00
2017-11-22 21:40:54 +01:00
2017-09-07 21:11:05 -07:00
2017-07-03 16:56:28 -06:00
2017-11-15 18:21:04 -08:00
2017-08-30 14:40:40 +02:00
2017-11-15 10:56:56 -08:00
2017-09-04 00:06:02 +02:00
2017-11-13 21:05:31 -08:00
2017-11-17 09:51:57 -08:00
2017-11-14 16:54:12 -08:00
2017-08-24 13:23:03 -07:00
2017-11-15 18:21:04 -08:00
2017-07-17 13:42:48 +02:00
2017-11-05 16:42:02 -08:00
2017-08-07 17:22:14 +02:00
2017-11-13 01:41:20 +01:00
2017-11-17 14:58:01 -08:00
2017-11-15 18:21:06 -08:00
2017-05-18 10:07:40 -04:00
2017-06-21 14:37:12 -04:00
2017-11-17 16:10:04 -08:00
2017-11-17 14:58:01 -08:00
2017-11-15 18:21:05 -08:00
2017-11-17 09:51:57 -08:00
2017-11-14 11:23:05 +01:00
2017-11-15 10:56:56 -08:00
2017-11-15 18:21:01 -08:00
2017-11-17 16:10:04 -08:00
2017-10-12 15:41:05 +02:00
2017-11-15 18:21:05 -08:00
2017-11-15 18:21:01 -08:00
2017-12-01 13:09:40 -08:00
2017-10-19 10:08:56 +02:00
2017-10-07 10:45:02 -06:00
2017-08-28 20:51:22 +02:00
2017-11-15 18:21:04 -08:00
2017-11-29 18:40:42 -08:00
2017-11-17 09:51:57 -08:00
2017-11-15 13:46:33 -08:00
2017-11-15 18:21:04 -08:00
2017-11-17 14:18:00 -08:00
2017-11-17 14:18:00 -08:00
2017-11-17 16:10:00 -08:00
2017-07-25 18:05:25 +02:00
2017-11-15 15:01:28 -08:00
2017-10-20 09:37:32 +02:00
2017-11-15 18:21:03 -08:00
2017-11-15 18:21:06 -08:00
2017-11-09 10:23:28 +01:00
2017-08-06 20:55:29 -07:00
2017-11-17 16:10:04 -08:00
2017-11-17 16:10:04 -08:00
2017-11-13 01:33:48 +01:00
2017-08-16 16:28:47 -07:00
2017-11-17 20:14:10 -08:00
2017-11-15 18:21:04 -08:00
2017-11-07 12:22:21 +01:00
2017-11-15 20:42:10 -08:00
2017-07-06 16:24:30 -07:00
2017-11-15 20:42:10 -08:00
2017-08-16 16:28:47 -07:00
2017-11-15 18:21:01 -08:00
2017-11-15 18:21:06 -08:00
2017-11-15 18:21:01 -08:00
2017-11-17 14:58:01 -08:00
2017-10-11 22:36:54 -04:00
2017-11-14 18:01:46 -08:00
2017-07-24 17:50:37 +02:00
2017-10-04 10:29:22 +02:00
2017-08-15 09:02:07 -07:00
2017-08-15 09:02:08 -07:00