bridge: Export VLAN filtering state
It's useful for drivers supporting bridge offload to be able to query the bridge's VLAN filtering state. Currently, upon enslavement to a bridge master, the offloading driver will only learn about the bridge's VLAN filtering state after the bridge device was already linked with its slave. Being able to query the bridge's VLAN filtering state allows such drivers to forbid enslavement in case resource couldn't be allocated for a VLAN-aware bridge and also choose the correct initialization routine for the enslaved port, which is dependent on the bridge type. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
5f9e27e60e
commit
1f51445af3
@@ -854,10 +854,6 @@ static inline u16 br_get_pvid(const struct net_bridge_vlan_group *vg)
|
||||
return vg->pvid;
|
||||
}
|
||||
|
||||
static inline int br_vlan_enabled(struct net_bridge *br)
|
||||
{
|
||||
return br->vlan_enabled;
|
||||
}
|
||||
#else
|
||||
static inline bool br_allowed_ingress(const struct net_bridge *br,
|
||||
struct net_bridge_vlan_group *vg,
|
||||
@@ -945,11 +941,6 @@ static inline u16 br_get_pvid(const struct net_bridge_vlan_group *vg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int br_vlan_enabled(struct net_bridge *br)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int __br_vlan_filter_toggle(struct net_bridge *br,
|
||||
unsigned long val)
|
||||
{
|
||||
|
Reference in New Issue
Block a user