summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_debug.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-11-24 17:29:17 -0800
committerDave Barach <openvpp@barachs.net>2020-11-25 17:14:09 +0000
commit9404a077a044264bae9c71fafc57bf5a894758f3 (patch)
tree02b449b22189f4b73509a02b095cef3ae9db8054 /src/vnet/tcp/tcp_debug.c
parent4a348e86682730a271d6846146d25aaf620e728b (diff)
tcp: enable lc if any other debug option enabled
Also fix debug build after snd_una_nxt removal. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ife52689cd30cdebf36057cf4d20d7f6207f1e29e
Diffstat (limited to 'src/vnet/tcp/tcp_debug.c')
-rw-r--r--src/vnet/tcp/tcp_debug.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/vnet/tcp/tcp_debug.c b/src/vnet/tcp/tcp_debug.c
index cf61d226c7f..e3d7452b591 100644
--- a/src/vnet/tcp/tcp_debug.c
+++ b/src/vnet/tcp/tcp_debug.c
@@ -53,6 +53,29 @@ tcp_debug_show_groups (void)
tdm->grp_dbg_lvl[i]);
}
+static void
+tcp_debug_check_lc (void)
+{
+ tcp_dbg_main_t *tdm = &tcp_dbg_main;
+ int i, have_enabled = 0;
+
+ if (tdm->grp_dbg_lvl[TCP_EVT_GRP_LC])
+ return;
+
+ for (i = 0; i < TCP_EVT_N_GRP; i++)
+ {
+ if (tdm->grp_dbg_lvl[i])
+ {
+ have_enabled = 1;
+ break;
+ }
+ }
+
+ /* Make sure LC is enabled for track initialization */
+ if (have_enabled)
+ tdm->grp_dbg_lvl[TCP_EVT_GRP_LC] = 1;
+}
+
static clib_error_t *
tcp_debug_fn (vlib_main_t * vm, unformat_input_t * input,
vlib_cli_command_t * cmd)
@@ -103,6 +126,8 @@ tcp_debug_fn (vlib_main_t * vm, unformat_input_t * input,
tdm->grp_dbg_lvl[group] = level;
+ tcp_debug_check_lc ();
+
done:
unformat_free (line_input);