diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2011-01-02 12:15:58 -0500 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2011-01-07 06:22:44 -0500 |
commit | bfbb23466adcbc77facea3046b44f75530079472 (patch) | |
tree | 31e28ac15e808861cd261e9600c4e7642d8aa73f | |
parent | 763dadd47c884853a22f2f19ea27e58431303ff3 (diff) |
dccp: make upper bound for seq_window consistent on 32/64 bit
The 'seq_window' sysctl sets the initial value for the DCCP Sequence Window,
which may range from 32..2^46-1 (RFC 4340, 7.5.2). The patch sets the upper
bound consistently to 2^32-1 on both 32 and 64 bit systems, which should be
sufficient - with a RTT of 1sec and 1-byte packets, a seq_window of 2^32-1
corresponds to a link speed of 34 Gbps.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
-rw-r--r-- | Documentation/networking/dccp.txt | 1 | ||||
-rw-r--r-- | net/dccp/sysctl.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt index b395ca6a49f2..811872b45bee 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt | |||
@@ -167,6 +167,7 @@ rx_ccid = 2 | |||
167 | seq_window = 100 | 167 | seq_window = 100 |
168 | The initial sequence window (sec. 7.5.2) of the sender. This influences | 168 | The initial sequence window (sec. 7.5.2) of the sender. This influences |
169 | the local ackno validity and the remote seqno validity windows (7.5.1). | 169 | the local ackno validity and the remote seqno validity windows (7.5.1). |
170 | Values in the range Wmin = 32 (RFC 4340, 7.5.2) up to 2^32-1 can be set. | ||
170 | 171 | ||
171 | tx_qlen = 5 | 172 | tx_qlen = 5 |
172 | The size of the transmit buffer in packets. A value of 0 corresponds | 173 | The size of the transmit buffer in packets. A value of 0 corresponds |
diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c index 563943822e58..42348824ee31 100644 --- a/net/dccp/sysctl.c +++ b/net/dccp/sysctl.c | |||
@@ -21,7 +21,8 @@ | |||
21 | /* Boundary values */ | 21 | /* Boundary values */ |
22 | static int zero = 0, | 22 | static int zero = 0, |
23 | u8_max = 0xFF; | 23 | u8_max = 0xFF; |
24 | static unsigned long seqw_min = 32; | 24 | static unsigned long seqw_min = DCCPF_SEQ_WMIN, |
25 | seqw_max = 0xFFFFFFFF; /* maximum on 32 bit */ | ||
25 | 26 | ||
26 | static struct ctl_table dccp_default_table[] = { | 27 | static struct ctl_table dccp_default_table[] = { |
27 | { | 28 | { |
@@ -31,6 +32,7 @@ static struct ctl_table dccp_default_table[] = { | |||
31 | .mode = 0644, | 32 | .mode = 0644, |
32 | .proc_handler = proc_doulongvec_minmax, | 33 | .proc_handler = proc_doulongvec_minmax, |
33 | .extra1 = &seqw_min, /* RFC 4340, 7.5.2 */ | 34 | .extra1 = &seqw_min, /* RFC 4340, 7.5.2 */ |
35 | .extra2 = &seqw_max, | ||
34 | }, | 36 | }, |
35 | { | 37 | { |
36 | .procname = "rx_ccid", | 38 | .procname = "rx_ccid", |