aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/sctp/structs.h78
-rw-r--r--net/sctp/sm_sideeffect.c4
-rw-r--r--net/sctp/socket.c2
-rw-r--r--net/sctp/sysctl.c7
-rw-r--r--net/sctp/transport.c2
5 files changed, 47 insertions, 46 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 72aeae4a0067..ad3d15cb0a0d 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -127,9 +127,9 @@ extern struct sctp_globals {
127 * RTO.Alpha - 1/8 (3 when converted to right shifts.) 127 * RTO.Alpha - 1/8 (3 when converted to right shifts.)
128 * RTO.Beta - 1/4 (2 when converted to right shifts.) 128 * RTO.Beta - 1/4 (2 when converted to right shifts.)
129 */ 129 */
130 __u32 rto_initial; 130 unsigned long rto_initial;
131 __u32 rto_min; 131 unsigned long rto_min;
132 __u32 rto_max; 132 unsigned long rto_max;
133 133
134 /* Note: rto_alpha and rto_beta are really defined as inverse 134 /* Note: rto_alpha and rto_beta are really defined as inverse
135 * powers of two to facilitate integer operations. 135 * powers of two to facilitate integer operations.
@@ -140,12 +140,18 @@ extern struct sctp_globals {
140 /* Max.Burst - 4 */ 140 /* Max.Burst - 4 */
141 int max_burst; 141 int max_burst;
142 142
143 /* Valid.Cookie.Life - 60 seconds */
144 int valid_cookie_life;
145
146 /* Whether Cookie Preservative is enabled(1) or not(0) */ 143 /* Whether Cookie Preservative is enabled(1) or not(0) */
147 int cookie_preserve_enable; 144 int cookie_preserve_enable;
148 145
146 /* Valid.Cookie.Life - 60 seconds */
147 unsigned long valid_cookie_life;
148
149 /* Delayed SACK timeout 200ms default*/
150 unsigned long sack_timeout;
151
152 /* HB.interval - 30 seconds */
153 unsigned long hb_interval;
154
149 /* Association.Max.Retrans - 10 attempts 155 /* Association.Max.Retrans - 10 attempts
150 * Path.Max.Retrans - 5 attempts (per destination address) 156 * Path.Max.Retrans - 5 attempts (per destination address)
151 * Max.Init.Retransmits - 8 attempts 157 * Max.Init.Retransmits - 8 attempts
@@ -168,12 +174,6 @@ extern struct sctp_globals {
168 */ 174 */
169 int rcvbuf_policy; 175 int rcvbuf_policy;
170 176
171 /* Delayed SACK timeout 200ms default*/
172 int sack_timeout;
173
174 /* HB.interval - 30 seconds */
175 int hb_interval;
176
177 /* The following variables are implementation specific. */ 177 /* The following variables are implementation specific. */
178 178
179 /* Default initialization values to be applied to new associations. */ 179 /* Default initialization values to be applied to new associations. */
@@ -828,7 +828,7 @@ struct sctp_transport {
828 __u32 rtt; /* This is the most recent RTT. */ 828 __u32 rtt; /* This is the most recent RTT. */
829 829
830 /* RTO : The current retransmission timeout value. */ 830 /* RTO : The current retransmission timeout value. */
831 __u32 rto; 831 unsigned long rto;
832 832
833 /* RTTVAR : The current RTT variation. */ 833 /* RTTVAR : The current RTT variation. */
834 __u32 rttvar; 834 __u32 rttvar;
@@ -878,22 +878,10 @@ struct sctp_transport {
878 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to 878 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to
879 * the destination address every heartbeat interval. 879 * the destination address every heartbeat interval.
880 */ 880 */
881 __u32 hbinterval; 881 unsigned long hbinterval;
882
883 /* This is the max_retrans value for the transport and will
884 * be initialized from the assocs value. This can be changed
885 * using SCTP_SET_PEER_ADDR_PARAMS socket option.
886 */
887 __u16 pathmaxrxt;
888
889 /* PMTU : The current known path MTU. */
890 __u32 pathmtu;
891 882
892 /* SACK delay timeout */ 883 /* SACK delay timeout */
893 __u32 sackdelay; 884 unsigned long sackdelay;
894
895 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */
896 __u32 param_flags;
897 885
898 /* When was the last time (in jiffies) that we heard from this 886 /* When was the last time (in jiffies) that we heard from this
899 * transport? We use this to pick new active and retran paths. 887 * transport? We use this to pick new active and retran paths.
@@ -905,6 +893,18 @@ struct sctp_transport {
905 */ 893 */
906 unsigned long last_time_ecne_reduced; 894 unsigned long last_time_ecne_reduced;
907 895
896 /* This is the max_retrans value for the transport and will
897 * be initialized from the assocs value. This can be changed
898 * using SCTP_SET_PEER_ADDR_PARAMS socket option.
899 */
900 __u16 pathmaxrxt;
901
902 /* PMTU : The current known path MTU. */
903 __u32 pathmtu;
904
905 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */
906 __u32 param_flags;
907
908 /* The number of times INIT has been sent on this transport. */ 908 /* The number of times INIT has been sent on this transport. */
909 int init_sent_count; 909 int init_sent_count;
910 910
@@ -1500,9 +1500,9 @@ struct sctp_association {
1500 * These values will be initialized by system defaults, but can 1500 * These values will be initialized by system defaults, but can
1501 * be modified via the SCTP_RTOINFO socket option. 1501 * be modified via the SCTP_RTOINFO socket option.
1502 */ 1502 */
1503 __u32 rto_initial; 1503 unsigned long rto_initial;
1504 __u32 rto_max; 1504 unsigned long rto_max;
1505 __u32 rto_min; 1505 unsigned long rto_min;
1506 1506
1507 /* Maximum number of new data packets that can be sent in a burst. */ 1507 /* Maximum number of new data packets that can be sent in a burst. */
1508 int max_burst; 1508 int max_burst;
@@ -1520,13 +1520,13 @@ struct sctp_association {
1520 __u16 init_retries; 1520 __u16 init_retries;
1521 1521
1522 /* The largest timeout or RTO value to use in attempting an INIT */ 1522 /* The largest timeout or RTO value to use in attempting an INIT */
1523 __u16 max_init_timeo; 1523 unsigned long max_init_timeo;
1524 1524
1525 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to 1525 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to
1526 * the destination address every heartbeat interval. This value 1526 * the destination address every heartbeat interval. This value
1527 * will be inherited by all new transports. 1527 * will be inherited by all new transports.
1528 */ 1528 */
1529 __u32 hbinterval; 1529 unsigned long hbinterval;
1530 1530
1531 /* This is the max_retrans value for new transports in the 1531 /* This is the max_retrans value for new transports in the
1532 * association. 1532 * association.
@@ -1538,13 +1538,14 @@ struct sctp_association {
1538 */ 1538 */
1539 __u32 pathmtu; 1539 __u32 pathmtu;
1540 1540
1541 /* SACK delay timeout */
1542 __u32 sackdelay;
1543
1544 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ 1541 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */
1545 __u32 param_flags; 1542 __u32 param_flags;
1546 1543
1547 int timeouts[SCTP_NUM_TIMEOUT_TYPES]; 1544 /* SACK delay timeout */
1545 unsigned long sackdelay;
1546
1547
1548 unsigned long timeouts[SCTP_NUM_TIMEOUT_TYPES];
1548 struct timer_list timers[SCTP_NUM_TIMEOUT_TYPES]; 1549 struct timer_list timers[SCTP_NUM_TIMEOUT_TYPES];
1549 1550
1550 /* Transport to which SHUTDOWN chunk was last sent. */ 1551 /* Transport to which SHUTDOWN chunk was last sent. */
@@ -1649,7 +1650,10 @@ struct sctp_association {
1649 /* How many duplicated TSNs have we seen? */ 1650 /* How many duplicated TSNs have we seen? */
1650 int numduptsns; 1651 int numduptsns;
1651 1652
1652 /* Number of seconds of idle time before an association is closed. */ 1653 /* Number of seconds of idle time before an association is closed.
1654 * In the association context, this is really used as a boolean
1655 * since the real timeout is stored in the timeouts array
1656 */
1653 __u32 autoclose; 1657 __u32 autoclose;
1654 1658
1655 /* These are to support 1659 /* These are to support
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index b8b38aba92b3..8d1dc24bab4c 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -1300,7 +1300,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
1300 "T1 INIT Timeout adjustment" 1300 "T1 INIT Timeout adjustment"
1301 " init_err_counter: %d" 1301 " init_err_counter: %d"
1302 " cycle: %d" 1302 " cycle: %d"
1303 " timeout: %d\n", 1303 " timeout: %ld\n",
1304 asoc->init_err_counter, 1304 asoc->init_err_counter,
1305 asoc->init_cycle, 1305 asoc->init_cycle,
1306 asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_INIT]); 1306 asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_INIT]);
@@ -1328,7 +1328,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
1328 SCTP_DEBUG_PRINTK( 1328 SCTP_DEBUG_PRINTK(
1329 "T1 COOKIE Timeout adjustment" 1329 "T1 COOKIE Timeout adjustment"
1330 " init_err_counter: %d" 1330 " init_err_counter: %d"
1331 " timeout: %d\n", 1331 " timeout: %ld\n",
1332 asoc->init_err_counter, 1332 asoc->init_err_counter,
1333 asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_COOKIE]); 1333 asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_COOKIE]);
1334 1334
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index c98ee375ba5e..6a0b1af89932 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -2995,7 +2995,7 @@ SCTP_STATIC int sctp_init_sock(struct sock *sk)
2995 sp->hbinterval = jiffies_to_msecs(sctp_hb_interval); 2995 sp->hbinterval = jiffies_to_msecs(sctp_hb_interval);
2996 sp->pathmaxrxt = sctp_max_retrans_path; 2996 sp->pathmaxrxt = sctp_max_retrans_path;
2997 sp->pathmtu = 0; // allow default discovery 2997 sp->pathmtu = 0; // allow default discovery
2998 sp->sackdelay = sctp_sack_timeout; 2998 sp->sackdelay = jiffies_to_msecs(sctp_sack_timeout);
2999 sp->param_flags = SPP_HB_ENABLE | 2999 sp->param_flags = SPP_HB_ENABLE |
3000 SPP_PMTUD_ENABLE | 3000 SPP_PMTUD_ENABLE |
3001 SPP_SACKDELAY_ENABLE; 3001 SPP_SACKDELAY_ENABLE;
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index fcd7096c953d..dc6f3ff32358 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -159,12 +159,9 @@ static ctl_table sctp_table[] = {
159 .ctl_name = NET_SCTP_PRESERVE_ENABLE, 159 .ctl_name = NET_SCTP_PRESERVE_ENABLE,
160 .procname = "cookie_preserve_enable", 160 .procname = "cookie_preserve_enable",
161 .data = &sctp_cookie_preserve_enable, 161 .data = &sctp_cookie_preserve_enable,
162 .maxlen = sizeof(long), 162 .maxlen = sizeof(int),
163 .mode = 0644, 163 .mode = 0644,
164 .proc_handler = &proc_doulongvec_ms_jiffies_minmax, 164 .proc_handler = &proc_dointvec
165 .strategy = &sctp_sysctl_jiffies_ms,
166 .extra1 = &rto_timer_min,
167 .extra2 = &rto_timer_max
168 }, 165 },
169 { 166 {
170 .ctl_name = NET_SCTP_RTO_ALPHA, 167 .ctl_name = NET_SCTP_RTO_ALPHA,
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index 68d73e2dd155..160f62ad1cc5 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -350,7 +350,7 @@ void sctp_transport_update_rto(struct sctp_transport *tp, __u32 rtt)
350 tp->rto_pending = 0; 350 tp->rto_pending = 0;
351 351
352 SCTP_DEBUG_PRINTK("%s: transport: %p, rtt: %d, srtt: %d " 352 SCTP_DEBUG_PRINTK("%s: transport: %p, rtt: %d, srtt: %d "
353 "rttvar: %d, rto: %d\n", __FUNCTION__, 353 "rttvar: %d, rto: %ld\n", __FUNCTION__,
354 tp, rtt, tp->srtt, tp->rttvar, tp->rto); 354 tp, rtt, tp->srtt, tp->rttvar, tp->rto);
355} 355}
356 356