aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorNeil Horman <nhorman@tuxdriver.com>2011-07-26 02:05:38 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-28 01:39:30 -0400
commit550fd08c2cebad61c548def135f67aba284c6162 (patch)
tree8aa7c4d20a9faeb42261b75cfa38d8fd27b574ff /drivers/net/bonding
parentd8873315065f1f527c7c380402cf59b1e1d0ae36 (diff)
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There are a handful of drivers that violate this assumption of course, and need to be fixed up. This patch identifies those drivers, and marks them as not being able to support the safe transmission of skbs by clearning the IFF_TX_SKB_SHARING flag in priv_flags Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: Karsten Keil <isdn@linux-pingi.de> CC: "David S. Miller" <davem@davemloft.net> CC: Jay Vosburgh <fubar@us.ibm.com> CC: Andy Gospodarek <andy@greyhouse.net> CC: Patrick McHardy <kaber@trash.net> CC: Krzysztof Halasa <khc@pm.waw.pl> CC: "John W. Linville" <linville@tuxdriver.com> CC: Greg Kroah-Hartman <gregkh@suse.de> CC: Marcel Holtmann <marcel@holtmann.org> CC: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 02842d05c11f..df21e84f8198 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1557,8 +1557,10 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1557 1557
1558 if (slave_dev->type != ARPHRD_ETHER) 1558 if (slave_dev->type != ARPHRD_ETHER)
1559 bond_setup_by_slave(bond_dev, slave_dev); 1559 bond_setup_by_slave(bond_dev, slave_dev);
1560 else 1560 else {
1561 ether_setup(bond_dev); 1561 ether_setup(bond_dev);
1562 bond_dev->priv_flags &= ~IFF_TX_SKB_SHARING;
1563 }
1562 1564
1563 netdev_bonding_change(bond_dev, 1565 netdev_bonding_change(bond_dev,
1564 NETDEV_POST_TYPE_CHANGE); 1566 NETDEV_POST_TYPE_CHANGE);
@@ -4330,7 +4332,7 @@ static void bond_setup(struct net_device *bond_dev)
4330 bond_dev->tx_queue_len = 0; 4332 bond_dev->tx_queue_len = 0;
4331 bond_dev->flags |= IFF_MASTER|IFF_MULTICAST; 4333 bond_dev->flags |= IFF_MASTER|IFF_MULTICAST;
4332 bond_dev->priv_flags |= IFF_BONDING; 4334 bond_dev->priv_flags |= IFF_BONDING;
4333 bond_dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; 4335 bond_dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE | IFF_TX_SKB_SHARING);
4334 4336
4335 /* At first, we block adding VLANs. That's the only way to 4337 /* At first, we block adding VLANs. That's the only way to
4336 * prevent problems that occur when adding VLANs over an 4338 * prevent problems that occur when adding VLANs over an