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>
This commit is contained in:

committed by
David S. Miller

parent
db8da6bb57
commit
e636f8b010
@@ -2865,10 +2865,14 @@ static void tcp_fastretrans_alert(struct sock *sk, const int acked,
|
||||
}
|
||||
|
||||
/* Use RACK to detect loss */
|
||||
if (sysctl_tcp_recovery & TCP_RACK_LOST_RETRANS &&
|
||||
tcp_rack_mark_lost(sk)) {
|
||||
flag |= FLAG_LOST_RETRANS;
|
||||
*ack_flag |= FLAG_LOST_RETRANS;
|
||||
if (sysctl_tcp_recovery & TCP_RACK_LOST_RETRANS) {
|
||||
u32 prior_retrans = tp->retrans_out;
|
||||
|
||||
tcp_rack_mark_lost(sk);
|
||||
if (prior_retrans > tp->retrans_out) {
|
||||
flag |= FLAG_LOST_RETRANS;
|
||||
*ack_flag |= FLAG_LOST_RETRANS;
|
||||
}
|
||||
}
|
||||
|
||||
/* E. Process state. */
|
||||
|
Reference in New Issue
Block a user