diff options
author | Benoît Ganne <bganne@cisco.com> | 2021-07-20 16:49:13 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-08-20 11:20:36 +0000 |
commit | 03f2a015999ed9ba34041afb408a22ea5fe601ff (patch) | |
tree | f99cdbb7ca09c246e31c595ec3e7d30feb4d7507 /src/vnet/pg | |
parent | 6d020c215aad85192764542b16ca6cb56488f6fc (diff) |
vlib: add format_vnet_buffer_no_chain
- add format_vnet_buffer and format_vnet_buffer_no_chain to mirror
format_vlib_buffer and format_vlib_buffer_no_chain
- format_vnet_buffer used to be the "no chain" version, replace all of
its current use with the corresponding format_vnet_buffer_no_chain
- add a function to dump vnet buffer details from gdb
Type: improvement
Change-Id: I143ce845f80e7ef937ea33a557b6e3b5988c5b8f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vnet/pg')
-rw-r--r-- | src/vnet/pg/input.c | 6 | ||||
-rw-r--r-- | src/vnet/pg/stream.c | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/vnet/pg/input.c b/src/vnet/pg/input.c index 98db46abd6a..17b7c518385 100644 --- a/src/vnet/pg/input.c +++ b/src/vnet/pg/input.c @@ -78,7 +78,7 @@ validate_buffer_data2 (vlib_buffer_t * b, pg_stream_t * s, if (i >= n_bytes) return 1; - clib_warning ("buffer %U", format_vnet_buffer, b); + clib_warning ("buffer %U", format_vnet_buffer_no_chain, b); clib_warning ("differ at index %d", i); clib_warning ("is %U", format_hex_bytes, bd, n_bytes); clib_warning ("mask %U", format_hex_bytes, pm, n_bytes); @@ -1435,8 +1435,8 @@ format_pg_input_trace (u8 * s, va_list * va) s = format (s, ", %d bytes", t->packet_length); s = format (s, ", sw_if_index %d", t->sw_if_index); - s = format (s, "\n%U%U", - format_white_space, indent, format_vnet_buffer, &t->buffer); + s = format (s, "\n%U%U", format_white_space, indent, + format_vnet_buffer_no_chain, &t->buffer); s = format (s, "\n%U", format_white_space, indent); diff --git a/src/vnet/pg/stream.c b/src/vnet/pg/stream.c index 686627b8d9a..605567c1296 100644 --- a/src/vnet/pg/stream.c +++ b/src/vnet/pg/stream.c @@ -102,9 +102,8 @@ format_pg_output_trace (u8 * s, va_list * va) pg_output_trace_t *t = va_arg (*va, pg_output_trace_t *); u32 indent = format_get_indent (s); - s = format (s, "%Ubuffer 0x%x: %U", - format_white_space, indent, - t->buffer_index, format_vnet_buffer, &t->buffer); + s = format (s, "%Ubuffer 0x%x: %U", format_white_space, indent, + t->buffer_index, format_vnet_buffer_no_chain, &t->buffer); s = format (s, "\n%U%U", format_white_space, indent, format_ethernet_header_with_length, t->buffer.pre_data, |