diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-01 13:58:18 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-01 13:58:18 -0400 |
| commit | 6e1bd1ab1d9ab8e83cdc940df82fbf8418e2593f (patch) | |
| tree | f1324a39f155375221ed88db0626f61b75c51db6 /net/core/dev.c | |
| parent | fec6dd833e733b5d9588a1f1e4d81118b79b5774 (diff) | |
| parent | 76a6106f124e375df0ea6ba6bcf204b8caff786a (diff) | |
Merge branch 'for-2.6.37' into for-2.6.38
Diffstat (limited to 'net/core/dev.c')
| -rw-r--r-- | net/core/dev.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 1ae65439144..660dd41aaaa 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2058,16 +2058,16 @@ static struct netdev_queue *dev_pick_tx(struct net_device *dev, struct sk_buff *skb) { int queue_index; - struct sock *sk = skb->sk; + const struct net_device_ops *ops = dev->netdev_ops; - queue_index = sk_tx_queue_get(sk); - if (queue_index < 0) { - const struct net_device_ops *ops = dev->netdev_ops; + if (ops->ndo_select_queue) { + queue_index = ops->ndo_select_queue(dev, skb); + queue_index = dev_cap_txqueue(dev, queue_index); + } else { + struct sock *sk = skb->sk; + queue_index = sk_tx_queue_get(sk); + if (queue_index < 0) { - if (ops->ndo_select_queue) { - queue_index = ops->ndo_select_queue(dev, skb); - queue_index = dev_cap_txqueue(dev, queue_index); - } else { queue_index = 0; if (dev->real_num_tx_queues > 1) queue_index = skb_tx_hash(dev, skb); @@ -3143,7 +3143,7 @@ pull: put_page(skb_shinfo(skb)->frags[0].page); memmove(skb_shinfo(skb)->frags, skb_shinfo(skb)->frags + 1, - --skb_shinfo(skb)->nr_frags); + --skb_shinfo(skb)->nr_frags * sizeof(skb_frag_t)); } } @@ -4845,7 +4845,7 @@ static void rollback_registered_many(struct list_head *head) dev = list_first_entry(head, struct net_device, unreg_list); call_netdevice_notifiers(NETDEV_UNREGISTER_BATCH, dev); - synchronize_net(); + rcu_barrier(); list_for_each_entry(dev, head, unreg_list) dev_put(dev); |
