On 18/04/2019 20:35, Mike Manning wrote: > In the case of vlan filtering on bridges, the bridge may also have the > corresponding vlan devices as upper devices. A vlan bridge binding mode > is added to allow the link state of the vlan device to track only the > state of the subset of bridge ports that are also members of the vlan, > rather than that of all bridge ports. This mode is set with a vlan flag > rather than a bridge sysfs so that the 8021q module is aware that it > should not set the link state for the vlan device. > > If bridge vlan is configured, the bridge device event handling results > in the link state for an upper device being set, if it is a vlan device > with the vlan bridge binding mode enabled. This also sets a > vlan_bridge_binding flag so that subsequent UP/DOWN/CHANGE events for > the ports in that bridge result in a link state update of the vlan > device if required. > > The link state of the vlan device is up if there is at least one bridge > port that is a vlan member that is admin & oper up, otherwise its oper > state is IF_OPER_LOWERLAYERDOWN. > > Signed-off-by: Mike Manning <mmann...@vyatta.att-mail.com> > --- > net/bridge/br.c | 13 +++-- > net/bridge/br_private.h | 14 +++++ > net/bridge/br_vlan.c | 151 > ++++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 174 insertions(+), 4 deletions(-) >
Acked-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com>