aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/tcp/tcp_debug.h')
-rwxr-xr-xsrc/vnet/tcp/tcp_debug.h47
1 files changed, 35 insertions, 12 deletions
diff --git a/src/vnet/tcp/tcp_debug.h b/src/vnet/tcp/tcp_debug.h
index ccf12dae1bc..8f626b1afeb 100755
--- a/src/vnet/tcp/tcp_debug.h
+++ b/src/vnet/tcp/tcp_debug.h
@@ -629,6 +629,8 @@ if (_av > 0) \
#define TCP_EVT_CC_EVT_HANDLER(_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", \
@@ -788,9 +790,11 @@ if (TCP_DEBUG_CC > 1) \
#define STATS_INTERVAL 1
-#define TCP_EVT_CC_RTO_STAT_HANDLER(_tc, ...) \
-{ \
-if (_tc->c_cc_stat_tstamp + STATS_INTERVAL < tcp_time_now()) \
+#define tcp_cc_time_to_print_stats(_tc) \
+ _tc->c_cc_stat_tstamp + STATS_INTERVAL < tcp_time_now() \
+ || tcp_in_fastrecovery (_tc) \
+
+#define TCP_EVT_CC_RTO_STAT_PRINT(_tc) \
{ \
ELOG_TYPE_DECLARE (_e) = \
{ \
@@ -801,29 +805,40 @@ if (_tc->c_cc_stat_tstamp + STATS_INTERVAL < tcp_time_now()) \
ed->data[0] = _tc->rto; \
ed->data[1] = _tc->srtt; \
ed->data[2] = _tc->rttvar; \
-} \
}
-#define TCP_EVT_CC_SND_STAT_HANDLER(_tc, ...) \
+
+#define TCP_EVT_CC_RTO_STAT_HANDLER(_tc, ...) \
+{ \
+if (tcp_cc_time_to_print_stats (_tc)) \
{ \
-if (_tc->c_cc_stat_tstamp + STATS_INTERVAL < tcp_time_now()) \
+ TCP_EVT_CC_RTO_STAT_PRINT (_tc); \
+} \
+}
+
+#define TCP_EVT_CC_SND_STAT_PRINT(_tc) \
{ \
ELOG_TYPE_DECLARE (_e) = \
{ \
- .format = "snd_stat: dack %u sacked %u lost %u out %u rxt %u", \
+ .format = "snd_stat: cc_space %u sacked %u lost %u out %u rxt %u", \
.format_args = "i4i4i4i4i4", \
}; \
DECLARE_ETD(_tc, _e, 5); \
- ed->data[0] = _tc->rcv_dupacks; \
+ ed->data[0] = tcp_available_cc_snd_space (_tc); \
ed->data[1] = _tc->sack_sb.sacked_bytes; \
ed->data[2] = _tc->sack_sb.lost_bytes; \
ed->data[3] = tcp_bytes_out (_tc); \
ed->data[3] = _tc->snd_rxt_bytes; \
-} \
}
-#define TCP_EVT_CC_STAT_HANDLER(_tc, ...) \
+#define TCP_EVT_CC_SND_STAT_HANDLER(_tc, ...) \
+{ \
+if (tcp_cc_time_to_print_stats (_tc)) \
{ \
-if (_tc->c_cc_stat_tstamp + STATS_INTERVAL < tcp_time_now()) \
+ TCP_EVT_CC_SND_STAT_PRINT(_tc); \
+} \
+}
+
+#define TCP_EVT_CC_STAT_PRINT(_tc) \
{ \
ELOG_TYPE_DECLARE (_e) = \
{ \
@@ -836,7 +851,15 @@ if (_tc->c_cc_stat_tstamp + STATS_INTERVAL < tcp_time_now()) \
ed->data[2] = tcp_snd_space (_tc); \
ed->data[3] = _tc->ssthresh; \
ed->data[4] = _tc->snd_wnd; \
- TCP_EVT_CC_RTO_STAT_HANDLER (_tc); \
+ TCP_EVT_CC_RTO_STAT_PRINT (_tc); \
+ TCP_EVT_CC_SND_STAT_PRINT (_tc); \
+}
+
+#define TCP_EVT_CC_STAT_HANDLER(_tc, ...) \
+{ \
+if (tcp_cc_time_to_print_stats (_tc)) \
+{ \
+ TCP_EVT_CC_STAT_PRINT (_tc); \
_tc->c_cc_stat_tstamp = tcp_time_now(); \
} \
}