From: Jay Vosburgh Date: Wed, 21 Jul 2010 12:14:47 +0000 (+0000) Subject: bonding: change test for presence of VLANs X-Git-Tag: v2.6.36-rc1~571^2~135 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f35188faa0fbabefac476536994f4b6f3677380f;p=pandora-kernel.git bonding: change test for presence of VLANs After commit ad1afb00393915a51c21b1ae8704562bf036855f ("vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)") it is now regular practice for a VLAN "add vid" for VLAN 0 to arrive prior to any VLAN registration or creation of a vlan_group. This patch updates the bonding code that tests for the presence of VLANs configured above bonding. The new logic tests for bond->vlgrp to determine if a registration has occured, instead of testing that bonding's internal vlan_list is empty. The old code would panic when vlan_list was not empty, but vlgrp was still NULL (because only an "add vid" for VLAN 0 had occured). Bonding still adds VLAN 0 to its internal list so that 802.1p frames are handled correctly on transmit when non-VLAN accelerated slaves are members of the bond. The test against bond->vlan_list remains in bond_dev_queue_xmit for this reason. Modification to the bond->vlgrp now occurs under lock (in addition to RTNL), because not all inspections of it occur under RTNL. Additionally, because 8021q will never issue a "kill vid" for VLAN 0, there is now logic in bond_uninit to release any remaining entries from vlan_list. Signed-off-by: Jay Vosburgh Cc: Pedro Garcia Cc: Patrick McHardy Signed-off-by: David S. Miller --- Reading git-diff-tree failed