diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2008-12-06 01:43:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-06 01:43:08 -0500 |
commit | ee6aac59505bcae5de1422c76956de62ac22170d (patch) | |
tree | 6126384cd8081aa1496ae07c54913e7bec1fbcc5 /net/ipv4 | |
parent | 50133161a83c9e5974d430cabd77d6430ca7d579 (diff) |
tcp: drop tcp_bound_rto, merge content of it tcp_set_rto
Both are called by the same sites.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_input.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 2d9151c94368..215e38c1a233 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -701,13 +701,10 @@ static inline void tcp_set_rto(struct sock *sk) | |||
701 | * all the algo is pure shit and should be replaced | 701 | * all the algo is pure shit and should be replaced |
702 | * with correct one. It is exactly, which we pretend to do. | 702 | * with correct one. It is exactly, which we pretend to do. |
703 | */ | 703 | */ |
704 | } | ||
705 | 704 | ||
706 | /* NOTE: clamping at TCP_RTO_MIN is not required, current algo | 705 | /* NOTE: clamping at TCP_RTO_MIN is not required, current algo |
707 | * guarantees that rto is higher. | 706 | * guarantees that rto is higher. |
708 | */ | 707 | */ |
709 | static inline void tcp_bound_rto(struct sock *sk) | ||
710 | { | ||
711 | if (inet_csk(sk)->icsk_rto > TCP_RTO_MAX) | 708 | if (inet_csk(sk)->icsk_rto > TCP_RTO_MAX) |
712 | inet_csk(sk)->icsk_rto = TCP_RTO_MAX; | 709 | inet_csk(sk)->icsk_rto = TCP_RTO_MAX; |
713 | } | 710 | } |
@@ -928,7 +925,6 @@ static void tcp_init_metrics(struct sock *sk) | |||
928 | tp->mdev_max = tp->rttvar = max(tp->mdev, tcp_rto_min(sk)); | 925 | tp->mdev_max = tp->rttvar = max(tp->mdev, tcp_rto_min(sk)); |
929 | } | 926 | } |
930 | tcp_set_rto(sk); | 927 | tcp_set_rto(sk); |
931 | tcp_bound_rto(sk); | ||
932 | if (inet_csk(sk)->icsk_rto < TCP_TIMEOUT_INIT && !tp->rx_opt.saw_tstamp) | 928 | if (inet_csk(sk)->icsk_rto < TCP_TIMEOUT_INIT && !tp->rx_opt.saw_tstamp) |
933 | goto reset; | 929 | goto reset; |
934 | tp->snd_cwnd = tcp_init_cwnd(tp, dst); | 930 | tp->snd_cwnd = tcp_init_cwnd(tp, dst); |
@@ -3081,7 +3077,6 @@ static void tcp_ack_saw_tstamp(struct sock *sk, int flag) | |||
3081 | tcp_rtt_estimator(sk, seq_rtt); | 3077 | tcp_rtt_estimator(sk, seq_rtt); |
3082 | tcp_set_rto(sk); | 3078 | tcp_set_rto(sk); |
3083 | inet_csk(sk)->icsk_backoff = 0; | 3079 | inet_csk(sk)->icsk_backoff = 0; |
3084 | tcp_bound_rto(sk); | ||
3085 | } | 3080 | } |
3086 | 3081 | ||
3087 | static void tcp_ack_no_tstamp(struct sock *sk, u32 seq_rtt, int flag) | 3082 | 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 | tcp_rtt_estimator(sk, seq_rtt); | 3096 | tcp_rtt_estimator(sk, seq_rtt); |
3102 | tcp_set_rto(sk); | 3097 | tcp_set_rto(sk); |
3103 | inet_csk(sk)->icsk_backoff = 0; | 3098 | inet_csk(sk)->icsk_backoff = 0; |
3104 | tcp_bound_rto(sk); | ||
3105 | } | 3099 | } |
3106 | 3100 | ||
3107 | static inline void tcp_ack_update_rtt(struct sock *sk, const int flag, | 3101 | static inline void tcp_ack_update_rtt(struct sock *sk, const int flag, |