BUG/MINOR: tcp: Don't alter counters returned by tcp info fetchers
There are 2 kinds of tcp info fetchers. Those returning a time value (fc_rtt and
fc_rttval) and those returning a counter (fc_unacked, fc_sacked, fc_retrans,
fc_fackets, fc_lost, fc_reordering). Because of a bug, the counters were handled
as time values, and by default, were divided by 1000 (because of an invalid
conversion from us to ms). To work around this bug and have the right value, the
argument "us" had to be specified.
So now, tcp info fetchers returning a counter don't support any argument
anymore. To not break old configurations, if an argument is provided, it is
ignored and a warning is emitted during the configuration parsing.
In addition, parameter validiation is now performed during the configuration
parsing.
This patch must be backported as far as 1.7.
(cherry picked from commit ba0c53ef71cd7d2b344de318742d0ef239fd34e4)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/doc/configuration.txt b/doc/configuration.txt
index 601c20e..f17a557 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -14969,37 +14969,37 @@
operating system does not support TCP_INFO, for example Linux kernels before
2.4, the sample fetch fails.
-fc_unacked(<unit>) : integer
+fc_unacked : integer
Returns the unacked counter measured by the kernel for the client connection.
If the server connection is not established, if the connection is not TCP or
if the operating system does not support TCP_INFO, for example Linux kernels
before 2.4, the sample fetch fails.
-fc_sacked(<unit>) : integer
+fc_sacked : integer
Returns the sacked counter measured by the kernel for the client connection.
If the server connection is not established, if the connection is not TCP or
if the operating system does not support TCP_INFO, for example Linux kernels
before 2.4, the sample fetch fails.
-fc_retrans(<unit>) : integer
+fc_retrans : integer
Returns the retransmits counter measured by the kernel for the client
connection. If the server connection is not established, if the connection is
not TCP or if the operating system does not support TCP_INFO, for example
Linux kernels before 2.4, the sample fetch fails.
-fc_fackets(<unit>) : integer
+fc_fackets : integer
Returns the fack counter measured by the kernel for the client
connection. If the server connection is not established, if the connection is
not TCP or if the operating system does not support TCP_INFO, for example
Linux kernels before 2.4, the sample fetch fails.
-fc_lost(<unit>) : integer
+fc_lost : integer
Returns the lost counter measured by the kernel for the client
connection. If the server connection is not established, if the connection is
not TCP or if the operating system does not support TCP_INFO, for example
Linux kernels before 2.4, the sample fetch fails.
-fc_reordering(<unit>) : integer
+fc_reordering : integer
Returns the reordering counter measured by the kernel for the client
connection. If the server connection is not established, if the connection is
not TCP or if the operating system does not support TCP_INFO, for example