diff options
author | Florin Coras <fcoras@cisco.com> | 2020-01-27 19:21:28 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-01-28 15:06:47 +0000 |
commit | 30928f87a3c9d98e288d1364d50c032e052e69ab (patch) | |
tree | b8c6a882b4a696a9f68bfbdcc7e51704ec03cffd /src/vnet/tcp/tcp_output.c | |
parent | dda2dbedab8d7fda3b90f9340a20eafdc865b04b (diff) |
session tcp: fix packet tracing
Type: fix
Change-Id: Ib823d016c64998779fb1d00b8aad3acb5e8340be
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp_output.c')
-rw-r--r-- | src/vnet/tcp/tcp_output.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c index 631b33ae819..e843c7ea990 100644 --- a/src/vnet/tcp/tcp_output.c +++ b/src/vnet/tcp/tcp_output.c @@ -55,12 +55,12 @@ format_tcp_tx_trace (u8 * s, va_list * args) CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *); CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *); tcp_tx_trace_t *t = va_arg (*args, tcp_tx_trace_t *); + tcp_connection_t *tc = &t->tcp_connection; u32 indent = format_get_indent (s); - s = format (s, "%U\n%U%U", - format_tcp_header, &t->tcp_header, 128, - format_white_space, indent, - format_tcp_connection, &t->tcp_connection, 1); + s = format (s, "%U state %U\n%U%U", format_tcp_connection_id, tc, + format_tcp_state, tc->state, format_white_space, indent, + format_tcp_header, &t->tcp_header, 128); return s; } @@ -2223,16 +2223,17 @@ static void tcp46_output_trace_frame (vlib_main_t * vm, vlib_node_runtime_t * node, u32 * to_next, u32 n_bufs) { - u32 n_trace = vlib_get_trace_count (vm, node); tcp_connection_t *tc; tcp_tx_trace_t *t; vlib_buffer_t *b; tcp_header_t *th; int i; - for (i = 0; i < clib_min (n_trace, n_bufs); i++) + for (i = 0; i < n_bufs; i++) { b = vlib_get_buffer (vm, to_next[i]); + if (!(b->flags & VLIB_BUFFER_IS_TRACED)) + continue; th = vlib_buffer_get_current (b); tc = tcp_connection_get (vnet_buffer (b)->tcp.connection_index, vm->thread_index); |