From 27d978c9136e903244113a7ab57acea4b496898e Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Tue, 3 Nov 2020 09:59:06 -0500 Subject: vlib: add postmortem pcap dispatch trace Inspired by a real-life conundrum: scenario X involves a vpp crash in ip4-load-balance because vnet_buffer(b)->ip.adj_index[VLIB_TX] is (still) set to ~0. The problem takes most of a day to occur, and we need to see the broken packet's graph trajectory, metadata, etc. to understand the problem. Fix a signed/unsigned ASSERT bug in vlib_get_trace_count(). Rename elog_post_mortem_dump() -> vlib_post_mortem_dump(), add dispatch trace post-mortem dump. Add FILTER_FLAG_POST_MORTEM so we can (putatively) capture a ludicrous number of buffer traces, without actually using more than one dispatch cycle's worth of memory. Type: improvement Signed-off-by: Dave Barach Change-Id: If093202ef071df46e290370bd9b33bf6560d30e6 --- src/vpp/vnet/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/vpp/vnet') diff --git a/src/vpp/vnet/main.c b/src/vpp/vnet/main.c index 397cf8328c5..582ad5fdc31 100644 --- a/src/vpp/vnet/main.c +++ b/src/vpp/vnet/main.c @@ -399,13 +399,13 @@ test_plugin_path_config (vlib_main_t * vm, unformat_input_t * input) VLIB_CONFIG_FUNCTION (test_plugin_path_config, "test_plugin_path"); void vl_msg_api_post_mortem_dump (void); -void elog_post_mortem_dump (void); +void vlib_post_mortem_dump (void); void os_panic (void) { vl_msg_api_post_mortem_dump (); - elog_post_mortem_dump (); + vlib_post_mortem_dump (); abort (); } @@ -428,7 +428,7 @@ os_exit (int code) recursion_block = 1; vl_msg_api_post_mortem_dump (); - elog_post_mortem_dump (); + vlib_post_mortem_dump (); vhost_user_unmap_all (); abort (); } -- cgit 1.2.3-korg