aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-08 20:33:13 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-08 20:33:13 -0400
commit555353cfa1aee293de445bfa6de43276138ddd82 (patch)
treeb5daba85806b8e36731c4a474aac97f1a0140a51 /net/core/dev.c
parentdc2b48475a0a36f8b3bbb2da60d3a006dc5c2c84 (diff)
netdev: The ingress_lock member is no longer needed.
Every qdisc is assosciated with a queue, and in the case of ingress qdiscs that will now be netdev->rx_queue so using that queue's lock is the thing to do. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 05011048b86..2322fb69fd5 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2014,10 +2014,11 @@ static inline struct sk_buff *handle_macvlan(struct sk_buff *skb,
2014 */ 2014 */
2015static int ing_filter(struct sk_buff *skb) 2015static int ing_filter(struct sk_buff *skb)
2016{ 2016{
2017 struct Qdisc *q;
2018 struct net_device *dev = skb->dev; 2017 struct net_device *dev = skb->dev;
2019 int result = TC_ACT_OK;
2020 u32 ttl = G_TC_RTTL(skb->tc_verd); 2018 u32 ttl = G_TC_RTTL(skb->tc_verd);
2019 struct netdev_queue *rxq;
2020 int result = TC_ACT_OK;
2021 struct Qdisc *q;
2021 2022
2022 if (MAX_RED_LOOP < ttl++) { 2023 if (MAX_RED_LOOP < ttl++) {
2023 printk(KERN_WARNING 2024 printk(KERN_WARNING
@@ -2029,10 +2030,12 @@ static int ing_filter(struct sk_buff *skb)
2029 skb->tc_verd = SET_TC_RTTL(skb->tc_verd, ttl); 2030 skb->tc_verd = SET_TC_RTTL(skb->tc_verd, ttl);
2030 skb->tc_verd = SET_TC_AT(skb->tc_verd, AT_INGRESS); 2031 skb->tc_verd = SET_TC_AT(skb->tc_verd, AT_INGRESS);
2031 2032
2032 spin_lock(&dev->ingress_lock); 2033 rxq = &dev->rx_queue;
2034
2035 spin_lock(&rxq->lock);
2033 if ((q = dev->qdisc_ingress) != NULL) 2036 if ((q = dev->qdisc_ingress) != NULL)
2034 result = q->enqueue(skb, q); 2037 result = q->enqueue(skb, q);
2035 spin_unlock(&dev->ingress_lock); 2038 spin_unlock(&rxq->lock);
2036 2039
2037 return result; 2040 return result;
2038} 2041}
@@ -3795,7 +3798,6 @@ int register_netdevice(struct net_device *dev)
3795 spin_lock_init(&dev->_xmit_lock); 3798 spin_lock_init(&dev->_xmit_lock);
3796 netdev_set_lockdep_class(&dev->_xmit_lock, dev->type); 3799 netdev_set_lockdep_class(&dev->_xmit_lock, dev->type);
3797 dev->xmit_lock_owner = -1; 3800 dev->xmit_lock_owner = -1;
3798 spin_lock_init(&dev->ingress_lock);
3799 3801
3800 dev->iflink = -1; 3802 dev->iflink = -1;
3801 3803