summaryrefslogtreecommitdiffstats
path: root/drivers/net/team
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-06-06 09:37:15 -0700
committerDavid S. Miller <davem@davemloft.net>2016-06-07 16:37:13 -0700
commitf9eb8aea2a1e12fc2f584d1627deeb957435a801 (patch)
treebc3cf06664da45bc0e6ce9b5165dba534ed11751 /drivers/net/team
parent64151ae36ed93c45654069c8aff2a7f0125075e8 (diff)
downloadlinux-stable-f9eb8aea2a1e12fc2f584d1627deeb957435a801.tar.gz
linux-stable-f9eb8aea2a1e12fc2f584d1627deeb957435a801.tar.bz2
linux-stable-f9eb8aea2a1e12fc2f584d1627deeb957435a801.zip
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 'drivers/net/team')
-rw-r--r--drivers/net/team/team.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 2ace126533cd..00eb38956a2c 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1577,6 +1577,7 @@ static const struct team_option team_options[] = {
static struct lock_class_key team_netdev_xmit_lock_key;
static struct lock_class_key team_netdev_addr_lock_key;
static struct lock_class_key team_tx_busylock_key;
+static struct lock_class_key team_qdisc_running_key;
static void team_set_lockdep_class_one(struct net_device *dev,
struct netdev_queue *txq,
@@ -1590,6 +1591,7 @@ static void team_set_lockdep_class(struct net_device *dev)
lockdep_set_class(&dev->addr_list_lock, &team_netdev_addr_lock_key);
netdev_for_each_tx_queue(dev, team_set_lockdep_class_one, NULL);
dev->qdisc_tx_busylock = &team_tx_busylock_key;
+ dev->qdisc_running_key = &team_qdisc_running_key;
}
static int team_init(struct net_device *dev)