]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: send learning packets for vlans on slave
authorDebabrata Banerjee <dbanerje@akamai.com>
Wed, 9 May 2018 23:32:11 +0000 (19:32 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 May 2018 15:50:41 +0000 (11:50 -0400)
commitcd165c73c1a10e2bcfb494b8e0870e3be37cf7e5
tree07139d8a58c94ef6397d8dccff26ec6ebfa368c4
parentf1aa7b353b371ccde3c0eb08b60669ce32d054c4
bonding: send learning packets for vlans on slave

There was a regression at some point from the intended functionality of
commit 3fc65bda8bf5 ("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>
drivers/net/bonding/bond_alb.c
drivers/net/bonding/bond_main.c
include/net/bonding.h