Browse code

core: cfg vars for the new sctp options

- new script vars: sctp_asocmaxrxt,
sctp_init_max_attempts, sctp_init_max_timeo, sctp_hbinterval,
sctp_pathmaxrxt, sctp_sack_delay, sctp_sack_freq, sctp_max_burst.
- updated NEWS

Andrei Pelinescu-Onciul authored on 10/06/2009 23:24:42
Showing 3 changed files
... ...
@@ -288,18 +288,64 @@ new config variables:
288 288
                       1-3) to avoid "multiplying" traffic to unresponding 
289 289
                       hosts (default: 0).
290 290
                       Can be changed at runtime.
291
-  sctp_srto_initial = milliseconds - initial value of the retr. timeout,
292
-                      used in RTO calculations (default: OS specific).
293
-                      Can be changed at runtime (sctp srto_initial) but it
294
-                      will affect only new associations.
295
-  sctp_srto_max     = milliseconds - maximum value of the retransmission
296
-                      timeout (RTO) (default: OS specific).
297
-                      Can be changed at runtime (sctp srto_max) but it
298
-                      will affect only new associations.
299
-  sctp_srto_min     = milliseconds - minimum value of the retransmission
300
-                      timeout (RTO) (default: OS specific).
301
-                      Can be changed at runtime (sctp srto_min) but it 
302
-                      will affect only new associations.
291
+  sctp_srto_initial = milliseconds - initial value of the retr. timeout, used
292
+     in RTO calculations (default: OS specific).
293
+     Can be changed at runtime (sctp srto_initial) but it will affect only new
294
+     associations.
295
+  sctp_srto_max = milliseconds - maximum value of the retransmission timeout
296
+     (RTO) (default: OS specific).
297
+     WARNING: values lower then the sctp sack_delay will cause lots of
298
+     retransmissions and connection instability (see sctp_srto_min for more
299
+     details).
300
+     Can be changed at runtime (sctp srto_max) but it will affect only new
301
+     associations.
302
+  sctp_srto_min = milliseconds - minimum value of the retransmission timeout
303
+     (RTO) (default: OS specific).
304
+     WARNING: values lower then the sctp sack_delay of any peer might cause
305
+     retransmissions and possible interoperability problems. According to the
306
+     standard the sack_delay should be between 200 and 500 ms, so avoid trying
307
+     values lower then 500 ms unless you control all the possible sctp peers
308
+     and you do make sure their sack_delay is higher or their sack_freq is 1.
309
+     Can be changed at runtime (sctp srto_min) but it will affect only new
310
+     associations.
311
+  sctp_asocmaxrxt   = number - maximum retransmissions attempts per association
312
+     (default: OS specific). It should be set to sctp_pathmaxrxt * no. of
313
+     expected paths.
314
+     Can be changed at runtime (sctp asocmaxrxt) but it will affect only new
315
+     associations.
316
+  sctp_init_max_attempts = number - maximum INIT retransmission attempts
317
+     (default: OS specific).
318
+     Can be changed at runtime (sctp init_max_attempts).
319
+  sctp_init_max_timeo = milliseconds - maximum INIT retransmission timeout (RTO
320
+     max for INIT). Default: OS specific.
321
+     Can be changed at runtime (sctp init_max_timeo).
322
+  sctp_hbinterval = milliseconds - sctp heartbeat interval. Setting it to -1
323
+     will disable the heartbeats. Default: OS specific.
324
+     Can be changed at runtime (sctp hbinterval) but it will affect only new
325
+     associations.
326
+  sctp_pathmaxrxt = number - maximum retransmission attempts per path (see also
327
+     sctp_asocmaxrxt). Default: OS specific.
328
+     Can be changed at runtime (sctp pathmaxrxt) but it will affect only new
329
+     associations.
330
+  sctp_sack_delay = milliseconds - delay until an ACK is generated after
331
+     receiving a packet. Default: OS specific.
332
+     WARNING: a value higher then srto_min can cause a lot of retransmissions
333
+     (and strange problems). A value higher then srto_max will result in very
334
+     high connections instability. According to the standard the sack_delay
335
+     value should be between 200 and 500 ms.
336
+     Can be changed at runtime (sctp sack_delay) but it will affect only new
337
+     associations.
338
+  sctp_sack_freq = number - number of packets received before an ACK is sent
339
+     (without waiting for the sack_delay to expire).  Default: OS specific.
340
+     Note: on linux with lksctp up to and including 1.0.9 is not possible to
341
+     set this value (having it in the config will produce a warning on
342
+     startup).
343
+     Can be changed at runtime (sctp sack_freq) but it will affect only new
344
+     associations.
345
+  sctp_max_burst = number - maximum burst of packets that can be emitted by an
346
+     association. Default: OS specific.
347
+     Can be changed at runtime (sctp max_burst) but it will affect only new 
348
+     associations.
303 349
   server_id = number - A configurable unique server id that can be used to
304 350
                        discriminate server instances within a cluster of
305 351
                        servers when all other information, such as IP addresses
... ...
@@ -341,6 +341,15 @@ SCTP_SEND_RETRIES	"sctp_send_retries"
341 341
 SCTP_SRTO_INITIAL	"sctp_srto_initial"
342 342
 SCTP_SRTO_MAX		"sctp_srto_max"
343 343
 SCTP_SRTO_MIN		"sctp_srto_min"
344
+SCTP_ASOCMAXRXT		"sctp_asocmaxrxt"
345
+SCTP_INIT_MAX_ATTEMPTS		"sctp_init_max_attempts"
346
+SCTP_INIT_MAX_TIMEO			"sctp_init_max_timeo"
347
+SCTP_HBINTERVAL				"sctp_hbinterval"
348
+SCTP_PATHMAXRXT				"sctp_pathmaxrxt"
349
+SCTP_SACK_DELAY				"sctp_sack_delay"
350
+SCTP_SACK_FREQ				"sctp_sack_freq"
351
+SCTP_MAX_BURST				"sctp_max_burst"
352
+
344 353
 ADVERTISED_ADDRESS	"advertised_address"
345 354
 ADVERTISED_PORT		"advertised_port"
346 355
 DISABLE_CORE		"disable_core_dump"
... ...
@@ -676,6 +685,22 @@ EAT_ABLE	[\ \t\b\r]
676 676
 										return SCTP_SRTO_MAX; }
677 677
 <INITIAL>{SCTP_SRTO_MIN}	{ count(); yylval.strval=yytext;
678 678
 										return SCTP_SRTO_MIN; }
679
+<INITIAL>{SCTP_ASOCMAXRXT}	{ count(); yylval.strval=yytext;
680
+										return SCTP_ASOCMAXRXT; }
681
+<INITIAL>{SCTP_INIT_MAX_ATTEMPTS}	{ count(); yylval.strval=yytext;
682
+										return SCTP_INIT_MAX_ATTEMPTS; }
683
+<INITIAL>{SCTP_INIT_MAX_TIMEO}	{ count(); yylval.strval=yytext;
684
+										return SCTP_INIT_MAX_TIMEO; }
685
+<INITIAL>{SCTP_HBINTERVAL}	{ count(); yylval.strval=yytext;
686
+										return SCTP_HBINTERVAL; }
687
+<INITIAL>{SCTP_PATHMAXRXT}	{ count(); yylval.strval=yytext;
688
+										return SCTP_PATHMAXRXT; }
689
+<INITIAL>{SCTP_SACK_DELAY}	{ count(); yylval.strval=yytext;
690
+										return SCTP_SACK_DELAY; }
691
+<INITIAL>{SCTP_SACK_FREQ}	{ count(); yylval.strval=yytext;
692
+										return SCTP_SACK_FREQ; }
693
+<INITIAL>{SCTP_MAX_BURST}	{ count(); yylval.strval=yytext;
694
+										return SCTP_MAX_BURST; }
679 695
 <INITIAL>{SERVER_SIGNATURE}	{ count(); yylval.strval=yytext; return SERVER_SIGNATURE; }
680 696
 <INITIAL>{REPLY_TO_VIA}	{ count(); yylval.strval=yytext; return REPLY_TO_VIA; }
681 697
 <INITIAL>{ADVERTISED_ADDRESS}	{	count(); yylval.strval=yytext;
... ...
@@ -405,6 +405,14 @@ static void free_socket_id_lst(struct socket_id* i);
405 405
 %token SCTP_SRTO_INITIAL
406 406
 %token SCTP_SRTO_MAX
407 407
 %token SCTP_SRTO_MIN
408
+%token SCTP_ASOCMAXRXT
409
+%token SCTP_INIT_MAX_ATTEMPTS
410
+%token SCTP_INIT_MAX_TIMEO
411
+%token SCTP_HBINTERVAL
412
+%token SCTP_PATHMAXRXT
413
+%token SCTP_SACK_DELAY
414
+%token SCTP_SACK_FREQ
415
+%token SCTP_MAX_BURST
408 416
 %token ADVERTISED_ADDRESS
409 417
 %token ADVERTISED_PORT
410 418
 %token DISABLE_CORE
... ...
@@ -1208,6 +1216,38 @@ assign_stm:
1208 1208
 			IF_SCTP(sctp_default_cfg.srto_min=$3);
1209 1209
 	}
1210 1210
 	| SCTP_SRTO_MIN EQUAL error { yyerror("number expected"); }
1211
+	| SCTP_ASOCMAXRXT EQUAL NUMBER {
1212
+			IF_SCTP(sctp_default_cfg.asocmaxrxt=$3);
1213
+	}
1214
+	| SCTP_ASOCMAXRXT EQUAL error { yyerror("number expected"); }
1215
+	| SCTP_INIT_MAX_ATTEMPTS EQUAL NUMBER {
1216
+			IF_SCTP(sctp_default_cfg.init_max_attempts=$3);
1217
+	}
1218
+	| SCTP_INIT_MAX_ATTEMPTS EQUAL error { yyerror("number expected"); }
1219
+	| SCTP_INIT_MAX_TIMEO EQUAL NUMBER {
1220
+			IF_SCTP(sctp_default_cfg.init_max_timeo=$3);
1221
+	}
1222
+	| SCTP_INIT_MAX_TIMEO EQUAL error { yyerror("number expected"); }
1223
+	| SCTP_HBINTERVAL EQUAL NUMBER {
1224
+			IF_SCTP(sctp_default_cfg.hbinterval=$3);
1225
+	}
1226
+	| SCTP_HBINTERVAL EQUAL error { yyerror("number expected"); }
1227
+	| SCTP_PATHMAXRXT EQUAL NUMBER {
1228
+			IF_SCTP(sctp_default_cfg.pathmaxrxt=$3);
1229
+	}
1230
+	| SCTP_PATHMAXRXT EQUAL error { yyerror("number expected"); }
1231
+	| SCTP_SACK_DELAY EQUAL NUMBER {
1232
+			IF_SCTP(sctp_default_cfg.sack_delay=$3);
1233
+	}
1234
+	| SCTP_SACK_DELAY EQUAL error { yyerror("number expected"); }
1235
+	| SCTP_SACK_FREQ EQUAL NUMBER {
1236
+			IF_SCTP(sctp_default_cfg.sack_freq=$3);
1237
+	}
1238
+	| SCTP_SACK_FREQ EQUAL error { yyerror("number expected"); }
1239
+	| SCTP_MAX_BURST EQUAL NUMBER {
1240
+			IF_SCTP(sctp_default_cfg.max_burst=$3);
1241
+	}
1242
+	| SCTP_MAX_BURST EQUAL error { yyerror("number expected"); }
1211 1243
 	| SERVER_SIGNATURE EQUAL NUMBER { server_signature=$3; }
1212 1244
 	| SERVER_SIGNATURE EQUAL error { yyerror("boolean value expected"); }
1213 1245
 	| REPLY_TO_VIA EQUAL NUMBER { reply_to_via=$3; }