summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-08-20 07:09:31 -0700
committerDamjan Marion <dmarion@me.com>2019-09-24 20:55:30 +0000
commite73bd85033dfd3987e3a06967319102cc9a1e04d (patch)
tree53a56f9390e6e903427994589ee3fde7c74263d3 /src/vnet/tcp/tcp.c
parent99691949a55113ec7d110da0f6d5430462286c8c (diff)
tcp: add option for always on event logging
Type: feature Add option to always compile in debugging infra. Debug verbosity can be controlled via configuration updatable via cli. Compile time inclusion and configuration of event logging verbosity is still available in order to minimize event logging impact. Change-Id: I9d946efe9fa4204fdace1adb1d6588c97b5ae758 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit a436a42221280888acd09858c7353e694c359bca)
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index f9cb2a28e27..bfab1d6f0c5 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -139,7 +139,7 @@ tcp_connection_bind (u32 session_index, transport_endpoint_t * lcl)
tcp_connection_timers_init (listener);
- TCP_EVT_DBG (TCP_EVT_BIND, listener);
+ TCP_EVT (TCP_EVT_BIND, listener);
return listener->c_c_index;
}
@@ -158,7 +158,7 @@ tcp_connection_unbind (u32 listener_index)
tc = pool_elt_at_index (tm->listener_pool, listener_index);
- TCP_EVT_DBG (TCP_EVT_UNBIND, tc);
+ TCP_EVT (TCP_EVT_UNBIND, tc);
/* Poison the entry */
if (CLIB_DEBUG > 0)
@@ -240,7 +240,7 @@ tcp_connection_cleanup (tcp_connection_t * tc)
{
tcp_main_t *tm = &tcp_main;
- TCP_EVT_DBG (TCP_EVT_DELETE, tc);
+ TCP_EVT (TCP_EVT_DELETE, tc);
/* Cleanup local endpoint if this was an active connect */
transport_endpoint_cleanup (TRANSPORT_PROTO_TCP, &tc->c_lcl_ip,
@@ -340,7 +340,7 @@ tcp_connection_free (tcp_connection_t * tc)
void
tcp_connection_reset (tcp_connection_t * tc)
{
- TCP_EVT_DBG (TCP_EVT_RST_RCVD, tc);
+ TCP_EVT (TCP_EVT_RST_RCVD, tc);
switch (tc->state)
{
case TCP_STATE_SYN_RCVD:
@@ -397,7 +397,7 @@ tcp_connection_reset (tcp_connection_t * tc)
void
tcp_connection_close (tcp_connection_t * tc)
{
- TCP_EVT_DBG (TCP_EVT_CLOSE, tc);
+ TCP_EVT (TCP_EVT_CLOSE, tc);
/* Send/Program FIN if needed and switch state */
switch (tc->state)
@@ -767,7 +767,7 @@ tcp_session_open (transport_endpoint_cfg_t * rmt)
/* The other connection vars will be initialized after SYN ACK */
tcp_connection_timers_init (tc);
- TCP_EVT_DBG (TCP_EVT_OPEN, tc);
+ TCP_EVT (TCP_EVT_OPEN, tc);
tc->state = TCP_STATE_SYN_SENT;
tcp_init_snd_vars (tc);
tcp_send_syn (tc);
@@ -776,12 +776,6 @@ tcp_session_open (transport_endpoint_cfg_t * rmt)
return tc->c_c_index;
}
-const char *tcp_dbg_evt_str[] = {
-#define _(sym, str) str,
- foreach_tcp_dbg_evt
-#undef _
-};
-
const char *tcp_fsm_states[] = {
#define _(sym, str) str,
foreach_tcp_fsm_state
@@ -1401,7 +1395,7 @@ tcp_expired_timers_dispatch (u32 * expired_timers)
connection_index = expired_timers[i] & 0x0FFFFFFF;
timer_id = expired_timers[i] >> 28;
- TCP_EVT_DBG (TCP_EVT_TIMER_POP, connection_index, timer_id);
+ TCP_EVT (TCP_EVT_TIMER_POP, connection_index, timer_id);
/* Handle expiration */
(*timer_expiration_handlers[timer_id]) (connection_index);