aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 17b4dd94da90..63c22b0bb5ad 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -388,6 +388,8 @@ struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr)
388 return next; 388 return next;
389} 389}
390 390
391#define bond_queue_mapping(skb) (*(u16 *)((skb)->cb))
392
391/** 393/**
392 * bond_dev_queue_xmit - Prepare skb for xmit. 394 * bond_dev_queue_xmit - Prepare skb for xmit.
393 * 395 *
@@ -400,6 +402,9 @@ int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb,
400{ 402{
401 skb->dev = slave_dev; 403 skb->dev = slave_dev;
402 skb->priority = 1; 404 skb->priority = 1;
405
406 skb->queue_mapping = bond_queue_mapping(skb);
407
403 if (unlikely(netpoll_tx_running(slave_dev))) 408 if (unlikely(netpoll_tx_running(slave_dev)))
404 bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb); 409 bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb);
405 else 410 else
@@ -1292,6 +1297,7 @@ static inline int slave_enable_netpoll(struct slave *slave)
1292 goto out; 1297 goto out;
1293 1298
1294 np->dev = slave->dev; 1299 np->dev = slave->dev;
1300 strlcpy(np->dev_name, slave->dev->name, IFNAMSIZ);
1295 err = __netpoll_setup(np); 1301 err = __netpoll_setup(np);
1296 if (err) { 1302 if (err) {
1297 kfree(np); 1303 kfree(np);
@@ -1422,9 +1428,9 @@ out:
1422 return features; 1428 return features;
1423} 1429}
1424 1430
1425#define BOND_VLAN_FEATURES (NETIF_F_ALL_TX_OFFLOADS | \ 1431#define BOND_VLAN_FEATURES (NETIF_F_ALL_CSUM | NETIF_F_SG | \
1426 NETIF_F_SOFT_FEATURES | \ 1432 NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \
1427 NETIF_F_LRO) 1433 NETIF_F_HIGHDMA | NETIF_F_LRO)
1428 1434
1429static void bond_compute_features(struct bonding *bond) 1435static void bond_compute_features(struct bonding *bond)
1430{ 1436{
@@ -4206,6 +4212,7 @@ static inline int bond_slave_override(struct bonding *bond,
4206 return res; 4212 return res;
4207} 4213}
4208 4214
4215
4209static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb) 4216static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
4210{ 4217{
4211 /* 4218 /*
@@ -4216,6 +4223,11 @@ static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
4216 */ 4223 */
4217 u16 txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : 0; 4224 u16 txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : 0;
4218 4225
4226 /*
4227 * Save the original txq to restore before passing to the driver
4228 */
4229 bond_queue_mapping(skb) = skb->queue_mapping;
4230
4219 if (unlikely(txq >= dev->real_num_tx_queues)) { 4231 if (unlikely(txq >= dev->real_num_tx_queues)) {
4220 do { 4232 do {
4221 txq -= dev->real_num_tx_queues; 4233 txq -= dev->real_num_tx_queues;