Skip to contentSkip to conversation

: [DCCP] CCID2: Initialize ssthresh to infinity

PATCH Applied Arnaldo Carvalho de Melo 2 participants 2 messages Sep 14, 2006 – Sep 19, 2006 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 5/10 : [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.

------------------------------------------------------------------------------

 ccid2.c |    7 +++++--
 ccid2.h |    2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

------------------------------------------------------------------------------

net/dccp/ccids/ccid2.c +5 -2
index 54a6b7e..699a566 100644
@@ -678,9 +678,12 @@ static int ccid2_hc_tx_init(struct ccid 
 	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... */
net/dccp/ccids/ccid2.h +1 -1
index 451a874..b4cc6c0 100644
@@ -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;
maintainer Applied
#1 lore raw

From: Arnaldo Carvalho de Melo <[email protected]>
Date: Thu, 14 Sep 2006 14:10:18 -0300

Quoted 6 lines

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.

Applied.

In the future perhaps the discovered packet loss point should be remembered in a routing metric and used as the slow start threshold on future connections or something like that.