summaryrefslogtreecommitdiffstats
path: root/src/vlib/buffer.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2023-10-24 23:59:48 +0200
committerDamjan Marion <dmarion@0xa5.net>2023-10-25 11:51:30 +0000
commit55a1f288ed96b416dc596d3d5415fcea83da60ae (patch)
treec52fddc58fa5eefb53557b9a56e413a5ffecd903 /src/vlib/buffer.c
parent29de4694e61ed3780860f6c413e96d2a5c99ac1e (diff)
buffers: buffer name is vector, not c string
Type: fix Fixes: 8973b07 Change-Id: Iba6e29bab35be0148b469965c3af8391b5ab9140 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/buffer.c')
-rw-r--r--src/vlib/buffer.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index e798743bc98..005326d3906 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -603,9 +603,10 @@ format_vlib_buffer_pool (u8 * s, va_list * va)
cached += bpt->n_cached;
/* *INDENT-ON* */
- s = format (s, "%-20s%=6d%=6d%=6u%=11u%=6u%=8u%=8u%=8u",
- bp->name, bp->index, bp->numa_node, bp->data_size +
- sizeof (vlib_buffer_t) + vm->buffer_main->ext_hdr_size,
+ s = format (s, "%-20v%=6d%=6d%=6u%=11u%=6u%=8u%=8u%=8u", bp->name, bp->index,
+ bp->numa_node,
+ bp->data_size + sizeof (vlib_buffer_t) +
+ vm->buffer_main->ext_hdr_size,
bp->data_size, bp->n_buffers, bp->n_avail, cached,
bp->n_buffers - bp->n_avail - cached);
@@ -897,16 +898,16 @@ vlib_buffer_main_init (struct vlib_main_t * vm)
continue;
reg.entry_index =
- vlib_stats_add_gauge ("/buffer-pools/%s/cached", bp->name);
+ vlib_stats_add_gauge ("/buffer-pools/%v/cached", bp->name);
reg.collect_fn = buffer_gauges_collect_cached_fn;
vlib_stats_register_collector_fn (&reg);
- reg.entry_index = vlib_stats_add_gauge ("/buffer-pools/%s/used", bp->name);
+ reg.entry_index = vlib_stats_add_gauge ("/buffer-pools/%v/used", bp->name);
reg.collect_fn = buffer_gauges_collect_used_fn;
vlib_stats_register_collector_fn (&reg);
reg.entry_index =
- vlib_stats_add_gauge ("/buffer-pools/%s/available", bp->name);
+ vlib_stats_add_gauge ("/buffer-pools/%v/available", bp->name);
reg.collect_fn = buffer_gauges_collect_available_fn;
vlib_stats_register_collector_fn (&reg);
}