linux-stable/net
John Fastabend 2425717b27 net: allow vlan traffic to be received under bond
The following configuration used to work as I expected. At least
we could use the fcoe interfaces to do MPIO and the bond0 iface
to do load balancing or failover.

       ---eth2.228-fcoe
       |
eth2 -----|
          |
          |---- bond0
          |
eth3 -----|
       |
       ---eth3.228-fcoe

This worked because of a change we added to allow inactive slaves
to rx 'exact' matches. This functionality was kept intact with the
rx_handler mechanism. However now the vlan interface attached to the
active slave never receives traffic because the bonding rx_handler
updates the skb->dev and goto's another_round. Previously, the
vlan_do_receive() logic was called before the bonding rx_handler.

Now by the time vlan_do_receive calls vlan_find_dev() the
skb->dev is set to bond0 and it is clear no vlan is attached
to this iface. The vlan lookup fails.

This patch moves the VLAN check above the rx_handler. A VLAN
tagged frame is now routed to the eth2.228-fcoe iface in the
above schematic. Untagged frames continue to the bond0 as
normal. This case also remains intact,

eth2 --> bond0 --> vlan.228

Here the skb is VLAN tagged but the vlan lookup fails on eth2
causing the bonding rx_handler to be called. On the second
pass the vlan lookup is on the bond0 iface and completes as
expected.

Putting a VLAN.228 on both the bond0 and eth2 device will
result in eth2.228 receiving the skb. I don't think this is
completely unexpected and was the result prior to the rx_handler
result.

Note, the same setup is also used for other storage traffic that
MPIO is used with eg. iSCSI and similar setups can be contrived
without storage protocols.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Tested-by: Hans Schillstrom <hams.schillstrom@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-18 23:46:46 -04:00
..
9p net/9p: Fix kernel crash with msize 512K 2011-09-06 08:17:15 -05:00
802 rcu: convert uses of rcu_assign_pointer(x, NULL) to RCU_INIT_POINTER 2011-08-02 04:29:23 -07:00
8021q net: consolidate and fix ethtool_ops->get_settings calling 2011-09-15 17:32:26 -04:00
appletalk appletalk: Reduce switch/case indent 2011-07-01 16:11:15 -07:00
atm Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
ax25
batman-adv Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
bluetooth Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem 2011-10-11 15:35:42 -04:00
bridge Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
caif caif: add error handling for allocation 2011-10-03 13:45:49 -04:00
can can: remove references to berlios mailinglist 2011-10-17 19:22:46 -04:00
ceph Merge branch 'for-linus' of git://github.com/NewDreamNetwork/ceph-client 2011-09-29 19:58:58 -07:00
core net: allow vlan traffic to be received under bond 2011-10-18 23:46:46 -04:00
dcb dcb: add DCBX mode to event notifier attributes 2011-10-06 15:49:51 -04:00
dccp Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net 2011-08-07 23:20:26 -07:00
decnet rcu: convert uses of rcu_assign_pointer(x, NULL) to RCU_INIT_POINTER 2011-08-02 04:29:23 -07:00
dns_resolver
dsa net: remove use of ndo_set_multicast_list in drivers 2011-08-17 20:22:03 -07:00
econet af_econet: Use current logging styles and neatening 2011-07-03 20:05:16 -07:00
ethernet net: don't clear IFF_XMIT_DST_RELEASE in ether_setup 2011-09-15 14:49:44 -04:00
ieee802154 6LoWPAN: fix skb_copy call 2011-09-15 15:36:35 -04:00
ipv4 macvlan: handle fragmented multicast frames 2011-10-18 23:22:07 -04:00
ipv6 ipv6: remove a rcu_read_lock in ndisc_constructor 2011-10-17 19:27:56 -04:00
ipx
irda Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
iucv net: more accurate skb truesize 2011-10-13 16:05:07 -04:00
key net: Remove casts of void * 2011-06-16 23:19:27 -04:00
l2tp l2tp: give proper headroom in pppol2tp_xmit() 2011-10-18 23:33:44 -04:00
lapb wan: make LAPB callbacks const 2011-09-16 19:20:20 -04:00
llc
mac80211 Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem 2011-10-17 15:05:26 -04:00
netfilter Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
netlabel Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net 2011-08-20 10:39:12 -07:00
netlink af_unix: dont send SCM_CREDENTIALS by default 2011-09-28 13:29:50 -04:00
netrom netrom: Reduce switch/case indent 2011-07-01 16:11:16 -07:00
nfc NFC: use after free on error 2011-09-27 14:34:10 -04:00
packet macvlan: handle fragmented multicast frames 2011-10-18 23:22:07 -04:00
phonet rcu: convert uses of rcu_assign_pointer(x, NULL) to RCU_INIT_POINTER 2011-08-02 04:29:23 -07:00
rds Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
rfkill net:rfkill: add a gpio setup function into GPIO rfkill 2011-10-03 15:19:19 -04:00
rose rose: Delete commented out references to ancient firewalling code. 2011-07-07 02:41:59 -07:00
rxrpc rxrpc: Fix set but unused variable 'usage' in rxrpc_get_transport() 2011-05-19 18:51:50 -04:00
sched Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
sctp net: more accurate skb truesize 2011-10-13 16:05:07 -04:00
sunrpc rcu: convert uses of rcu_assign_pointer(x, NULL) to RCU_INIT_POINTER 2011-08-02 04:29:23 -07:00
tipc tipc: Remove unused link event tracking code 2011-09-17 22:55:15 -04:00
unix af_unix: dont send SCM_CREDENTIALS by default 2011-09-28 13:29:50 -04:00
wanrouter
wimax
wireless nl80211: Add sta_flags to the station info 2011-10-14 14:48:23 -04:00
x25 x25: Reduce switch/case indent 2011-07-01 16:11:16 -07:00
xfrm Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
compat.c
Kconfig NFC: add nfc subsystem core 2011-07-05 15:26:57 -04:00
Makefile NFC: add nfc subsystem core 2011-07-05 15:26:57 -04:00
nonet.c
socket.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
sysctl_net.c