aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-06-21 01:29:08 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-21 01:29:08 -0400
commit9f6ec8d697c08963d83880ccd35c13c5ace716ea (patch)
treead8d93cf6fcdd09b86ade09f5fcbbc66cdb1cca2 /drivers/net/bonding
parent4aa3a715551c93eda32d79bd52042ce500bd5383 (diff)
parent56299378726d5f2ba8d3c8cbbd13cb280ba45e4f (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/wireless/iwlwifi/iwl-agn-rxon.c drivers/net/wireless/rtlwifi/pci.c net/netfilter/ipvs/ip_vs_core.c
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 07e866d5a87c..d117280b9cd8 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -378,6 +378,8 @@ struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr)
378 return next; 378 return next;
379} 379}
380 380
381#define bond_queue_mapping(skb) (*(u16 *)((skb)->cb))
382
381/** 383/**
382 * bond_dev_queue_xmit - Prepare skb for xmit. 384 * bond_dev_queue_xmit - Prepare skb for xmit.
383 * 385 *
@@ -390,6 +392,9 @@ int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb,
390{ 392{
391 skb->dev = slave_dev; 393 skb->dev = slave_dev;
392 skb->priority = 1; 394 skb->priority = 1;
395
396 skb->queue_mapping = bond_queue_mapping(skb);
397
393 if (unlikely(netpoll_tx_running(slave_dev))) 398 if (unlikely(netpoll_tx_running(slave_dev)))
394 bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb); 399 bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb);
395 else 400 else
@@ -1275,6 +1280,7 @@ static inline int slave_enable_netpoll(struct slave *slave)
1275 goto out; 1280 goto out;
1276 1281
1277 np->dev = slave->dev; 1282 np->dev = slave->dev;
1283 strlcpy(np->dev_name, slave->dev->name, IFNAMSIZ);
1278 err = __netpoll_setup(np); 1284 err = __netpoll_setup(np);
1279 if (err) { 1285 if (err) {
1280 kfree(np); 1286 kfree(np);
@@ -4188,6 +4194,7 @@ static inline int bond_slave_override(struct bonding *bond,
4188 return res; 4194 return res;
4189} 4195}
4190 4196
4197
4191static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb) 4198static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
4192{ 4199{
4193 /* 4200 /*
@@ -4198,6 +4205,11 @@ static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
4198 */ 4205 */
4199 u16 txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : 0; 4206 u16 txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : 0;
4200 4207
4208 /*
4209 * Save the original txq to restore before passing to the driver
4210 */
4211 bond_queue_mapping(skb) = skb->queue_mapping;
4212
4201 if (unlikely(txq >= dev->real_num_tx_queues)) { 4213 if (unlikely(txq >= dev->real_num_tx_queues)) {
4202 do { 4214 do {
4203 txq -= dev->real_num_tx_queues; 4215 txq -= dev->real_num_tx_queues;