diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-07-16 21:35:52 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-18 04:46:58 -0400 |
commit | 16751347a060a10c09b11593bb179fd5b0240c04 (patch) | |
tree | 40399ba217d9e4c45060c4d12334c53f931ca635 /net | |
parent | 44beac008631d1b8a52f103e04eacba2bda81511 (diff) |
[TCP]: remove unused argument to cong_avoid op
None of the existing TCP congestion controls use the rtt value pased
in the ca_ops->cong_avoid interface. Which is lucky because seq_rtt
could have been -1 when handling a duplicate ack.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_bic.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_cong.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_cubic.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_highspeed.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_htcp.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_hybla.c | 4 | ||||
-rw-r--r-- | net/ipv4/tcp_illinois.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 8 | ||||
-rw-r--r-- | net/ipv4/tcp_lp.c | 5 | ||||
-rw-r--r-- | net/ipv4/tcp_scalable.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_vegas.c | 6 | ||||
-rw-r--r-- | net/ipv4/tcp_veno.c | 6 | ||||
-rw-r--r-- | net/ipv4/tcp_yeah.c | 2 |
13 files changed, 22 insertions, 24 deletions
diff --git a/net/ipv4/tcp_bic.c b/net/ipv4/tcp_bic.c index dd9ef65ad3ff..519de091a94d 100644 --- a/net/ipv4/tcp_bic.c +++ b/net/ipv4/tcp_bic.c | |||
@@ -137,7 +137,7 @@ static inline void bictcp_update(struct bictcp *ca, u32 cwnd) | |||
137 | } | 137 | } |
138 | 138 | ||
139 | static void bictcp_cong_avoid(struct sock *sk, u32 ack, | 139 | static void bictcp_cong_avoid(struct sock *sk, u32 ack, |
140 | u32 seq_rtt, u32 in_flight, int data_acked) | 140 | u32 in_flight, int data_acked) |
141 | { | 141 | { |
142 | struct tcp_sock *tp = tcp_sk(sk); | 142 | struct tcp_sock *tp = tcp_sk(sk); |
143 | struct bictcp *ca = inet_csk_ca(sk); | 143 | struct bictcp *ca = inet_csk_ca(sk); |
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index 1260e52ad772..55fca1820c34 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c | |||
@@ -324,8 +324,7 @@ EXPORT_SYMBOL_GPL(tcp_slow_start); | |||
324 | /* This is Jacobson's slow start and congestion avoidance. | 324 | /* This is Jacobson's slow start and congestion avoidance. |
325 | * SIGCOMM '88, p. 328. | 325 | * SIGCOMM '88, p. 328. |
326 | */ | 326 | */ |
327 | void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 rtt, u32 in_flight, | 327 | void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 in_flight, int flag) |
328 | int flag) | ||
329 | { | 328 | { |
330 | struct tcp_sock *tp = tcp_sk(sk); | 329 | struct tcp_sock *tp = tcp_sk(sk); |
331 | 330 | ||
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c index ebfaac2f9f46..d17da30d82d6 100644 --- a/net/ipv4/tcp_cubic.c +++ b/net/ipv4/tcp_cubic.c | |||
@@ -270,7 +270,7 @@ static inline void measure_delay(struct sock *sk) | |||
270 | } | 270 | } |
271 | 271 | ||
272 | static void bictcp_cong_avoid(struct sock *sk, u32 ack, | 272 | static void bictcp_cong_avoid(struct sock *sk, u32 ack, |
273 | u32 seq_rtt, u32 in_flight, int data_acked) | 273 | u32 in_flight, int data_acked) |
274 | { | 274 | { |
275 | struct tcp_sock *tp = tcp_sk(sk); | 275 | struct tcp_sock *tp = tcp_sk(sk); |
276 | struct bictcp *ca = inet_csk_ca(sk); | 276 | struct bictcp *ca = inet_csk_ca(sk); |
diff --git a/net/ipv4/tcp_highspeed.c b/net/ipv4/tcp_highspeed.c index 43d624e5043c..14a073d8b60f 100644 --- a/net/ipv4/tcp_highspeed.c +++ b/net/ipv4/tcp_highspeed.c | |||
@@ -109,7 +109,7 @@ static void hstcp_init(struct sock *sk) | |||
109 | tp->snd_cwnd_clamp = min_t(u32, tp->snd_cwnd_clamp, 0xffffffff/128); | 109 | tp->snd_cwnd_clamp = min_t(u32, tp->snd_cwnd_clamp, 0xffffffff/128); |
110 | } | 110 | } |
111 | 111 | ||
112 | static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt, | 112 | static void hstcp_cong_avoid(struct sock *sk, u32 adk, |
113 | u32 in_flight, int data_acked) | 113 | u32 in_flight, int data_acked) |
114 | { | 114 | { |
115 | struct tcp_sock *tp = tcp_sk(sk); | 115 | struct tcp_sock *tp = tcp_sk(sk); |
diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c index 4ba4a7ae0a85..632c05a75883 100644 --- a/net/ipv4/tcp_htcp.c +++ b/net/ipv4/tcp_htcp.c | |||
@@ -225,7 +225,7 @@ static u32 htcp_recalc_ssthresh(struct sock *sk) | |||
225 | return max((tp->snd_cwnd * ca->beta) >> 7, 2U); | 225 | return max((tp->snd_cwnd * ca->beta) >> 7, 2U); |
226 | } | 226 | } |
227 | 227 | ||
228 | static void htcp_cong_avoid(struct sock *sk, u32 ack, u32 rtt, | 228 | static void htcp_cong_avoid(struct sock *sk, u32 ack, s32 rtt, |
229 | u32 in_flight, int data_acked) | 229 | u32 in_flight, int data_acked) |
230 | { | 230 | { |
231 | struct tcp_sock *tp = tcp_sk(sk); | 231 | struct tcp_sock *tp = tcp_sk(sk); |
diff --git a/net/ipv4/tcp_hybla.c b/net/ipv4/tcp_hybla.c index e5be35117223..b3e55cf56171 100644 --- a/net/ipv4/tcp_hybla.c +++ b/net/ipv4/tcp_hybla.c | |||
@@ -85,7 +85,7 @@ static inline u32 hybla_fraction(u32 odds) | |||
85 | * o Give cwnd a new value based on the model proposed | 85 | * o Give cwnd a new value based on the model proposed |
86 | * o remember increments <1 | 86 | * o remember increments <1 |
87 | */ | 87 | */ |
88 | static void hybla_cong_avoid(struct sock *sk, u32 ack, u32 rtt, | 88 | static void hybla_cong_avoid(struct sock *sk, u32 ack, |
89 | u32 in_flight, int flag) | 89 | u32 in_flight, int flag) |
90 | { | 90 | { |
91 | struct tcp_sock *tp = tcp_sk(sk); | 91 | struct tcp_sock *tp = tcp_sk(sk); |
@@ -103,7 +103,7 @@ static void hybla_cong_avoid(struct sock *sk, u32 ack, u32 rtt, | |||
103 | return; | 103 | return; |
104 | 104 | ||
105 | if (!ca->hybla_en) | 105 | if (!ca->hybla_en) |
106 | return tcp_reno_cong_avoid(sk, ack, rtt, in_flight, flag); | 106 | return tcp_reno_cong_avoid(sk, ack, in_flight, flag); |
107 | 107 | ||
108 | if (ca->rho == 0) | 108 | if (ca->rho == 0) |
109 | hybla_recalc_param(sk); | 109 | hybla_recalc_param(sk); |
diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c index b2b2256d3b84..cc5de6f69d46 100644 --- a/net/ipv4/tcp_illinois.c +++ b/net/ipv4/tcp_illinois.c | |||
@@ -258,7 +258,7 @@ static void tcp_illinois_state(struct sock *sk, u8 new_state) | |||
258 | /* | 258 | /* |
259 | * Increase window in response to successful acknowledgment. | 259 | * Increase window in response to successful acknowledgment. |
260 | */ | 260 | */ |
261 | static void tcp_illinois_cong_avoid(struct sock *sk, u32 ack, u32 rtt, | 261 | static void tcp_illinois_cong_avoid(struct sock *sk, u32 ack, |
262 | u32 in_flight, int flag) | 262 | u32 in_flight, int flag) |
263 | { | 263 | { |
264 | struct tcp_sock *tp = tcp_sk(sk); | 264 | struct tcp_sock *tp = tcp_sk(sk); |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 4e5884ac8f29..fec8a7a4dbaf 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2323,11 +2323,11 @@ static inline void tcp_ack_update_rtt(struct sock *sk, const int flag, | |||
2323 | tcp_ack_no_tstamp(sk, seq_rtt, flag); | 2323 | tcp_ack_no_tstamp(sk, seq_rtt, flag); |
2324 | } | 2324 | } |
2325 | 2325 | ||
2326 | static void tcp_cong_avoid(struct sock *sk, u32 ack, u32 rtt, | 2326 | static void tcp_cong_avoid(struct sock *sk, u32 ack, |
2327 | u32 in_flight, int good) | 2327 | u32 in_flight, int good) |
2328 | { | 2328 | { |
2329 | const struct inet_connection_sock *icsk = inet_csk(sk); | 2329 | const struct inet_connection_sock *icsk = inet_csk(sk); |
2330 | icsk->icsk_ca_ops->cong_avoid(sk, ack, rtt, in_flight, good); | 2330 | icsk->icsk_ca_ops->cong_avoid(sk, ack, in_flight, good); |
2331 | tcp_sk(sk)->snd_cwnd_stamp = tcp_time_stamp; | 2331 | tcp_sk(sk)->snd_cwnd_stamp = tcp_time_stamp; |
2332 | } | 2332 | } |
2333 | 2333 | ||
@@ -2826,11 +2826,11 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag) | |||
2826 | /* Advance CWND, if state allows this. */ | 2826 | /* Advance CWND, if state allows this. */ |
2827 | if ((flag & FLAG_DATA_ACKED) && !frto_cwnd && | 2827 | if ((flag & FLAG_DATA_ACKED) && !frto_cwnd && |
2828 | tcp_may_raise_cwnd(sk, flag)) | 2828 | tcp_may_raise_cwnd(sk, flag)) |
2829 | tcp_cong_avoid(sk, ack, seq_rtt, prior_in_flight, 0); | 2829 | tcp_cong_avoid(sk, ack, prior_in_flight, 0); |
2830 | tcp_fastretrans_alert(sk, prior_snd_una, prior_packets, flag); | 2830 | tcp_fastretrans_alert(sk, prior_snd_una, prior_packets, flag); |
2831 | } else { | 2831 | } else { |
2832 | if ((flag & FLAG_DATA_ACKED) && !frto_cwnd) | 2832 | if ((flag & FLAG_DATA_ACKED) && !frto_cwnd) |
2833 | tcp_cong_avoid(sk, ack, seq_rtt, prior_in_flight, 1); | 2833 | tcp_cong_avoid(sk, ack, prior_in_flight, 1); |
2834 | } | 2834 | } |
2835 | 2835 | ||
2836 | if ((flag & FLAG_FORWARD_PROGRESS) || !(flag&FLAG_NOT_DUP)) | 2836 | if ((flag & FLAG_FORWARD_PROGRESS) || !(flag&FLAG_NOT_DUP)) |
diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c index e49836ce012e..80e140e3ec2d 100644 --- a/net/ipv4/tcp_lp.c +++ b/net/ipv4/tcp_lp.c | |||
@@ -115,13 +115,12 @@ static void tcp_lp_init(struct sock *sk) | |||
115 | * Will only call newReno CA when away from inference. | 115 | * Will only call newReno CA when away from inference. |
116 | * From TCP-LP's paper, this will be handled in additive increasement. | 116 | * From TCP-LP's paper, this will be handled in additive increasement. |
117 | */ | 117 | */ |
118 | static void tcp_lp_cong_avoid(struct sock *sk, u32 ack, u32 rtt, u32 in_flight, | 118 | static void tcp_lp_cong_avoid(struct sock *sk, u32 ack, u32 in_flight, int flag) |
119 | int flag) | ||
120 | { | 119 | { |
121 | struct lp *lp = inet_csk_ca(sk); | 120 | struct lp *lp = inet_csk_ca(sk); |
122 | 121 | ||
123 | if (!(lp->flag & LP_WITHIN_INF)) | 122 | if (!(lp->flag & LP_WITHIN_INF)) |
124 | tcp_reno_cong_avoid(sk, ack, rtt, in_flight, flag); | 123 | tcp_reno_cong_avoid(sk, ack, in_flight, flag); |
125 | } | 124 | } |
126 | 125 | ||
127 | /** | 126 | /** |
diff --git a/net/ipv4/tcp_scalable.c b/net/ipv4/tcp_scalable.c index 4624501e9680..be27a33a1c68 100644 --- a/net/ipv4/tcp_scalable.c +++ b/net/ipv4/tcp_scalable.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #define TCP_SCALABLE_AI_CNT 50U | 15 | #define TCP_SCALABLE_AI_CNT 50U |
16 | #define TCP_SCALABLE_MD_SCALE 3 | 16 | #define TCP_SCALABLE_MD_SCALE 3 |
17 | 17 | ||
18 | static void tcp_scalable_cong_avoid(struct sock *sk, u32 ack, u32 rtt, | 18 | static void tcp_scalable_cong_avoid(struct sock *sk, u32 ack, |
19 | u32 in_flight, int flag) | 19 | u32 in_flight, int flag) |
20 | { | 20 | { |
21 | struct tcp_sock *tp = tcp_sk(sk); | 21 | struct tcp_sock *tp = tcp_sk(sk); |
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c index e218a51ceced..914e0307f7af 100644 --- a/net/ipv4/tcp_vegas.c +++ b/net/ipv4/tcp_vegas.c | |||
@@ -163,13 +163,13 @@ void tcp_vegas_cwnd_event(struct sock *sk, enum tcp_ca_event event) | |||
163 | EXPORT_SYMBOL_GPL(tcp_vegas_cwnd_event); | 163 | EXPORT_SYMBOL_GPL(tcp_vegas_cwnd_event); |
164 | 164 | ||
165 | static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, | 165 | static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, |
166 | u32 seq_rtt, u32 in_flight, int flag) | 166 | u32 in_flight, int flag) |
167 | { | 167 | { |
168 | struct tcp_sock *tp = tcp_sk(sk); | 168 | struct tcp_sock *tp = tcp_sk(sk); |
169 | struct vegas *vegas = inet_csk_ca(sk); | 169 | struct vegas *vegas = inet_csk_ca(sk); |
170 | 170 | ||
171 | if (!vegas->doing_vegas_now) | 171 | if (!vegas->doing_vegas_now) |
172 | return tcp_reno_cong_avoid(sk, ack, seq_rtt, in_flight, flag); | 172 | return tcp_reno_cong_avoid(sk, ack, in_flight, flag); |
173 | 173 | ||
174 | /* The key players are v_beg_snd_una and v_beg_snd_nxt. | 174 | /* The key players are v_beg_snd_una and v_beg_snd_nxt. |
175 | * | 175 | * |
@@ -228,7 +228,7 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, | |||
228 | /* We don't have enough RTT samples to do the Vegas | 228 | /* We don't have enough RTT samples to do the Vegas |
229 | * calculation, so we'll behave like Reno. | 229 | * calculation, so we'll behave like Reno. |
230 | */ | 230 | */ |
231 | tcp_reno_cong_avoid(sk, ack, seq_rtt, in_flight, flag); | 231 | tcp_reno_cong_avoid(sk, ack, in_flight, flag); |
232 | } else { | 232 | } else { |
233 | u32 rtt, target_cwnd, diff; | 233 | u32 rtt, target_cwnd, diff; |
234 | 234 | ||
diff --git a/net/ipv4/tcp_veno.c b/net/ipv4/tcp_veno.c index ec854cc5fad5..7a55ddf86032 100644 --- a/net/ipv4/tcp_veno.c +++ b/net/ipv4/tcp_veno.c | |||
@@ -115,13 +115,13 @@ static void tcp_veno_cwnd_event(struct sock *sk, enum tcp_ca_event event) | |||
115 | } | 115 | } |
116 | 116 | ||
117 | static void tcp_veno_cong_avoid(struct sock *sk, u32 ack, | 117 | static void tcp_veno_cong_avoid(struct sock *sk, u32 ack, |
118 | u32 seq_rtt, u32 in_flight, int flag) | 118 | u32 in_flight, int flag) |
119 | { | 119 | { |
120 | struct tcp_sock *tp = tcp_sk(sk); | 120 | struct tcp_sock *tp = tcp_sk(sk); |
121 | struct veno *veno = inet_csk_ca(sk); | 121 | struct veno *veno = inet_csk_ca(sk); |
122 | 122 | ||
123 | if (!veno->doing_veno_now) | 123 | if (!veno->doing_veno_now) |
124 | return tcp_reno_cong_avoid(sk, ack, seq_rtt, in_flight, flag); | 124 | return tcp_reno_cong_avoid(sk, ack, in_flight, flag); |
125 | 125 | ||
126 | /* limited by applications */ | 126 | /* limited by applications */ |
127 | if (!tcp_is_cwnd_limited(sk, in_flight)) | 127 | if (!tcp_is_cwnd_limited(sk, in_flight)) |
@@ -132,7 +132,7 @@ static void tcp_veno_cong_avoid(struct sock *sk, u32 ack, | |||
132 | /* We don't have enough rtt samples to do the Veno | 132 | /* We don't have enough rtt samples to do the Veno |
133 | * calculation, so we'll behave like Reno. | 133 | * calculation, so we'll behave like Reno. |
134 | */ | 134 | */ |
135 | tcp_reno_cong_avoid(sk, ack, seq_rtt, in_flight, flag); | 135 | tcp_reno_cong_avoid(sk, ack, in_flight, flag); |
136 | } else { | 136 | } else { |
137 | u32 rtt, target_cwnd; | 137 | u32 rtt, target_cwnd; |
138 | 138 | ||
diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c index 545ed237ab53..c04b7c6ec702 100644 --- a/net/ipv4/tcp_yeah.c +++ b/net/ipv4/tcp_yeah.c | |||
@@ -70,7 +70,7 @@ static void tcp_yeah_pkts_acked(struct sock *sk, u32 pkts_acked, ktime_t last) | |||
70 | } | 70 | } |
71 | 71 | ||
72 | static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack, | 72 | static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack, |
73 | u32 seq_rtt, u32 in_flight, int flag) | 73 | u32 in_flight, int flag) |
74 | { | 74 | { |
75 | struct tcp_sock *tp = tcp_sk(sk); | 75 | struct tcp_sock *tp = tcp_sk(sk); |
76 | struct yeah *yeah = inet_csk_ca(sk); | 76 | struct yeah *yeah = inet_csk_ca(sk); |