Skip to content

Commit

Permalink
[IPV4]: fib_trie tnode stats refinements
Browse files Browse the repository at this point in the history
* Prints the route tnode and set the stats level deepth as before.

Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Robert Olsson authored and David S. Miller committed Sep 19, 2005
1 parent 044a500 commit 1d25cd6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions net/ipv4/fib_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,7 @@ static struct node *fib_trie_get_first(struct fib_trie_iter *iter,
iter->tnode = (struct tnode *) n;
iter->trie = t;
iter->index = 0;
iter->depth = 0;
iter->depth = 1;
return n;
}
return NULL;
Expand Down Expand Up @@ -2274,11 +2274,12 @@ static int fib_trie_seq_show(struct seq_file *seq, void *v)
seq_puts(seq, "<local>:\n");
else
seq_puts(seq, "<main>:\n");
} else {
seq_indent(seq, iter->depth-1);
seq_printf(seq, " +-- %d.%d.%d.%d/%d\n",
NIPQUAD(prf), tn->pos);
}
}
seq_indent(seq, iter->depth-1);
seq_printf(seq, " +-- %d.%d.%d.%d/%d %d %d %d\n",
NIPQUAD(prf), tn->pos, tn->bits, tn->full_children,
tn->empty_children);

} else {
struct leaf *l = (struct leaf *) n;
int i;
Expand Down

0 comments on commit 1d25cd6

Please sign in to comment.