linux-hardened/drivers/net/bonding
dingtianhong fbd929f2dc bonding: support QinQ for bond arp interval
The bond send arp request to indicate that the slave is active, and if the bond dev
is a vlan dev, it will set the vlan tag in skb to notice the vlan group, but the
bond could only send a skb with 802.1q proto, not support for QinQ.

So add outer tag for lower vlan tag and inner tag for upper vlan tag to support QinQ,
The new skb will be consist of two vlan tag just like this:

dst mac | src mac | outer vlan tag | inner vlan tag | data | .....

If We don't need QinQ, the inner vlan tag could be set to 0 and use outer vlan tag
 as a normal vlan group.

Using "ip link" to configure the bond for QinQ and add test log:

ip link add link bond0  bond0.20 type vlan proto 802.1ad id 20
ip link add link bond0.20  bond0.20.200 type vlan proto 802.1q id 200

ifconfig bond0.20 11.11.20.36/24
ifconfig bond0.20.200 11.11.200.36/24

echo +11.11.200.37 > /sys/class/net/bond0/bonding/arp_ip_target

90:e2:ba:07:4a:5c (oui Unknown) > Broadcast, ethertype 802.1Q-QinQ (0x88a8),length 50: vlan 20, p 0,ethertype 802.1Q, vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 11.11.200.37 tell 11.11.200.36, length 28

90:e2:ba:06:f9:86 (oui Unknown) > 90:e2:ba:07:4a:5c (oui Unknown), ethertype 802.1Q-QinQ (0x88a8), length 50: vlan 20, p 0, ethertype 802.1Q, vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Reply 11.11.200.37 is-at 90:e2:ba:06:f9:86 (oui Unknown), length 28

v1->v2: remove the comment "TODO: QinQ?".

Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: Veaceslav Falico <vfalico@redhat.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-26 16:41:28 -04:00
..
bond_3ad.c bonding: ratelimit pr_warn()s in 802.3ad mode 2014-03-18 14:50:48 -04:00
bond_3ad.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-02-19 01:24:22 -05:00
bond_alb.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-03-14 22:31:55 -04:00
bond_alb.h drivers/net/*: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
bond_debugfs.c bonding: Convert pr_warning to pr_warn, neatening 2014-02-17 00:29:23 -05:00
bond_main.c bonding: support QinQ for bond arp interval 2014-03-26 16:41:28 -04:00
bond_netlink.c bonding: force cast of IP address in options 2014-03-11 16:37:14 -04:00
bond_options.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-03-14 22:31:55 -04:00
bond_options.h bonding: fix const in options processing 2014-03-06 17:39:19 -05:00
bond_procfs.c bonding: fix const in options processing 2014-03-06 17:39:19 -05:00
bond_sysfs.c bonding: options handling cleanup 2014-03-06 16:08:52 -05:00
bond_sysfs_slave.c bonding: change name of sysfs dir for bonding slaves 2014-01-22 21:57:05 -08:00
bonding.h bonding: support QinQ for bond arp interval 2014-03-26 16:41:28 -04:00
Makefile bonding: add sysfs /slave dir for bond slave devices. 2014-01-17 18:51:58 -08:00