Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53491
b: refs/heads/master
c: 03fba04
h: refs/heads/master
i:
  53489: a2ae3b3
  53487: 5dae2ec
v: v3
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed May 3, 2007
1 parent 58a0553 commit 61e925c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 72fbaeb623971c321112de7fe3fa4e24e12ca59e
refs/heads/master: 03fba0479600114f32d29eee74ca3eaa364606bf
24 changes: 3 additions & 21 deletions trunk/net/ipv4/tcp_highspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ struct hstcp {
u32 ai;
};

static int max_ssthresh = 100;
module_param(max_ssthresh, int, 0644);
MODULE_PARM_DESC(max_ssthresh, "limited slow start threshold (RFC3742)");

static void hstcp_init(struct sock *sk)
{
struct tcp_sock *tp = tcp_sk(sk);
Expand All @@ -122,23 +118,9 @@ static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt,
if (!tcp_is_cwnd_limited(sk, in_flight))
return;

if (tp->snd_cwnd <= tp->snd_ssthresh) {
/* RFC3742: limited slow start
* the window is increased by 1/K MSS for each arriving ACK,
* for K = int(cwnd/(0.5 max_ssthresh))
*/
if (max_ssthresh > 0 && tp->snd_cwnd > max_ssthresh) {
u32 k = max(tp->snd_cwnd / (max_ssthresh >> 1), 1U);
if (++tp->snd_cwnd_cnt >= k) {
if (tp->snd_cwnd < tp->snd_cwnd_clamp)
tp->snd_cwnd++;
tp->snd_cwnd_cnt = 0;
}
} else {
if (tp->snd_cwnd < tp->snd_cwnd_clamp)
tp->snd_cwnd++;
}
} else {
if (tp->snd_cwnd <= tp->snd_ssthresh)
tcp_slow_start(tp);
else {
/* Update AIMD parameters.
*
* We want to guarantee that:
Expand Down

0 comments on commit 61e925c

Please sign in to comment.