diff options
author | Yuchung Cheng <ycheng@google.com> | 2017-01-13 01:11:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-13 22:37:16 -0500 |
commit | e636f8b0104d6622aaaed6aa5ef17dfbf165bc51 (patch) | |
tree | df39c0f942ddcab2869d408414f562ae208ddea9 /net/ipv4/tcp_input.c | |
parent | db8da6bb574e1692cb86624317c572b0b9306560 (diff) |
tcp: new helper for RACK to detect loss
Create a new helper tcp_rack_detect_loss to prepare the upcoming
RACK reordering timer patch.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index ec6d84363024..bb24b93e64bc 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2865,10 +2865,14 @@ static void tcp_fastretrans_alert(struct sock *sk, const int acked, | |||
2865 | } | 2865 | } |
2866 | 2866 | ||
2867 | /* Use RACK to detect loss */ | 2867 | /* Use RACK to detect loss */ |
2868 | if (sysctl_tcp_recovery & TCP_RACK_LOST_RETRANS && | 2868 | if (sysctl_tcp_recovery & TCP_RACK_LOST_RETRANS) { |
2869 | tcp_rack_mark_lost(sk)) { | 2869 | u32 prior_retrans = tp->retrans_out; |
2870 | flag |= FLAG_LOST_RETRANS; | 2870 | |
2871 | *ack_flag |= FLAG_LOST_RETRANS; | 2871 | tcp_rack_mark_lost(sk); |
2872 | if (prior_retrans > tp->retrans_out) { | ||
2873 | flag |= FLAG_LOST_RETRANS; | ||
2874 | *ack_flag |= FLAG_LOST_RETRANS; | ||
2875 | } | ||
2872 | } | 2876 | } |
2873 | 2877 | ||
2874 | /* E. Process state. */ | 2878 | /* E. Process state. */ |