From e7f7a931405a4fffc5e7c429b4893ce174f90784 Mon Sep 17 00:00:00 2001 From: Andrei Pelinescu-Onciul Date: Fri, 7 Nov 2008 14:53:35 +0000 Subject: [PATCH] sctp: new config option: sctp_send_retries - new ser.cfg option sctp_send_retries + doc --- NEWS | 8 ++++++++ cfg.lex | 3 +++ cfg.y | 9 +++++++++ 3 files changed, 20 insertions(+) diff --git a/NEWS b/NEWS index 6320b01fec..0b0d031f5e 100644 --- a/NEWS +++ b/NEWS @@ -230,6 +230,14 @@ new config variables: assocation (default: 180 s). sctp_send_ttl = milliseconds - number of milliseconds before an unsent message/chunk is dropped (default: 32000 ms or 32 s). + sctp_send_retries - how many times to attempt re-sending a message on a + re-opened association, if the sctp stack did give up + sending it (it's not related to sctp protocol level + retransmission). Useful to improve reliability with + peers that reboot/restart or fail over to another + machine. WARNING: use with care and low values (e.g. + 1-3) to avoid "multiplying" traffic to unresponding + hosts (default: 0). server_id = number - A configurable unique server id that can be used to discriminate server instances within a cluster of servers when all other information, such as IP adddresses diff --git a/cfg.lex b/cfg.lex index 62abe43c58..5af02dba6f 100644 --- a/cfg.lex +++ b/cfg.lex @@ -330,6 +330,7 @@ SCTP_SOCKET_RCVBUF "sctp_socket_rcvbuf"|"sctp_socket_receive_buffer" SCTP_SOCKET_SNDBUF "sctp_socket_sndbuf"|"sctp_socket_send_buffer" SCTP_AUTOCLOSE "sctp_autoclose" SCTP_SEND_TTL "sctp_send_ttl" +SCTP_SEND_RETRIES "sctp_send_retries" ADVERTISED_ADDRESS "advertised_address" ADVERTISED_PORT "advertised_port" DISABLE_CORE "disable_core_dump" @@ -646,6 +647,8 @@ EAT_ABLE [\ \t\b\r] return SCTP_AUTOCLOSE; } {SCTP_SEND_TTL} { count(); yylval.strval=yytext; return SCTP_SEND_TTL; } +{SCTP_SEND_RETRIES} { count(); yylval.strval=yytext; + return SCTP_SEND_RETRIES; } {SERVER_SIGNATURE} { count(); yylval.strval=yytext; return SERVER_SIGNATURE; } {REPLY_TO_VIA} { count(); yylval.strval=yytext; return REPLY_TO_VIA; } {ADVERTISED_ADDRESS} { count(); yylval.strval=yytext; diff --git a/cfg.y b/cfg.y index 757bbc8de6..8925c63586 100644 --- a/cfg.y +++ b/cfg.y @@ -386,6 +386,7 @@ static void free_socket_id_lst(struct socket_id* i); %token SCTP_SOCKET_SNDBUF %token SCTP_AUTOCLOSE %token SCTP_SEND_TTL +%token SCTP_SEND_RETRIES %token ADVERTISED_ADDRESS %token ADVERTISED_PORT %token DISABLE_CORE @@ -1142,6 +1143,14 @@ assign_stm: #endif } | SCTP_SEND_TTL EQUAL error { yyerror("number expected"); } + | SCTP_SEND_RETRIES EQUAL NUMBER { + #ifdef USE_SCTP + sctp_options.sctp_send_retries=$3; + #else + warn("sctp support not compiled in"); + #endif + } + | SCTP_SEND_RETRIES EQUAL error { yyerror("number expected"); } | SERVER_SIGNATURE EQUAL NUMBER { server_signature=$3; } | SERVER_SIGNATURE EQUAL error { yyerror("boolean value expected"); } | REPLY_TO_VIA EQUAL NUMBER { reply_to_via=$3; } -- 2.20.1