Browse code

sctp: new config option: sctp_send_retries

- new ser.cfg option sctp_send_retries + doc

Andrei Pelinescu-Onciul authored on 07/11/2008 14:53:35
Showing 3 changed files
... ...
@@ -230,6 +230,14 @@ new config variables:
230 230
      assocation (default: 180 s).
231 231
   sctp_send_ttl = milliseconds - number of milliseconds before an unsent
232 232
      message/chunk is dropped (default: 32000 ms or 32 s).
233
+  sctp_send_retries - how many times to attempt re-sending a message on a
234
+                      re-opened association, if the sctp stack did give up
235
+                      sending it (it's not related to sctp protocol level
236
+                      retransmission). Useful to improve reliability with
237
+                      peers that reboot/restart or fail over to another 
238
+                      machine. WARNING: use with care and low values (e.g.
239
+                      1-3) to avoid "multiplying" traffic to unresponding 
240
+                      hosts (default: 0).
233 241
   server_id = number - A configurable unique server id that can be used to
234 242
                        discriminate server instances within a cluster of
235 243
                        servers when all other information, such as IP adddresses
... ...
@@ -330,6 +330,7 @@ SCTP_SOCKET_RCVBUF	"sctp_socket_rcvbuf"|"sctp_socket_receive_buffer"
330 330
 SCTP_SOCKET_SNDBUF	"sctp_socket_sndbuf"|"sctp_socket_send_buffer"
331 331
 SCTP_AUTOCLOSE	"sctp_autoclose"
332 332
 SCTP_SEND_TTL	"sctp_send_ttl"
333
+SCTP_SEND_RETRIES	"sctp_send_retries"
333 334
 ADVERTISED_ADDRESS	"advertised_address"
334 335
 ADVERTISED_PORT		"advertised_port"
335 336
 DISABLE_CORE		"disable_core_dump"
... ...
@@ -646,6 +647,8 @@ EAT_ABLE	[\ \t\b\r]
646 646
 										return SCTP_AUTOCLOSE; }
647 647
 <INITIAL>{SCTP_SEND_TTL}	{ count(); yylval.strval=yytext;
648 648
 										return SCTP_SEND_TTL; }
649
+<INITIAL>{SCTP_SEND_RETRIES}	{ count(); yylval.strval=yytext;
650
+										return SCTP_SEND_RETRIES; }
649 651
 <INITIAL>{SERVER_SIGNATURE}	{ count(); yylval.strval=yytext; return SERVER_SIGNATURE; }
650 652
 <INITIAL>{REPLY_TO_VIA}	{ count(); yylval.strval=yytext; return REPLY_TO_VIA; }
651 653
 <INITIAL>{ADVERTISED_ADDRESS}	{	count(); yylval.strval=yytext;
... ...
@@ -386,6 +386,7 @@ static void free_socket_id_lst(struct socket_id* i);
386 386
 %token SCTP_SOCKET_SNDBUF
387 387
 %token SCTP_AUTOCLOSE
388 388
 %token SCTP_SEND_TTL
389
+%token SCTP_SEND_RETRIES
389 390
 %token ADVERTISED_ADDRESS
390 391
 %token ADVERTISED_PORT
391 392
 %token DISABLE_CORE
... ...
@@ -1142,6 +1143,14 @@ assign_stm:
1142 1142
 		#endif
1143 1143
 	}
1144 1144
 	| SCTP_SEND_TTL EQUAL error { yyerror("number expected"); }
1145
+	| SCTP_SEND_RETRIES EQUAL NUMBER {
1146
+		#ifdef USE_SCTP
1147
+			sctp_options.sctp_send_retries=$3;
1148
+		#else
1149
+			warn("sctp support not compiled in");
1150
+		#endif
1151
+	}
1152
+	| SCTP_SEND_RETRIES EQUAL error { yyerror("number expected"); }
1145 1153
 	| SERVER_SIGNATURE EQUAL NUMBER { server_signature=$3; }
1146 1154
 	| SERVER_SIGNATURE EQUAL error { yyerror("boolean value expected"); }
1147 1155
 	| REPLY_TO_VIA EQUAL NUMBER { reply_to_via=$3; }