summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_debug.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-10-31 23:09:22 -0700
committerDave Barach <openvpp@barachs.net>2018-11-01 20:43:29 +0000
commite55a6d7a97044c2f4fd0231242e062924d75c7b6 (patch)
treeae58b4562748db8397604029261008b94aaecd8c /src/vnet/tcp/tcp_debug.h
parentf6c68d74eca9038516986254846de60a4f7c02ae (diff)
tcp: fast retransmit pacing
Force pacing for fast retransmit to avoid bursts of retransmitted packets. Change-Id: I2ff42c328899b36322c4de557b1f7d853dba8fe2 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp_debug.h')
-rwxr-xr-xsrc/vnet/tcp/tcp_debug.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/vnet/tcp/tcp_debug.h b/src/vnet/tcp/tcp_debug.h
index 8f626b1afeb..cd4a6f04d6e 100755
--- a/src/vnet/tcp/tcp_debug.h
+++ b/src/vnet/tcp/tcp_debug.h
@@ -627,10 +627,8 @@ if (_av > 0) \
#if TCP_DEBUG_CC
-#define TCP_EVT_CC_EVT_HANDLER(_tc, _sub_evt, ...) \
+#define TCP_EVT_CC_EVT_PRINT(_tc, _sub_evt) \
{ \
- if (_tc->snd_una != _tc->iss) \
- TCP_EVT_CC_STAT_PRINT (_tc); \
ELOG_TYPE_DECLARE (_e) = \
{ \
.format = "cc: %s snd_space %u snd_una %u out %u flight %u", \
@@ -638,8 +636,8 @@ if (_av > 0) \
.n_enum_strings = 7, \
.enum_strings = { \
"fast-rxt", \
- "rxt-timeout", \
"first-rxt", \
+ "rxt-timeout", \
"recovered", \
"congestion", \
"undo", \
@@ -653,8 +651,18 @@ if (_av > 0) \
ed->data[3] = tcp_bytes_out(_tc); \
ed->data[4] = tcp_flight_size (_tc); \
}
+
+#define TCP_EVT_CC_EVT_HANDLER(_tc, _sub_evt, ...) \
+{ \
+ if (_tc->snd_una != _tc->iss) \
+ TCP_EVT_CC_STAT_PRINT (_tc); \
+ if ((_sub_evt <= 1 && TCP_DEBUG_CC > 1) \
+ || (_sub_evt > 1 && TCP_DEBUG_CC > 0)) \
+ TCP_EVT_CC_EVT_PRINT (_tc, _sub_evt); \
+}
#else
-#define TCP_EVT_CC_EVT_HANDLER(_tc, _sub_evt, ...)
+#define TCP_EVT_CC_EVT_HANDLER(_tc, _sub_evt, ...) \
+
#endif
#if TCP_DEBUG_CC > 1