summaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-09 04:33:13 +0400
committerDavid S. Miller <davem@davemloft.net>2008-07-09 04:33:13 +0400
commit555353cfa1aee293de445bfa6de43276138ddd82 (patch)
treeb5daba85806b8e36731c4a474aac97f1a0140a51 /net/sched
parentdc2b48475a0a36f8b3bbb2da60d3a006dc5c2c84 (diff)
downloadlinux-555353cfa1aee293de445bfa6de43276138ddd82.tar.xz
netdev: The ingress_lock member is no longer needed.
Every qdisc is assosciated with a queue, and in the case of ingress qdiscs that will now be netdev->rx_queue so using that queue's lock is the thing to do. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_api.c3
-rw-r--r--net/sched/sch_generic.c10
2 files changed, 6 insertions, 7 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 2a1834f8c7d8..570cef2a9c5f 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -601,12 +601,11 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue,
sch->parent = parent;
+ sch->stats_lock = &dev_queue->lock;
if (handle == TC_H_INGRESS) {
sch->flags |= TCQ_F_INGRESS;
- sch->stats_lock = &dev->ingress_lock;
handle = TC_H_MAKE(TC_H_INGRESS, 0);
} else {
- sch->stats_lock = &dev_queue->lock;
if (handle == 0) {
handle = qdisc_alloc_handle(dev);
err = -ENOMEM;
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index ee8f9f78a095..804d44b00348 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -35,24 +35,24 @@
* - enqueue, dequeue are serialized via top level device
* spinlock queue->lock.
* - ingress filtering is serialized via top level device
- * spinlock dev->ingress_lock.
+ * spinlock dev->rx_queue.lock.
* - updates to tree and tree walking are only done under the rtnl mutex.
*/
void qdisc_lock_tree(struct net_device *dev)
__acquires(dev->tx_queue.lock)
- __acquires(dev->ingress_lock)
+ __acquires(dev->rx_queue.lock)
{
spin_lock_bh(&dev->tx_queue.lock);
- spin_lock(&dev->ingress_lock);
+ spin_lock(&dev->rx_queue.lock);
}
EXPORT_SYMBOL(qdisc_lock_tree);
void qdisc_unlock_tree(struct net_device *dev)
- __releases(dev->ingress_lock)
+ __releases(dev->rx_queue.lock)
__releases(dev->tx_queue.lock)
{
- spin_unlock(&dev->ingress_lock);
+ spin_unlock(&dev->rx_queue.lock);
spin_unlock_bh(&dev->tx_queue.lock);
}
EXPORT_SYMBOL(qdisc_unlock_tree);