diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2008-01-12 06:19:12 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:01:48 -0500 |
commit | cea14e0ed6082bd3dff19203d01340de6e7ca067 (patch) | |
tree | 261c61ca73f60d85f748623d2edad7b346d7af37 /net/ipv4/tcp_cong.c | |
parent | 490d5046930276aae50dd16942649bfc626056f7 (diff) |
[TCP]: Uninline tcp_is_cwnd_limited
net/ipv4/tcp_cong.c:
tcp_reno_cong_avoid | -65
1 function changed, 65 bytes removed, diff: -65
net/ipv4/arp.c:
arp_ignore | -5
1 function changed, 5 bytes removed, diff: -5
net/ipv4/tcp_bic.c:
bictcp_cong_avoid | -57
1 function changed, 57 bytes removed, diff: -57
net/ipv4/tcp_cubic.c:
bictcp_cong_avoid | -61
1 function changed, 61 bytes removed, diff: -61
net/ipv4/tcp_highspeed.c:
hstcp_cong_avoid | -63
1 function changed, 63 bytes removed, diff: -63
net/ipv4/tcp_hybla.c:
hybla_cong_avoid | -85
1 function changed, 85 bytes removed, diff: -85
net/ipv4/tcp_htcp.c:
htcp_cong_avoid | -57
1 function changed, 57 bytes removed, diff: -57
net/ipv4/tcp_veno.c:
tcp_veno_cong_avoid | -52
1 function changed, 52 bytes removed, diff: -52
net/ipv4/tcp_scalable.c:
tcp_scalable_cong_avoid | -61
1 function changed, 61 bytes removed, diff: -61
net/ipv4/tcp_yeah.c:
tcp_yeah_cong_avoid | -75
1 function changed, 75 bytes removed, diff: -75
net/ipv4/tcp_illinois.c:
tcp_illinois_cong_avoid | -54
1 function changed, 54 bytes removed, diff: -54
net/dccp/ccids/ccid3.c:
ccid3_update_send_interval | -7
ccid3_hc_tx_packet_recv | +7
2 functions changed, 7 bytes added, 7 bytes removed, diff: +0
net/ipv4/tcp_cong.c:
tcp_is_cwnd_limited | +88
1 function changed, 88 bytes added, diff: +88
built-in.o:
14 functions changed, 95 bytes added, 642 bytes removed, diff: -547
...Again some gcc artifacts visible as well.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_cong.c')
-rw-r--r-- | net/ipv4/tcp_cong.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index 4451750b478c..3a6be23d222f 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c | |||
@@ -274,6 +274,27 @@ int tcp_set_congestion_control(struct sock *sk, const char *name) | |||
274 | return err; | 274 | return err; |
275 | } | 275 | } |
276 | 276 | ||
277 | /* RFC2861 Check whether we are limited by application or congestion window | ||
278 | * This is the inverse of cwnd check in tcp_tso_should_defer | ||
279 | */ | ||
280 | int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight) | ||
281 | { | ||
282 | const struct tcp_sock *tp = tcp_sk(sk); | ||
283 | u32 left; | ||
284 | |||
285 | if (in_flight >= tp->snd_cwnd) | ||
286 | return 1; | ||
287 | |||
288 | if (!sk_can_gso(sk)) | ||
289 | return 0; | ||
290 | |||
291 | left = tp->snd_cwnd - in_flight; | ||
292 | if (sysctl_tcp_tso_win_divisor) | ||
293 | return left * sysctl_tcp_tso_win_divisor < tp->snd_cwnd; | ||
294 | else | ||
295 | return left <= tcp_max_burst(tp); | ||
296 | } | ||
297 | EXPORT_SYMBOL_GPL(tcp_is_cwnd_limited); | ||
277 | 298 | ||
278 | /* | 299 | /* |
279 | * Slow start is used when congestion window is less than slow start | 300 | * Slow start is used when congestion window is less than slow start |