[SCTP]: Remove multiple levels of msecs to jiffies conversions.
The SCTP sysctl entries are displayed in milliseconds, but stored internally in jiffies. This results in multiple levels of msecs to jiffies conversion and as a result produces a truncation error. This patch makes things consistent in that we store and display defaults in milliseconds and only convert once for use by association. This patch also adds some sane min/max values so that we don't go off the deep end. Signed-off-by: Vladislav Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
ce556b3a59
commit
3fd091e73b
@@ -128,9 +128,9 @@ extern struct sctp_globals {
|
||||
* RTO.Alpha - 1/8 (3 when converted to right shifts.)
|
||||
* RTO.Beta - 1/4 (2 when converted to right shifts.)
|
||||
*/
|
||||
unsigned long rto_initial;
|
||||
unsigned long rto_min;
|
||||
unsigned long rto_max;
|
||||
unsigned int rto_initial;
|
||||
unsigned int rto_min;
|
||||
unsigned int rto_max;
|
||||
|
||||
/* Note: rto_alpha and rto_beta are really defined as inverse
|
||||
* powers of two to facilitate integer operations.
|
||||
@@ -145,13 +145,13 @@ extern struct sctp_globals {
|
||||
int cookie_preserve_enable;
|
||||
|
||||
/* Valid.Cookie.Life - 60 seconds */
|
||||
unsigned long valid_cookie_life;
|
||||
unsigned int valid_cookie_life;
|
||||
|
||||
/* Delayed SACK timeout 200ms default*/
|
||||
unsigned long sack_timeout;
|
||||
unsigned int sack_timeout;
|
||||
|
||||
/* HB.interval - 30 seconds */
|
||||
unsigned long hb_interval;
|
||||
unsigned int hb_interval;
|
||||
|
||||
/* Association.Max.Retrans - 10 attempts
|
||||
* Path.Max.Retrans - 5 attempts (per destination address)
|
||||
|
Reference in New Issue
Block a user