aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/ccid2.c
diff options
context:
space:
mode:
authorAndrea Bittau <[email protected]>2006-09-19 20:07:20 +0000
committerDavid S. Miller <[email protected]>2006-09-22 22:19:11 +0000
commitd458c25ce24ce00ea547e9976e293e7835416253 (patch)
treeb15e036537270aa0f70c390556aaa483702fd326 /net/dccp/ccids/ccid2.c
parent[DCCP] CCID2: Fix jiffie wrap issues (diff)
downloadkernel-d458c25ce24ce00ea547e9976e293e7835416253.tar.gz
kernel-d458c25ce24ce00ea547e9976e293e7835416253.zip
[DCCP] CCID2: Initialize ssthresh to infinity
Initialize the slow-start threshold to infinity. This way, upon connection initiation, slow-start will be exited only upon a packet loss. This patch will allow connections to quickly gain speed. Signed-off-by: Andrea Bittau <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/dccp/ccids/ccid2.c')
-rw-r--r--net/dccp/ccids/ccid2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c
index 54a6b7ef3b7b..699a56674659 100644
--- a/net/dccp/ccids/ccid2.c
+++ b/net/dccp/ccids/ccid2.c
@@ -678,9 +678,12 @@ static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk)
int seqcount = ccid2_seq_len;
int i;
- /* XXX init variables with proper values */
hctx->ccid2hctx_cwnd = 1;
- hctx->ccid2hctx_ssthresh = 10;
+ /* Initialize ssthresh to infinity. This means that we will exit the
+ * initial slow-start after the first packet loss. This is what we
+ * want.
+ */
+ hctx->ccid2hctx_ssthresh = ~0;
hctx->ccid2hctx_numdupack = 3;
/* XXX init ~ to window size... */