From 83a3728614931fccab3dfde67e6f98fd1afdf271 Mon Sep 17 00:00:00 2001 From: Andrea Bittau Date: Tue, 19 Sep 2006 13:07:20 -0700 Subject: [PATCH] --- yaml --- r: 34689 b: refs/heads/master c: d458c25ce24ce00ea547e9976e293e7835416253 h: refs/heads/master i: 34687: 8d4673683e123f7de7eeb28cc288c71c615bbb43 v: v3 --- [refs] | 2 +- trunk/net/dccp/ccids/ccid2.c | 7 +++++-- trunk/net/dccp/ccids/ccid2.h | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index dfa342839dd1..3092a1e0b8d4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 29651cda97b0a9e4ac0fbeb5ea731a9909f0f128 +refs/heads/master: d458c25ce24ce00ea547e9976e293e7835416253 diff --git a/trunk/net/dccp/ccids/ccid2.c b/trunk/net/dccp/ccids/ccid2.c index 54a6b7ef3b7b..699a56674659 100644 --- a/trunk/net/dccp/ccids/ccid2.c +++ b/trunk/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... */ diff --git a/trunk/net/dccp/ccids/ccid2.h b/trunk/net/dccp/ccids/ccid2.h index 451a87464fa5..b4cc6c0bf020 100644 --- a/trunk/net/dccp/ccids/ccid2.h +++ b/trunk/net/dccp/ccids/ccid2.h @@ -50,7 +50,7 @@ struct ccid2_hc_tx_sock { int ccid2hctx_cwnd; int ccid2hctx_ssacks; int ccid2hctx_acks; - int ccid2hctx_ssthresh; + unsigned int ccid2hctx_ssthresh; int ccid2hctx_pipe; int ccid2hctx_numdupack; struct ccid2_seq *ccid2hctx_seqbuf;