Commit ee6aac59 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by David S. Miller

tcp: drop tcp_bound_rto, merge content of it tcp_set_rto

Both are called by the same sites.
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 50133161
...@@ -701,13 +701,10 @@ static inline void tcp_set_rto(struct sock *sk) ...@@ -701,13 +701,10 @@ static inline void tcp_set_rto(struct sock *sk)
* all the algo is pure shit and should be replaced * all the algo is pure shit and should be replaced
* with correct one. It is exactly, which we pretend to do. * with correct one. It is exactly, which we pretend to do.
*/ */
}
/* NOTE: clamping at TCP_RTO_MIN is not required, current algo /* NOTE: clamping at TCP_RTO_MIN is not required, current algo
* guarantees that rto is higher. * guarantees that rto is higher.
*/ */
static inline void tcp_bound_rto(struct sock *sk)
{
if (inet_csk(sk)->icsk_rto > TCP_RTO_MAX) if (inet_csk(sk)->icsk_rto > TCP_RTO_MAX)
inet_csk(sk)->icsk_rto = TCP_RTO_MAX; inet_csk(sk)->icsk_rto = TCP_RTO_MAX;
} }
...@@ -928,7 +925,6 @@ static void tcp_init_metrics(struct sock *sk) ...@@ -928,7 +925,6 @@ static void tcp_init_metrics(struct sock *sk)
tp->mdev_max = tp->rttvar = max(tp->mdev, tcp_rto_min(sk)); tp->mdev_max = tp->rttvar = max(tp->mdev, tcp_rto_min(sk));
} }
tcp_set_rto(sk); tcp_set_rto(sk);
tcp_bound_rto(sk);
if (inet_csk(sk)->icsk_rto < TCP_TIMEOUT_INIT && !tp->rx_opt.saw_tstamp) if (inet_csk(sk)->icsk_rto < TCP_TIMEOUT_INIT && !tp->rx_opt.saw_tstamp)
goto reset; goto reset;
tp->snd_cwnd = tcp_init_cwnd(tp, dst); tp->snd_cwnd = tcp_init_cwnd(tp, dst);
...@@ -3081,7 +3077,6 @@ static void tcp_ack_saw_tstamp(struct sock *sk, int flag) ...@@ -3081,7 +3077,6 @@ static void tcp_ack_saw_tstamp(struct sock *sk, int flag)
tcp_rtt_estimator(sk, seq_rtt); tcp_rtt_estimator(sk, seq_rtt);
tcp_set_rto(sk); tcp_set_rto(sk);
inet_csk(sk)->icsk_backoff = 0; inet_csk(sk)->icsk_backoff = 0;
tcp_bound_rto(sk);
} }
static void tcp_ack_no_tstamp(struct sock *sk, u32 seq_rtt, int flag) static void tcp_ack_no_tstamp(struct sock *sk, u32 seq_rtt, int flag)
...@@ -3101,7 +3096,6 @@ static void tcp_ack_no_tstamp(struct sock *sk, u32 seq_rtt, int flag) ...@@ -3101,7 +3096,6 @@ static void tcp_ack_no_tstamp(struct sock *sk, u32 seq_rtt, int flag)
tcp_rtt_estimator(sk, seq_rtt); tcp_rtt_estimator(sk, seq_rtt);
tcp_set_rto(sk); tcp_set_rto(sk);
inet_csk(sk)->icsk_backoff = 0; inet_csk(sk)->icsk_backoff = 0;
tcp_bound_rto(sk);
} }
static inline void tcp_ack_update_rtt(struct sock *sk, const int flag, static inline void tcp_ack_update_rtt(struct sock *sk, const int flag,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment