Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 253383
b: refs/heads/master
c: 374eeb5
h: refs/heads/master
i:
  253381: d2c959f
  253379: 58b3dc5
  253375: a666078
v: v3
  • Loading branch information
Neil Horman authored and David S. Miller committed Jun 5, 2011
1 parent 2e5a523 commit 1516756
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b446c6a7179513edcb34706088c4ce901b9a039
refs/heads/master: 374eeb5a9d77ea719c5c46f4d70226623f4528ce
11 changes: 11 additions & 0 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,8 @@ struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr)
return next;
}

#define bond_queue_mapping(skb) (*(u16 *)((skb)->cb))

/**
* bond_dev_queue_xmit - Prepare skb for xmit.
*
Expand All @@ -400,6 +402,9 @@ int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb,
{
skb->dev = slave_dev;
skb->priority = 1;

skb->queue_mapping = bond_queue_mapping(skb);

if (unlikely(netpoll_tx_running(slave_dev)))
bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb);
else
Expand Down Expand Up @@ -4206,6 +4211,7 @@ static inline int bond_slave_override(struct bonding *bond,
return res;
}


static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
{
/*
Expand All @@ -4216,6 +4222,11 @@ static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
*/
u16 txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : 0;

/*
* Save the original txq to restore before passing to the driver
*/
bond_queue_mapping(skb) = skb->queue_mapping;

if (unlikely(txq >= dev->real_num_tx_queues)) {
do {
txq -= dev->real_num_tx_queues;
Expand Down

0 comments on commit 1516756

Please sign in to comment.