Tantilov, Emil S wrote, On 08/02/2008 11:36 AM:... I guess this "root lock" has to go back to netdev_queue. Alas, I can't test this, so if it's not a big problem maybe you could try this patch before David goes back to this? (His patch should be removed before using this one.) Thanks, Jarek P. --- include/linux/netdevice.h | 1 + include/net/sch_generic.h | 4 +--- net/core/dev.c | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ee583f6..5c32b70 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -447,6 +447,7 @@ struct netdev_queue { struct net_device *dev; struct Qdisc *qdisc; unsigned long state; + spinlock_t queue_lock; spinlock_t _xmit_lock; int xmit_lock_owner; struct Qdisc *qdisc_sleeping; diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index b5f40d7..97ea112 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -195,9 +195,7 @@ static inline struct Qdisc *qdisc_root(struct Qdisc *qdisc) static inline spinlock_t *qdisc_root_lock(struct Qdisc *qdisc) { - struct Qdisc *root = qdisc_root(qdisc); - - return qdisc_lock(root); + return &qdisc->dev_queue->queue_lock; } static inline struct net_device *qdisc_dev(struct Qdisc *qdisc) diff --git a/net/core/dev.c b/net/core/dev.c index 69320a5..73f3a65 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3861,6 +3861,7 @@ static void __netdev_init_queue_locks_one(struct net_device *dev, struct netdev_queue *dev_queue, void *_unused) { + spin_lock_init(&dev_queue->queue_lock); spin_lock_init(&dev_queue->_xmit_lock); netdev_set_xmit_lockdep_class(&dev_queue->_xmit_lock, dev->type); dev_queue->xmit_lock_owner = -1; -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
git: | |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Frans Pop | svc: failed to register lockdv1 RPC service (errno 97). |
