summaryrefslogtreecommitdiffstats
path: root/src/svm/svm_fifo.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-10-24 22:18:58 -0700
committerMarco Varlese <marco.varlese@suse.de>2018-10-25 11:35:54 +0000
commitde9a849a18514f0b09bb5f57a73f6a57ee425c76 (patch)
tree54e30a9f89dfa3570ec6d4faa8d5d0c485cf81b1 /src/svm/svm_fifo.c
parentfe7740e6613e065658dd43e4b8a81504ee7bb2ea (diff)
session/tcp: improve cli
Change-Id: I91c9d040fc9b9b63f7109eeaac334c47fb1226cf Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/svm/svm_fifo.c')
-rw-r--r--src/svm/svm_fifo.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/svm/svm_fifo.c b/src/svm/svm_fifo.c
index 46ce32bbbd8..817cb8d2639 100644
--- a/src/svm/svm_fifo.c
+++ b/src/svm/svm_fifo.c
@@ -152,13 +152,15 @@ u8 *
format_ooo_list (u8 * s, va_list * args)
{
svm_fifo_t *f = va_arg (*args, svm_fifo_t *);
+ u32 indent = va_arg (*args, u32);
u32 ooo_segment_index = f->ooos_list_head;
ooo_segment_t *seg;
while (ooo_segment_index != OOO_SEGMENT_INVALID_INDEX)
{
seg = pool_elt_at_index (f->ooo_segments, ooo_segment_index);
- s = format (s, " %U\n", format_ooo_segment, f, seg);
+ s = format (s, "%U%U\n", format_white_space, indent, format_ooo_segment,
+ f, seg);
ooo_segment_index = seg->next;
}
@@ -170,27 +172,30 @@ format_svm_fifo (u8 * s, va_list * args)
{
svm_fifo_t *f = va_arg (*args, svm_fifo_t *);
int verbose = va_arg (*args, int);
+ u32 indent;
if (!s)
return s;
+ indent = format_get_indent (s);
s = format (s, "cursize %u nitems %u has_event %d\n",
f->cursize, f->nitems, f->has_event);
- s = format (s, " head %d tail %d segment manager %u\n", f->head, f->tail,
- f->segment_manager);
+ s = format (s, "%Uhead %d tail %d segment manager %u\n", format_white_space,
+ indent, f->head, f->tail, f->segment_manager);
if (verbose > 1)
- s = format
- (s, " vpp session %d thread %d app session %d thread %d\n",
- f->master_session_index, f->master_thread_index,
- f->client_session_index, f->client_thread_index);
+ s = format (s, "%Uvpp session %d thread %d app session %d thread %d\n",
+ format_white_space, indent, f->master_session_index,
+ f->master_thread_index, f->client_session_index,
+ f->client_thread_index);
if (verbose)
{
- s = format (s, " ooo pool %d active elts newest %u\n",
- pool_elts (f->ooo_segments), f->ooos_newest);
+ s = format (s, "%Uooo pool %d active elts newest %u\n",
+ format_white_space, indent, pool_elts (f->ooo_segments),
+ f->ooos_newest);
if (svm_fifo_has_ooo_data (f))
- s = format (s, " %U", format_ooo_list, f, verbose);
+ s = format (s, " %U", format_ooo_list, f, indent, verbose);
}
return s;
}