diff options
author | Andrea Bittau <a.bittau@cs.ucl.ac.uk> | 2006-09-19 16:13:37 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:19:40 -0400 |
commit | 07978aabd52ce67f59971872c80f76d6e3ca18ae (patch) | |
tree | 30b878674d4cf147cc6a0e91ff953298bc07b8e2 /net/dccp/ccids/ccid2.h | |
parent | 8d424f6ca2d02026dadff409770639d720375afb (diff) |
[DCCP] CCID2: Allocate seq records on demand
Allocate more sequence state on demand. Each time a packet is sent
out by CCID2, a record of it needs to be kept. This list of records
grows proportionally to cwnd. Previously, the length of this list was
hardcored and therefore the cwnd could only grow to this value (of
128). Now, records are allocated on demand as necessary---cwnd may
grow as it wishes. The exceptional case of when memory is not
available is not handled gracefully. Perhaps, cwnd should be capped
at that point.
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>
Diffstat (limited to 'net/dccp/ccids/ccid2.h')
-rw-r--r-- | net/dccp/ccids/ccid2.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/dccp/ccids/ccid2.h b/net/dccp/ccids/ccid2.h index b4cc6c0bf020..2a02ce04ba85 100644 --- a/net/dccp/ccids/ccid2.h +++ b/net/dccp/ccids/ccid2.h | |||
@@ -35,6 +35,9 @@ struct ccid2_seq { | |||
35 | struct ccid2_seq *ccid2s_next; | 35 | struct ccid2_seq *ccid2s_next; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | #define CCID2_SEQBUF_LEN 256 | ||
39 | #define CCID2_SEQBUF_MAX 128 | ||
40 | |||
38 | /** struct ccid2_hc_tx_sock - CCID2 TX half connection | 41 | /** struct ccid2_hc_tx_sock - CCID2 TX half connection |
39 | * | 42 | * |
40 | * @ccid2hctx_ssacks - ACKs recv in slow start | 43 | * @ccid2hctx_ssacks - ACKs recv in slow start |
@@ -53,7 +56,8 @@ struct ccid2_hc_tx_sock { | |||
53 | unsigned int ccid2hctx_ssthresh; | 56 | unsigned int ccid2hctx_ssthresh; |
54 | int ccid2hctx_pipe; | 57 | int ccid2hctx_pipe; |
55 | int ccid2hctx_numdupack; | 58 | int ccid2hctx_numdupack; |
56 | struct ccid2_seq *ccid2hctx_seqbuf; | 59 | struct ccid2_seq *ccid2hctx_seqbuf[CCID2_SEQBUF_MAX]; |
60 | int ccid2hctx_seqbufc; | ||
57 | struct ccid2_seq *ccid2hctx_seqh; | 61 | struct ccid2_seq *ccid2hctx_seqh; |
58 | struct ccid2_seq *ccid2hctx_seqt; | 62 | struct ccid2_seq *ccid2hctx_seqt; |
59 | long ccid2hctx_rto; | 63 | long ccid2hctx_rto; |