if (fl_len)
{
track_index = tdm->free_track_indices[fl_len - 1];
- _vec_len (tdm->free_track_indices) -= 1;
+ vec_dec_len (tdm->free_track_indices, 1);
et->track_index_plus_one = track_index + 1;
}
else
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)
tdm->grp_dbg_lvl[group] = level;
+ tcp_debug_check_lc ();
+
done:
unformat_free (line_input);
return error;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (tcp_debug_command, static) =
{
.path = "tcp debug",
.short_help = "tcp [show] [debug group <N> level <N>]",
.function = tcp_debug_fn,
};
-/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON