aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/hs_apps/sapi/vpp_echo_common.c
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2019-12-03 17:13:09 +0100
committerFlorin Coras <florin.coras@gmail.com>2019-12-03 17:38:30 +0000
commit08f26641fa920d5a9629140430660adcf736a1c7 (patch)
tree4321531b380ab66a62962df2bba2209b2464775b /src/plugins/hs_apps/sapi/vpp_echo_common.c
parent692bfc85f2c41c6e25e73931a7b6fe6a1c5dd6c6 (diff)
hsa: Less verbose logging for many sessions
Type: feature ECHO_LOG has the following levels 0 -> global progression (many connections) 1 -> Connection global evts (some conn, much data) 2 -> More connection events 3 -> Data related logging Change-Id: I69eeaa0dd02a4b8ebcfefa1c7a218ef57f217d2b Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/plugins/hs_apps/sapi/vpp_echo_common.c')
-rw-r--r--src/plugins/hs_apps/sapi/vpp_echo_common.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/hs_apps/sapi/vpp_echo_common.c b/src/plugins/hs_apps/sapi/vpp_echo_common.c
index b91203a7bb3..a5bdeb4f27b 100644
--- a/src/plugins/hs_apps/sapi/vpp_echo_common.c
+++ b/src/plugins/hs_apps/sapi/vpp_echo_common.c
@@ -503,12 +503,12 @@ echo_session_handle_add_del (echo_main_t * em, u64 handle, u32 sid)
clib_spinlock_lock (&em->sid_vpp_handles_lock);
if (sid == SESSION_INVALID_INDEX)
{
- ECHO_LOG (2, "hash_unset(0x%lx)", handle);
+ ECHO_LOG (3, "hash_unset(0x%lx)", handle);
hash_unset (em->session_index_by_vpp_handles, handle);
}
else
{
- ECHO_LOG (2, "hash_set(0x%lx) S[%d]", handle, sid);
+ ECHO_LOG (3, "hash_set(0x%lx) S[%d]", handle, sid);
hash_set (em->session_index_by_vpp_handles, handle, sid);
}
clib_spinlock_unlock (&em->sid_vpp_handles_lock);
@@ -558,7 +558,7 @@ echo_get_session_from_handle (echo_main_t * em, u64 handle)
clib_spinlock_unlock (&em->sid_vpp_handles_lock);
if (!p)
{
- ECHO_LOG (1, "unknown handle 0x%lx", handle);
+ ECHO_LOG (2, "unknown handle 0x%lx", handle);
return 0;
}
return pool_elt_at_index (em->sessions, p[0]);
@@ -571,7 +571,7 @@ wait_for_segment_allocation (u64 segment_handle)
f64 timeout;
timeout = clib_time_now (&em->clib_time) + TIMEOUT;
uword *segment_present;
- ECHO_LOG (1, "Waiting for segment 0x%lx...", segment_handle);
+ ECHO_LOG (3, "Waiting for segment 0x%lx...", segment_handle);
while (clib_time_now (&em->clib_time) < timeout)
{
clib_spinlock_lock (&em->segment_handles_lock);
@@ -582,7 +582,7 @@ wait_for_segment_allocation (u64 segment_handle)
if (em->time_to_stop == 1)
return 0;
}
- ECHO_LOG (1, "timeout wait_for_segment_allocation (0x%lx)", segment_handle);
+ ECHO_LOG (2, "timeout wait_for_segment_allocation (0x%lx)", segment_handle);
return -1;
}
@@ -598,7 +598,7 @@ wait_for_state_change (echo_main_t * em, connection_state_t state,
if (em->time_to_stop)
return 1;
}
- ECHO_LOG (1, "timeout waiting for %U", echo_format_app_state, state);
+ ECHO_LOG (2, "timeout waiting for %U", echo_format_app_state, state);
return -1;
}
@@ -618,7 +618,7 @@ void
echo_session_print_stats (echo_main_t * em, echo_session_t * session)
{
f64 deltat = clib_time_now (&em->clib_time) - session->start;
- ECHO_LOG (0, "Session 0x%x done in %.6fs RX[%.4f] TX[%.4f] Gbit/s\n",
+ ECHO_LOG (1, "Session 0x%x done in %.6fs RX[%.4f] TX[%.4f] Gbit/s\n",
session->vpp_session_handle, deltat,
(session->bytes_received * 8.0) / deltat / 1e9,
(session->bytes_sent * 8.0) / deltat / 1e9);