summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_node.c
diff options
context:
space:
mode:
authorSrikanth Akula <srakula@cisco.com>2020-04-06 19:19:49 -0700
committerFlorin Coras <florin.coras@gmail.com>2020-04-13 00:34:05 +0000
commit7357043d2abc8d3811362f256e7c9086e7b0d378 (patch)
treef8180ff9c606d256e9751974361be15df9d52e99 /src/vnet/session/session_node.c
parentc39150df4d39f73aad8126db61715ccc73155cee (diff)
session: adding debug events
Type: feature Enhancing the debugging capability of tcp session layer by measing time spent for various events. This is meant only for debugging purpose Signed-off-by: Srikanth Akula <srakula@cisco.com> Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9f401881b345bcae5f7d8050338637fd47b3723b Signed-off-by: Srikanth Akula <srakula@cisco.com>
Diffstat (limited to 'src/vnet/session/session_node.c')
-rw-r--r--src/vnet/session/session_node.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index f98e7ccdb27..867ff4fcaf7 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -1196,6 +1196,7 @@ session_event_dispatch_ctrl (session_worker_t * wrk, session_evt_elt_t * elt)
session_evt_ctrl_data_free (wrk, elt);
session_evt_elt_free (wrk, elt);
}
+ SESSION_EVT (SESSION_EVT_COUNTS, CNT_CTRL_EVTS, 1, wrk);
}
always_inline void
@@ -1250,6 +1251,8 @@ session_event_dispatch_io (session_worker_t * wrk, vlib_node_runtime_t * node,
clib_warning ("unhandled event type %d", e->event_type);
}
+ SESSION_EVT (SESSION_IO_EVT_COUNTS, e->event_type, 1, wrk);
+
/* Regrab elements in case pool moved */
elt = pool_elt_at_index (wrk->event_elts, ei);
if (!clib_llist_elt_is_linked (elt, evt_list))
@@ -1328,6 +1331,7 @@ session_queue_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
*/
transport_update_time (wrk->last_vlib_time, thread_index);
n_tx_packets = vec_len (wrk->pending_tx_buffers);
+ SESSION_EVT (SESSION_EVT_DSP_CNTRS, UPDATE_TIME, wrk);
/*
* Dequeue and handle new events
@@ -1347,6 +1351,7 @@ session_queue_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
svm_msg_q_free_msg (mq, msg);
}
svm_msg_q_unlock (mq);
+ SESSION_EVT (SESSION_EVT_DSP_CNTRS, MQ_DEQ, wrk, n_to_dequeue);
}
/*
@@ -1362,6 +1367,8 @@ session_queue_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
}));
/* *INDENT-ON* */
+ SESSION_EVT (SESSION_EVT_DSP_CNTRS, CTRL_EVTS, wrk);
+
/*
* Handle the new io events.
*/
@@ -1379,6 +1386,8 @@ session_queue_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
session_event_dispatch_io (wrk, node, elt, thread_index, &n_tx_packets);
}
+ SESSION_EVT (SESSION_EVT_DSP_CNTRS, NEW_IO_EVTS, wrk);
+
/*
* Handle the old io events, if we had any prior to processing the new ones
*/
@@ -1404,6 +1413,8 @@ session_queue_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
};
}
+ SESSION_EVT (SESSION_EVT_DSP_CNTRS, OLD_IO_EVTS, wrk);
+
if (vec_len (wrk->pending_tx_buffers))
session_flush_pending_tx_buffers (wrk, node);