]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: speedup inet6_dump_addr()
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 12 Nov 2009 04:11:50 +0000 (04:11 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Nov 2009 04:46:57 +0000 (20:46 -0800)
commit3001041f990b7078cdc3d44fe782532bc0d2cff7
treeb7cc69200bee85872e2b8bf7fa93d2c8b519de2e
parentd3c14f44525a6e88fd0ab50ae9e8a0d4b5748143
ipv6: speedup inet6_dump_addr()

When handling large number of netdevices, inet6_dump_addr()
is very slow because it has O(N^2) complexity.

Instead of scanning one single list, we can use the NETDEV_HASHENTRIES
sub lists of the dev_index hash table, and RCU lookups.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c