summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_ingress.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-04-17 02:07:08 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 07:29:08 +0200
commitfd44de7cc1d430caef91ad9aecec9ff000fe86f8 (patch)
tree7b86a2e8623400c290c886ef83c573cdf49da3e8 /net/sched/sch_ingress.c
parent[NET_SCHED]: Eliminate qdisc_tree_lock (diff)
downloadlinux-fd44de7cc1d430caef91ad9aecec9ff000fe86f8.tar.xz
linux-fd44de7cc1d430caef91ad9aecec9ff000fe86f8.zip
[NET_SCHED]: ingress: switch back to using ingress_lock
Switch ingress queueing back to use ingress_lock. qdisc_lock_tree now locks both the ingress and egress qdiscs on the device. All changes to data that might be used on both ingress and egress needs to be protected by using qdisc_lock_tree instead of manually taking dev->queue_lock. Additionally the qdisc stats_lock needs to be initialized to ingress_lock for ingress qdiscs. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_ingress.c')
-rw-r--r--net/sched/sch_ingress.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c
index 1fb60aba1e6c..ad22dc6af22a 100644
--- a/net/sched/sch_ingress.c
+++ b/net/sched/sch_ingress.c
@@ -248,16 +248,11 @@ ing_hook(unsigned int hook, struct sk_buff **pskb,
skb->dev ? (*pskb)->dev->name : "(no dev)",
skb->len);
-/*
-revisit later: Use a private since lock dev->queue_lock is also
-used on the egress (might slow things for an iota)
-*/
-
if (dev->qdisc_ingress) {
- spin_lock(&dev->queue_lock);
+ spin_lock(&dev->ingress_lock);
if ((q = dev->qdisc_ingress) != NULL)
fwres = q->enqueue(skb, q);
- spin_unlock(&dev->queue_lock);
+ spin_unlock(&dev->ingress_lock);
}
return fwres;