]> git.baikalelectronics.ru Git - kernel.git/commit
[IPV4] fib_trie: size and statistics
authorStephen Hemminger <stephen.hemminger@vyatta.com>
Tue, 15 Jan 2008 07:11:54 +0000 (23:11 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:02:14 +0000 (15:02 -0800)
commit20632a2eba734555ef9c49a8408ec1d159abc28f
tree1b83623666eb232ac97586c5188304d76dbdbe59
parenta02f866221d7444b689c93bbaddd317fda416745
[IPV4] fib_trie: size and statistics

Show number of entries in trie, the size field was being set but never used,
but it only counted leaves, not all entries. Refactor the two cases in
fib_triestat_seq_show into a single routine.

Note: the stat structure was being malloc'd but the stack usage isn't so
high (288 bytes) that it is worth the additional complexity.

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_trie.c