Skip to content

Commit

Permalink
[DCCP] CCID2: Initialize ssthresh to infinity
Browse files Browse the repository at this point in the history
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 <a.bittau@cs.ucl.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andrea Bittau authored and David S. Miller committed Sep 22, 2006
1 parent 29651cd commit d458c25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions net/dccp/ccids/ccid2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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... */
Expand Down
2 changes: 1 addition & 1 deletion net/dccp/ccids/ccid2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d458c25

Please sign in to comment.