mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
This reverts "Merge branch 'dccp' of git://eden-feed.erg.abdn.ac.uk/dccp_exp"
as it accentally contained the wrong set of patches. These will be submitted separately. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
This commit is contained in:
parent
0a68a20cc3
commit
410e27a49b
36 changed files with 3035 additions and 4122 deletions
|
@ -811,12 +811,25 @@ void tcp_update_metrics(struct sock *sk)
|
|||
}
|
||||
}
|
||||
|
||||
/* Numbers are taken from RFC3390.
|
||||
*
|
||||
* John Heffner states:
|
||||
*
|
||||
* The RFC specifies a window of no more than 4380 bytes
|
||||
* unless 2*MSS > 4380. Reading the pseudocode in the RFC
|
||||
* is a bit misleading because they use a clamp at 4380 bytes
|
||||
* rather than use a multiplier in the relevant range.
|
||||
*/
|
||||
__u32 tcp_init_cwnd(struct tcp_sock *tp, struct dst_entry *dst)
|
||||
{
|
||||
__u32 cwnd = (dst ? dst_metric(dst, RTAX_INITCWND) : 0);
|
||||
|
||||
if (!cwnd)
|
||||
cwnd = rfc3390_bytes_to_packets(tp->mss_cache);
|
||||
if (!cwnd) {
|
||||
if (tp->mss_cache > 1460)
|
||||
cwnd = 2;
|
||||
else
|
||||
cwnd = (tp->mss_cache > 1095) ? 3 : 4;
|
||||
}
|
||||
return min_t(__u32, cwnd, tp->snd_cwnd_clamp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue