diff options
author | Bud Grise <griseb@cisco.com> | 2016-02-02 14:23:29 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2016-02-02 21:33:08 +0000 |
commit | 0bcc9d511e52a9832e723825b4c84d9332d7025b (patch) | |
tree | f170cc10b06fd13aadb72974a7606376c0774560 /vlib/vlib/trace.h | |
parent | cfe0724b22672369d7d26108eef89362b7006a0c (diff) |
Tracing enhancements.
Limit buffer tracing to 50 in order to limit large output, unless
the user over rides the max "sh trace max <number>".
Add trace filtering, to be able to only trace packets that were
processed by a specific node or exclude packets processed by a node.
Example, only include packets processed by error-drop:
# trace filter include error-drop 1
# trace add dpdk-input 1000000
<wait for packets, to come in>
# show trace
Change-Id: I5d9e15d2268ea55e6ef87b2b8756049c49b2791b
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
Diffstat (limited to 'vlib/vlib/trace.h')
-rw-r--r-- | vlib/vlib/trace.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vlib/vlib/trace.h b/vlib/vlib/trace.h index 228a22abb95..50e51638fdb 100644 --- a/vlib/vlib/trace.h +++ b/vlib/vlib/trace.h @@ -68,6 +68,14 @@ typedef struct { /* Pool of trace buffers. */ vlib_trace_header_t ** trace_buffer_pool; + u32 last_main_loop_count; + u32 filter_node_index; + u32 filter_flag; +#define FILTER_FLAG_NONE 0 +#define FILTER_FLAG_INCLUDE 1 +#define FILTER_FLAG_EXCLUDE 2 + u32 filter_count; + /* Per node trace counts. */ vlib_trace_node_t * nodes; } vlib_trace_main_t; |