tcp: add tcp_in_slow_start helper
Add a helper to test the slow start condition in various congestion control modules and other places. This is to prepare a slight improvement in policy as to exactly when to slow start. Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Nandita Dukkipati <nanditad@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
1007f59dce
commit
071d5080e3
@@ -461,7 +461,7 @@ void tcp_update_metrics(struct sock *sk)
|
||||
tcp_metric_set(tm, TCP_METRIC_CWND,
|
||||
tp->snd_cwnd);
|
||||
}
|
||||
} else if (tp->snd_cwnd > tp->snd_ssthresh &&
|
||||
} else if (!tcp_in_slow_start(tp) &&
|
||||
icsk->icsk_ca_state == TCP_CA_Open) {
|
||||
/* Cong. avoidance phase, cwnd is reliable. */
|
||||
if (!tcp_metric_locked(tm, TCP_METRIC_SSTHRESH))
|
||||
|
Reference in New Issue
Block a user