diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-08 20:42:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-08 20:42:10 -0400 |
commit | b0e1e6462df3c5944010b3328a546d8fe5d932cd (patch) | |
tree | 37e3f86d09d8b37deb06cf1c142baeb8246bbf97 /net/core | |
parent | 555353cfa1aee293de445bfa6de43276138ddd82 (diff) |
netdev: Move rest of qdisc state into struct netdev_queue
Now qdisc, qdisc_sleeping, and qdisc_list also live there.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 4 | ||||
-rw-r--r-- | net/core/link_watch.c | 8 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 6 |
3 files changed, 12 insertions, 6 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 2322fb69fd53..ce79c28d739d 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1720,14 +1720,14 @@ gso: | |||
1720 | * also serializes access to the device queue. | 1720 | * also serializes access to the device queue. |
1721 | */ | 1721 | */ |
1722 | 1722 | ||
1723 | q = rcu_dereference(dev->qdisc); | 1723 | q = rcu_dereference(txq->qdisc); |
1724 | #ifdef CONFIG_NET_CLS_ACT | 1724 | #ifdef CONFIG_NET_CLS_ACT |
1725 | skb->tc_verd = SET_TC_AT(skb->tc_verd,AT_EGRESS); | 1725 | skb->tc_verd = SET_TC_AT(skb->tc_verd,AT_EGRESS); |
1726 | #endif | 1726 | #endif |
1727 | if (q->enqueue) { | 1727 | if (q->enqueue) { |
1728 | /* Grab device queue */ | 1728 | /* Grab device queue */ |
1729 | spin_lock(&txq->lock); | 1729 | spin_lock(&txq->lock); |
1730 | q = dev->qdisc; | 1730 | q = txq->qdisc; |
1731 | if (q->enqueue) { | 1731 | if (q->enqueue) { |
1732 | /* reset queue_mapping to zero */ | 1732 | /* reset queue_mapping to zero */ |
1733 | skb_set_queue_mapping(skb, 0); | 1733 | skb_set_queue_mapping(skb, 0); |
diff --git a/net/core/link_watch.c b/net/core/link_watch.c index a5e372b9ec4d..50218218445b 100644 --- a/net/core/link_watch.c +++ b/net/core/link_watch.c | |||
@@ -79,8 +79,10 @@ static void rfc2863_policy(struct net_device *dev) | |||
79 | 79 | ||
80 | static int linkwatch_urgent_event(struct net_device *dev) | 80 | static int linkwatch_urgent_event(struct net_device *dev) |
81 | { | 81 | { |
82 | struct netdev_queue *txq = &dev->tx_queue; | ||
83 | |||
82 | return netif_running(dev) && netif_carrier_ok(dev) && | 84 | return netif_running(dev) && netif_carrier_ok(dev) && |
83 | dev->qdisc != dev->qdisc_sleeping; | 85 | txq->qdisc != txq->qdisc_sleeping; |
84 | } | 86 | } |
85 | 87 | ||
86 | 88 | ||
@@ -181,7 +183,9 @@ static void __linkwatch_run_queue(int urgent_only) | |||
181 | rfc2863_policy(dev); | 183 | rfc2863_policy(dev); |
182 | if (dev->flags & IFF_UP) { | 184 | if (dev->flags & IFF_UP) { |
183 | if (netif_carrier_ok(dev)) { | 185 | if (netif_carrier_ok(dev)) { |
184 | WARN_ON(dev->qdisc_sleeping == &noop_qdisc); | 186 | struct netdev_queue *txq = &dev->tx_queue; |
187 | |||
188 | WARN_ON(txq->qdisc_sleeping == &noop_qdisc); | ||
185 | dev_activate(dev); | 189 | dev_activate(dev); |
186 | } else | 190 | } else |
187 | dev_deactivate(dev); | 191 | dev_deactivate(dev); |
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 6c8d7f0ea01a..8ef9f1db610e 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -605,6 +605,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, | |||
605 | int type, u32 pid, u32 seq, u32 change, | 605 | int type, u32 pid, u32 seq, u32 change, |
606 | unsigned int flags) | 606 | unsigned int flags) |
607 | { | 607 | { |
608 | struct netdev_queue *txq; | ||
608 | struct ifinfomsg *ifm; | 609 | struct ifinfomsg *ifm; |
609 | struct nlmsghdr *nlh; | 610 | struct nlmsghdr *nlh; |
610 | struct net_device_stats *stats; | 611 | struct net_device_stats *stats; |
@@ -635,8 +636,9 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, | |||
635 | if (dev->master) | 636 | if (dev->master) |
636 | NLA_PUT_U32(skb, IFLA_MASTER, dev->master->ifindex); | 637 | NLA_PUT_U32(skb, IFLA_MASTER, dev->master->ifindex); |
637 | 638 | ||
638 | if (dev->qdisc_sleeping) | 639 | txq = &dev->tx_queue; |
639 | NLA_PUT_STRING(skb, IFLA_QDISC, dev->qdisc_sleeping->ops->id); | 640 | if (txq->qdisc_sleeping) |
641 | NLA_PUT_STRING(skb, IFLA_QDISC, txq->qdisc_sleeping->ops->id); | ||
640 | 642 | ||
641 | if (1) { | 643 | if (1) { |
642 | struct rtnl_link_ifmap map = { | 644 | struct rtnl_link_ifmap map = { |