bonding: send learning packets for vlans on slave
authorDebabrata Banerjee <dbanerje@akamai.com>
Wed, 9 May 2018 23:32:11 +0000 (19:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 May 2018 08:20:26 +0000 (10:20 +0200)
commitf6294114ade4c46d9f54c6fd0afd1225855a8f0e
treefda65f371be287519b2c99e7eb26f9e73b77189b
parent2eca993ddc832c9d1174c177bea1057f34a5263f
bonding: send learning packets for vlans on slave

[ Upstream commit 21706ee8a47d3ede7fdae0be6d7c0a0e31a83229 ]

There was a regression at some point from the intended functionality of
commit f60c3704e87d ("bonding: Fix alb mode to only use first level
vlans.")

Given the return value vlan_get_encap_level() we need to store the nest
level of the bond device, and then compare the vlan's encap level to
this. Without this, this check always fails and learning packets are
never sent.

In addition, this same commit caused a regression in the behavior of
balance_alb, which requires learning packets be sent for all interfaces
using the slave's mac in order to load balance properly. For vlan's
that have not set a user mac, we can send after checking one bit.
Otherwise we need send the set mac, albeit defeating rx load balancing
for that vlan.

Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/bonding/bond_alb.c
drivers/net/bonding/bond_main.c
include/net/bonding.h