OSDN Git Service

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:26:59 +0000 (10:26 +0200)
commitd7bfa99fcc7fdc5a6669ef63c60dc4c3dacb7020
treefd8875aa0505eb1c28fafd3e2261ff772cd762b7
parent8274cb813b5dcb27de72bf7abf0a2ebad4cf95dd
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