linux/net/core
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
..
Makefile net: Compute protocol sequence numbers and fragment IDs using MD5. 2011-08-06 18:33:19 -07:00
datagram.c net: convert core to skb paged frag APIs 2011-08-24 17:52:11 -07:00
dev.c net: allow vlan traffic to be received under bond 2011-10-18 23:46:46 -04:00
dev_addr_lists.c net: remove ndo_set_multicast_list callback 2011-08-17 20:22:03 -07:00
drop_monitor.c net,rcu: convert call_rcu(free_dm_hw_stat) to kfree_rcu() 2011-05-07 22:50:59 -07:00
dst.c net: fix potential neighbour race in dst_ifdown() 2011-08-09 21:47:14 -07:00
ethtool.c net: consolidate and fix ethtool_ops->get_settings calling 2011-09-15 17:32:26 -04:00
fib_rules.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
filter.c rcu: convert uses of rcu_assign_pointer(x, NULL) to RCU_INIT_POINTER 2011-08-02 04:29:23 -07:00
flow.c net/flow: Fix potential memory leak 2011-10-17 19:18:42 -04:00
gen_estimator.c net,rcu: convert call_rcu(__gen_kill_estimator) to kfree_rcu() 2011-05-07 22:50:57 -07:00
gen_stats.c net/core: EXPORT_SYMBOL cleanups 2010-07-12 12:57:55 -07:00
iovec.c net: Limit socket I/O iovec total length to INT_MAX. 2010-10-28 11:47:52 -07:00
kmap_skb.h net: convert core to skb paged frag APIs 2011-08-24 17:52:11 -07:00
link_watch.c net: linkwatch: allow vlans to get carrier changes faster 2011-09-15 15:36:34 -04:00
neighbour.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
net-sysfs.c net: consolidate and fix ethtool_ops->get_settings calling 2011-09-15 17:32:26 -04:00
net-sysfs.h xps: Add CONFIG_XPS 2010-11-28 18:24:14 -08:00
net-traces.c core: add tracepoints for queueing skb to rcvbuf 2011-06-21 16:06:10 -07:00
net_namespace.c rtnl: provide link dump consistency info 2011-07-01 15:39:53 -07:00
netevent.c net/core: EXPORT_SYMBOL cleanups 2010-07-12 12:57:55 -07:00
netpoll.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
pktgen.c net: convert core to skb paged frag APIs 2011-08-24 17:52:11 -07:00
request_sock.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-12-08 13:47:38 -08:00
rtnetlink.c if_link: Add additional parameter to IFLA_VF_INFO for spoof checking 2011-10-16 13:15:38 -07:00
scm.c af_unix: dont send SCM_CREDENTIALS by default 2011-09-28 13:29:50 -04:00
secure_seq.c net: Compute protocol sequence numbers and fragment IDs using MD5. 2011-08-06 18:33:19 -07:00
skbuff.c net: more accurate skb truesize 2011-10-13 16:05:07 -04:00
sock.c net: more accurate skb truesize 2011-10-13 16:05:07 -04:00
stream.c net: Fix the condition passed to sk_wait_event() 2010-10-03 20:41:32 -07:00
sysctl_net_core.c net: Kill ratelimit.h dependency in linux/net.h 2011-05-27 13:41:33 -04:00
timestamping.c net: export the receive time stamping hook for non-NAPI drivers 2011-06-20 13:56:53 -07:00
user_dma.c net: convert core to skb paged frag APIs 2011-08-24 17:52:11 -07:00
utils.c net: Kill ratelimit.h dependency in linux/net.h 2011-05-27 13:41:33 -04:00