mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
[TCP]: less inline's
TCP inline usage cleanup:
* get rid of inline in several places
* replace __inline__ with inline where possible
* move functions used in one file out of tcp.h
* let compiler decide on used once cases
On x86_64:
text data bss dec hex filename
3594701 648348 567400 4810449 4966d1 vmlinux.orig
3593133 648580 567400 4809113 496199 vmlinux
On sparc64:
text data bss dec hex filename
2538278 406152 530392 3474822 350586 vmlinux.ORIG
2536382
406384 530392 3473158 34ff06 vmlinux
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3c19065a1e
commit
40efc6fa17
5 changed files with 198 additions and 201 deletions
|
@ -174,6 +174,34 @@ int tcp_set_congestion_control(struct sock *sk, const char *name)
|
|||
return err;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Linear increase during slow start
|
||||
*/
|
||||
void tcp_slow_start(struct tcp_sock *tp)
|
||||
{
|
||||
if (sysctl_tcp_abc) {
|
||||
/* RFC3465: Slow Start
|
||||
* TCP sender SHOULD increase cwnd by the number of
|
||||
* previously unacknowledged bytes ACKed by each incoming
|
||||
* acknowledgment, provided the increase is not more than L
|
||||
*/
|
||||
if (tp->bytes_acked < tp->mss_cache)
|
||||
return;
|
||||
|
||||
/* We MAY increase by 2 if discovered delayed ack */
|
||||
if (sysctl_tcp_abc > 1 && tp->bytes_acked > 2*tp->mss_cache) {
|
||||
if (tp->snd_cwnd < tp->snd_cwnd_clamp)
|
||||
tp->snd_cwnd++;
|
||||
}
|
||||
}
|
||||
tp->bytes_acked = 0;
|
||||
|
||||
if (tp->snd_cwnd < tp->snd_cwnd_clamp)
|
||||
tp->snd_cwnd++;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tcp_slow_start);
|
||||
|
||||
/*
|
||||
* TCP Reno congestion control
|
||||
* This is special case used for fallback as well.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue