aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc/llc_sap.c
diff options
context:
space:
mode:
authorOctavian Purdila <opurdila@ixiacom.com>2009-12-26 06:51:04 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-26 23:43:57 -0500
commit6d2e3ea284463d5ab34e9cf2a41d0b8627b95d02 (patch)
tree86ee780b06adfe388ac64dd66ece598be69b29ec /net/llc/llc_sap.c
parent0f7b67dd9e1192976f5e5a78934c7a339ff7c45f (diff)
llc: use a device based hash table to speed up multicast delivery
This patch adds a per SAP device based hash table to solve the multicast delivery scalability issue when we have large number of interfaces and a large number of sockets bound to the same SAP. Signed-off-by: Octavian Purdila <opurdila@ixiacom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/llc/llc_sap.c')
-rw-r--r--net/llc/llc_sap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c
index 94790e60d072..94cb706f6cc4 100644
--- a/net/llc/llc_sap.c
+++ b/net/llc/llc_sap.c
@@ -387,10 +387,14 @@ static void llc_sap_mcast(struct llc_sap *sap,
387{ 387{
388 int i = 0, count = 256 / sizeof(struct sock *); 388 int i = 0, count = 256 / sizeof(struct sock *);
389 struct sock *sk, *stack[count]; 389 struct sock *sk, *stack[count];
390 struct hlist_nulls_node *node; 390 struct hlist_node *node;
391 struct llc_sock *llc;
392 struct hlist_head *dev_hb = llc_sk_dev_hash(sap, skb->dev->ifindex);
391 393
392 spin_lock_bh(&sap->sk_lock); 394 spin_lock_bh(&sap->sk_lock);
393 sk_nulls_for_each_rcu(sk, node, &sap->sk_list) { 395 hlist_for_each_entry(llc, node, dev_hb, dev_hash_node) {
396
397 sk = &llc->sk;
394 398
395 if (!llc_mcast_match(sap, laddr, skb, sk)) 399 if (!llc_mcast_match(sap, laddr, skb, sk))
396 continue; 400 continue;