Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103590
b: refs/heads/master
c: eae792b
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jul 18, 2008
1 parent 6d5224b commit 69b1e14
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e3c50d5d25ac09efd9acbe2b2a3e365466de84ed
refs/heads/master: eae792b722fef08dcf3aee88266ee7def9710757
3 changes: 3 additions & 0 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,9 @@ struct net_device
void (*poll_controller)(struct net_device *dev);
#endif

u16 (*select_queue)(struct net_device *dev,
struct sk_buff *skb);

#ifdef CONFIG_NET_NS
/* Network namespace this network device is inside */
struct net *nd_net;
Expand Down
9 changes: 6 additions & 3 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,9 @@ static struct netdev_queue *dev_pick_tx(struct net_device *dev,
{
u16 queue_index = 0;

if (dev->select_queue)
queue_index = dev->select_queue(dev, skb);

skb_set_queue_mapping(skb, queue_index);
return netdev_get_tx_queue(dev, queue_index);
}
Expand Down Expand Up @@ -1710,14 +1713,14 @@ int dev_queue_xmit(struct sk_buff *skb)
}

gso:
txq = dev_pick_tx(dev, skb);
spin_lock_prefetch(&txq->lock);

/* Disable soft irqs for various locks below. Also
* stops preemption for RCU.
*/
rcu_read_lock_bh();

txq = dev_pick_tx(dev, skb);
spin_lock_prefetch(&txq->lock);

/* Updates of qdisc are serialized by queue->lock.
* The struct Qdisc which is pointed to by qdisc is now a
* rcu structure - it may be accessed without acquiring
Expand Down

0 comments on commit 69b1e14

Please sign in to comment.