Commit 1d25cd6c authored by Robert Olsson's avatar Robert Olsson Committed by David S. Miller

[IPV4]: fib_trie tnode stats refinements

* Prints the route tnode and set the stats level deepth as before.
Signed-off-by: default avatarRobert Olsson <robert.olsson@its.uu.se>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 044a500e
...@@ -2029,7 +2029,7 @@ static struct node *fib_trie_get_first(struct fib_trie_iter *iter, ...@@ -2029,7 +2029,7 @@ static struct node *fib_trie_get_first(struct fib_trie_iter *iter,
iter->tnode = (struct tnode *) n; iter->tnode = (struct tnode *) n;
iter->trie = t; iter->trie = t;
iter->index = 0; iter->index = 0;
iter->depth = 0; iter->depth = 1;
return n; return n;
} }
return NULL; return NULL;
...@@ -2274,11 +2274,12 @@ static int fib_trie_seq_show(struct seq_file *seq, void *v) ...@@ -2274,11 +2274,12 @@ static int fib_trie_seq_show(struct seq_file *seq, void *v)
seq_puts(seq, "<local>:\n"); seq_puts(seq, "<local>:\n");
else else
seq_puts(seq, "<main>:\n"); seq_puts(seq, "<main>:\n");
} else { }
seq_indent(seq, iter->depth-1); seq_indent(seq, iter->depth-1);
seq_printf(seq, " +-- %d.%d.%d.%d/%d\n", seq_printf(seq, " +-- %d.%d.%d.%d/%d %d %d %d\n",
NIPQUAD(prf), tn->pos); NIPQUAD(prf), tn->pos, tn->bits, tn->full_children,
} tn->empty_children);
} else { } else {
struct leaf *l = (struct leaf *) n; struct leaf *l = (struct leaf *) n;
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment