aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-12-13 03:19:28 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-16 15:43:21 -0500
commit8387451e558853f7b513790c0070e3b6f0c135aa (patch)
tree4ba7b1c1190e690f750323dc802b9d5b4337a76d /drivers/net/bonding/bond_main.c
parent42dccd1f757d674a6604077a61d1577d1578c755 (diff)
bonding/vlan: Remove redundant VLAN tag insertion logic
A bond may have a mixture of slave devices with and without hardware VLAN tag insertion capability. Therefore it always claims this capability and performs software VLAN tag insertion if the slave does not. Since commit 7b9c60903714bf0a19d746b228864bad3497284e, this has also been done by dev_hard_start_xmit(). The result is that VLAN- tagged skbs are now double-tagged when transmitted through slave devices without hardware VLAN tag insertion! Remove the now-redundant logic from bond_dev_queue_xmit(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Reviewed-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index d0ea760ce419..ef370c923341 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -418,36 +418,11 @@ struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr)
418 * @bond: bond device that got this skb for tx. 418 * @bond: bond device that got this skb for tx.
419 * @skb: hw accel VLAN tagged skb to transmit 419 * @skb: hw accel VLAN tagged skb to transmit
420 * @slave_dev: slave that is supposed to xmit this skbuff 420 * @slave_dev: slave that is supposed to xmit this skbuff
421 *
422 * When the bond gets an skb to transmit that is
423 * already hardware accelerated VLAN tagged, and it
424 * needs to relay this skb to a slave that is not
425 * hw accel capable, the skb needs to be "unaccelerated",
426 * i.e. strip the hwaccel tag and re-insert it as part
427 * of the payload.
428 */ 421 */
429int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, 422int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb,
430 struct net_device *slave_dev) 423 struct net_device *slave_dev)
431{ 424{
432 unsigned short uninitialized_var(vlan_id); 425 skb->dev = slave_dev;
433
434 /* Test vlan_list not vlgrp to catch and handle 802.1p tags */
435 if (!list_empty(&bond->vlan_list) &&
436 !(slave_dev->features & NETIF_F_HW_VLAN_TX) &&
437 vlan_get_tag(skb, &vlan_id) == 0) {
438 skb->dev = slave_dev;
439 skb = vlan_put_tag(skb, vlan_id);
440 if (!skb) {
441 /* vlan_put_tag() frees the skb in case of error,
442 * so return success here so the calling functions
443 * won't attempt to free is again.
444 */
445 return 0;
446 }
447 } else {
448 skb->dev = slave_dev;
449 }
450
451 skb->priority = 1; 426 skb->priority = 1;
452#ifdef CONFIG_NET_POLL_CONTROLLER 427#ifdef CONFIG_NET_POLL_CONTROLLER
453 if (unlikely(bond->dev->priv_flags & IFF_IN_NETPOLL)) { 428 if (unlikely(bond->dev->priv_flags & IFF_IN_NETPOLL)) {