]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: spoe: Add max-waiting-frames directive in spoe-agent configuration
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 Jan 2018 14:32:22 +0000 (15:32 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 Feb 2018 15:00:32 +0000 (16:00 +0100)
This is the maximum number of frames waiting for an acknowledgement on the same
connection. This value is only used when the pipelinied or asynchronus exchanges
between HAProxy and SPOA are enabled. By default, it is set to 20.

doc/SPOE.txt
src/flt_spoe.c

index 7ce2bef842d021f492bdb447e3f8db9ea0c4939e..cde3b1dffe1b52cf33ab7b26acf0f7f6a7b5d423 100644 (file)
@@ -167,6 +167,7 @@ spoe-agent <name>
     - maxconnrate
     - maxerrrate
     - max-frame-size
+    - max-waiting-frames
     - messages
     - [no] option async
     - [no] option pipelining
@@ -209,6 +210,10 @@ max-frame-size <number>
   It must be in the range [256, tune.bufsize-4] (4 bytes are reserved for the
   frame length). By default, it is set to (tune.bufsize-4).
 
+max-waiting-frames <number>
+  Set the maximum number of frames waiting for an acknowledgement on the same
+  connection. This value is only used when the pipelinied or asynchronus
+  exchanges between HAProxy and SPOA are enabled. By default, it is set to 20.
 
 messages <msg-name> ...
   Declare the list of SPOE messages that an agent will handle.
index 5848fdc7b30c0c069f9f40512f0eec3ee9e28ae2..8694b07a76851280ef0b4f9bb8499aa9e82fd4fd 100644 (file)
@@ -3455,6 +3455,23 @@ cfg_parse_spoe_agent(const char *file, int linenum, char **args, int kwm)
                        goto out;
                }
        }
+       else if (!strcmp(args[0], "max-waiting-frames")) {
+               if (!*args[1]) {
+                       ha_alert("parsing [%s:%d] : '%s' expects an integer argument.\n",
+                                file, linenum, args[0]);
+                        err_code |= ERR_ALERT | ERR_FATAL;
+                        goto out;
+                }
+               if (alertif_too_many_args(1, file, linenum, args, &err_code))
+                       goto out;
+               curagent->max_fpa = atol(args[1]);
+               if (curagent->max_fpa < 1) {
+                       ha_alert("parsing [%s:%d] : '%s' expects a positive integer argument.\n",
+                                file, linenum, args[0]);
+                       err_code |= ERR_ALERT | ERR_FATAL;
+                       goto out;
+               }
+       }
        else if (!strcmp(args[0], "register-var-names")) {
                int   cur_arg;