64k streams not supported
Isn't SCTP supposed to support 65536 data streams?
If I try to enable that many I get 10.
Not surprising since the number of streams gets stored in a u16.
The whole code base may need changing to save the highest valid stream?
Since I don't actually need that many I'm not writing the patch.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
Marcelo Ricardo Leitner
maintainerQuoted 1 line · David Laight
Isn't SCTP supposed to support 65536 data streams?
Hm, no? Why?
https://tools.ietf.org/html/rfc4960#section-5.1.1
"After the association is initialized, the valid outbound stream identifier range for either endpoint shall be 0 to min(local OS, remote MIS)-1."
Section 3.3.2:
Number of Outbound Streams (OS): 16 bits (unsigned integer)
Defines the number of outbound streams the sender of this INIT chunk wishes to create in this association. The value of 0 MUST NOT be used.
...
Number of Inbound Streams (MIS): 16 bits (unsigned integer)
Defines the maximum number of streams the sender of this INIT chunk allows the peer end to create in this association. The value 0 MUST NOT be used.
Marcelo
Quoted 3 lines · David Laight
Isn't SCTP supposed to support 65536 data streams?
Since the number of streams is exchanged in the INIT and INIT-ACK chunks and encoded in a uint16_t, the number is 65535, not 65536. So an implementation should be able to use up to 65535 incoming and outgoing streams.
Best regards
Michael
Quoted 14 lines
If I try to enable that many I get 10.
Not surprising since the number of streams gets stored in a u16.The whole code base may need changing to save the highest valid stream?
Since I don't actually need that many I'm not writing the patch.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
From: Michael Tuexen
Quoted 9 lines
Sent: 21 August 2020 21:10
Quoted 3 lines · David Laight
Isn't SCTP supposed to support 65536 data streams?
Since the number of streams is exchanged in the INIT and INIT-ACK chunks and encoded in a
uint16_t, the number is 65535, not 65536. So an implementation should be able to use up to 65535 incoming and outgoing streams.
Ah, I'd assumed that because the stream number was encoded in 16 bits you could use stream numbers 0 through 65535.
At least no one needs to write the patch :-)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)