]> git.baikalelectronics.ru Git - kernel.git/commit
igmp: hash a hash table to speedup ip_check_mc_rcu()
authorEric Dumazet <edumazet@google.com>
Fri, 7 Jun 2013 15:48:57 +0000 (08:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Jun 2013 07:25:23 +0000 (00:25 -0700)
commit216bb05f3e770d6767321e5b628f5b14792be292
treed01026afb4450ef685722cd7a0fe1815336170ca
parent8e9d15f441590072e12b2e07f82a8d3f86a8a359
igmp: hash a hash table to speedup ip_check_mc_rcu()

After IP route cache removal, multicast applications using
a lot of multicast addresses hit a O(N) behavior in ip_check_mc_rcu()

Add a per in_device hash table to get faster lookup.

This hash table is created only if the number of items in mc_list is
above 4.

Reported-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/igmp.h
include/linux/inetdevice.h
net/ipv4/devinet.c
net/ipv4/igmp.c