net_sched: transform qdisc running bit into a seqcount
Instead of using a single bit (__QDISC___STATE_RUNNING) in sch->__state, use a seqcount. This adds lockdep support, but more importantly it will allow us to sample qdisc/class statistics without having to grab qdisc root lock. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Cong Wang <xiyou.wangcong@gmail.com> Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
64151ae36e
commit
f9eb8aea2a
@@ -629,6 +629,7 @@ static netdev_tx_t bt_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
|
||||
static struct lock_class_key bt_tx_busylock;
|
||||
static struct lock_class_key bt_netdev_xmit_lock_key;
|
||||
static struct lock_class_key bt_qdisc_running_key;
|
||||
|
||||
static void bt_set_lockdep_class_one(struct net_device *dev,
|
||||
struct netdev_queue *txq,
|
||||
@@ -641,6 +642,7 @@ static int bt_dev_init(struct net_device *dev)
|
||||
{
|
||||
netdev_for_each_tx_queue(dev, bt_set_lockdep_class_one, NULL);
|
||||
dev->qdisc_tx_busylock = &bt_tx_busylock;
|
||||
dev->qdisc_running_key = &bt_qdisc_running_key;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user