diff options
author | Eric Dumazet <edumazet@google.com> | 2016-06-06 12:37:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-07 19:37:13 -0400 |
commit | f9eb8aea2a1e12fc2f584d1627deeb957435a801 (patch) | |
tree | bc3cf06664da45bc0e6ce9b5165dba534ed11751 /net/l2tp | |
parent | 64151ae36ed93c45654069c8aff2a7f0125075e8 (diff) |
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>
Diffstat (limited to 'net/l2tp')
-rw-r--r-- | net/l2tp/l2tp_eth.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c index e253c26f31ac..c00d72d182fa 100644 --- a/net/l2tp/l2tp_eth.c +++ b/net/l2tp/l2tp_eth.c | |||
@@ -68,6 +68,8 @@ static inline struct l2tp_eth_net *l2tp_eth_pernet(struct net *net) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | static struct lock_class_key l2tp_eth_tx_busylock; | 70 | static struct lock_class_key l2tp_eth_tx_busylock; |
71 | static struct lock_class_key l2tp_qdisc_running_key; | ||
72 | |||
71 | static int l2tp_eth_dev_init(struct net_device *dev) | 73 | static int l2tp_eth_dev_init(struct net_device *dev) |
72 | { | 74 | { |
73 | struct l2tp_eth *priv = netdev_priv(dev); | 75 | struct l2tp_eth *priv = netdev_priv(dev); |
@@ -76,6 +78,8 @@ static int l2tp_eth_dev_init(struct net_device *dev) | |||
76 | eth_hw_addr_random(dev); | 78 | eth_hw_addr_random(dev); |
77 | eth_broadcast_addr(dev->broadcast); | 79 | eth_broadcast_addr(dev->broadcast); |
78 | dev->qdisc_tx_busylock = &l2tp_eth_tx_busylock; | 80 | dev->qdisc_tx_busylock = &l2tp_eth_tx_busylock; |
81 | dev->qdisc_running_key = &l2tp_qdisc_running_key; | ||
82 | |||
79 | return 0; | 83 | return 0; |
80 | } | 84 | } |
81 | 85 | ||