diff options
Diffstat (limited to 'include/net/sch_generic.h')
| -rw-r--r-- | include/net/sch_generic.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index b1d2cfea89c5..3fe49d808957 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
| @@ -53,6 +53,7 @@ struct Qdisc | |||
| 53 | atomic_t refcnt; | 53 | atomic_t refcnt; |
| 54 | unsigned long state; | 54 | unsigned long state; |
| 55 | struct sk_buff *gso_skb; | 55 | struct sk_buff *gso_skb; |
| 56 | struct sk_buff_head requeue; | ||
| 56 | struct sk_buff_head q; | 57 | struct sk_buff_head q; |
| 57 | struct netdev_queue *dev_queue; | 58 | struct netdev_queue *dev_queue; |
| 58 | struct Qdisc *next_sched; | 59 | struct Qdisc *next_sched; |
| @@ -217,6 +218,14 @@ static inline spinlock_t *qdisc_root_lock(struct Qdisc *qdisc) | |||
| 217 | return qdisc_lock(root); | 218 | return qdisc_lock(root); |
| 218 | } | 219 | } |
| 219 | 220 | ||
| 221 | static inline spinlock_t *qdisc_root_sleeping_lock(struct Qdisc *qdisc) | ||
| 222 | { | ||
| 223 | struct Qdisc *root = qdisc_root_sleeping(qdisc); | ||
| 224 | |||
| 225 | ASSERT_RTNL(); | ||
| 226 | return qdisc_lock(root); | ||
| 227 | } | ||
| 228 | |||
| 220 | static inline struct net_device *qdisc_dev(struct Qdisc *qdisc) | 229 | static inline struct net_device *qdisc_dev(struct Qdisc *qdisc) |
| 221 | { | 230 | { |
| 222 | return qdisc->dev_queue->dev; | 231 | return qdisc->dev_queue->dev; |
| @@ -224,12 +233,12 @@ static inline struct net_device *qdisc_dev(struct Qdisc *qdisc) | |||
| 224 | 233 | ||
| 225 | static inline void sch_tree_lock(struct Qdisc *q) | 234 | static inline void sch_tree_lock(struct Qdisc *q) |
| 226 | { | 235 | { |
| 227 | spin_lock_bh(qdisc_root_lock(q)); | 236 | spin_lock_bh(qdisc_root_sleeping_lock(q)); |
| 228 | } | 237 | } |
| 229 | 238 | ||
| 230 | static inline void sch_tree_unlock(struct Qdisc *q) | 239 | static inline void sch_tree_unlock(struct Qdisc *q) |
| 231 | { | 240 | { |
| 232 | spin_unlock_bh(qdisc_root_lock(q)); | 241 | spin_unlock_bh(qdisc_root_sleeping_lock(q)); |
| 233 | } | 242 | } |
| 234 | 243 | ||
| 235 | #define tcf_tree_lock(tp) sch_tree_lock((tp)->q) | 244 | #define tcf_tree_lock(tp) sch_tree_lock((tp)->q) |
