aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_debug.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-12-24 16:54:34 -0800
committerDamjan Marion <dmarion@me.com>2018-12-26 15:45:27 +0000
commit85a3ddd4c854c6217272d8be031cfcb04d2e7685 (patch)
treeec297721311d61dcf50d9137fb3c0230e279de1e /src/vnet/tcp/tcp_debug.h
parenteb25abdfd8d39261430c73028c11b6a94cacf818 (diff)
tcp: separate active and passive establish timers
Change-Id: Ia2241e963cf45765d8d17c65eea781edbf74d4f9 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp_debug.h')
-rwxr-xr-xsrc/vnet/tcp/tcp_debug.h85
1 files changed, 44 insertions, 41 deletions
diff --git a/src/vnet/tcp/tcp_debug.h b/src/vnet/tcp/tcp_debug.h
index 5032588ca1e..b848d341dd7 100755
--- a/src/vnet/tcp/tcp_debug.h
+++ b/src/vnet/tcp/tcp_debug.h
@@ -388,6 +388,49 @@ if (_tc) \
ed->data[3] = _tc->snd_nxt - _tc->iss; \
ed->data[4] = _tc->rcv_nxt - _tc->irs; \
}
+
+#define TCP_EVT_TIMER_POP_HANDLER(_tc_index, _timer_id, ...) \
+{ \
+ tcp_connection_t *_tc; \
+ if (_timer_id == TCP_TIMER_RETRANSMIT_SYN \
+ || _timer_id == TCP_TIMER_ESTABLISH_AO) \
+ { \
+ _tc = tcp_half_open_connection_get (_tc_index); \
+ } \
+ else \
+ { \
+ u32 _thread_index = vlib_get_thread_index (); \
+ _tc = tcp_connection_get (_tc_index, _thread_index); \
+ } \
+ ELOG_TYPE_DECLARE (_e) = \
+ { \
+ .format = "timer-pop: %s (%d)", \
+ .format_args = "t4i4", \
+ .n_enum_strings = 8, \
+ .enum_strings = { \
+ "retransmit", \
+ "delack", \
+ "persist", \
+ "keep", \
+ "waitclose", \
+ "retransmit syn", \
+ "establish", \
+ "establish-ao", \
+ }, \
+ }; \
+ if (_tc) \
+ { \
+ DECLARE_ETD(_tc, _e, 2); \
+ ed->data[0] = _timer_id; \
+ ed->data[1] = _timer_id; \
+ } \
+ else \
+ { \
+ clib_warning ("pop %d for unexisting connection %d", _timer_id, \
+ _tc_index); \
+ } \
+}
+
#else
#define TCP_EVT_SYN_SENT_HANDLER(_tc, ...)
#define TCP_EVT_SYNACK_SENT_HANDLER(_tc, ...)
@@ -398,6 +441,7 @@ if (_tc) \
#define TCP_EVT_FIN_RCVD_HANDLER(_tc, ...)
#define TCP_EVT_RST_RCVD_HANDLER(_tc, ...)
#define TCP_EVT_STATE_CHANGE_HANDLER(_tc, ...)
+#define TCP_EVT_TIMER_POP_HANDLER(_tc_index, _timer_id, ...)
#endif
#if TCP_DEBUG_SM > 1
@@ -542,52 +586,11 @@ if (_av > 0) \
ed->data[4] = _tc->rcv_wnd - (_tc->rcv_nxt - _tc->rcv_las); \
}
-#define TCP_EVT_TIMER_POP_HANDLER(_tc_index, _timer_id, ...) \
-{ \
- tcp_connection_t *_tc; \
- if (_timer_id == TCP_TIMER_RETRANSMIT_SYN \
- || _timer_id == TCP_TIMER_ESTABLISH) \
- { \
- _tc = tcp_half_open_connection_get (_tc_index); \
- } \
- else \
- { \
- u32 _thread_index = vlib_get_thread_index (); \
- _tc = tcp_connection_get (_tc_index, _thread_index); \
- } \
- ELOG_TYPE_DECLARE (_e) = \
- { \
- .format = "timer-pop: %s (%d)", \
- .format_args = "t4i4", \
- .n_enum_strings = 7, \
- .enum_strings = { \
- "retransmit", \
- "delack", \
- "persist", \
- "keep", \
- "waitclose", \
- "retransmit syn", \
- "establish", \
- }, \
- }; \
- if (_tc) \
- { \
- DECLARE_ETD(_tc, _e, 2); \
- ed->data[0] = _timer_id; \
- ed->data[1] = _timer_id; \
- } \
- else \
- { \
- clib_warning ("pop %d for unexisting connection %d", _timer_id, \
- _tc_index); \
- } \
-}
#else
#define TCP_EVT_ACK_SENT_HANDLER(_tc, ...)
#define TCP_EVT_ACK_RCVD_HANDLER(_tc, ...)
#define TCP_EVT_PKTIZE_HANDLER(_tc, ...)
#define TCP_EVT_INPUT_HANDLER(_tc, _type, _len, _written, ...)
-#define TCP_EVT_TIMER_POP_HANDLER(_tc_index, _timer_id, ...)
#endif
/*