bridge: add br_vlan_get_pvid_rcu()
This new function allows you to fetch bridge pvid from packet path. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
This commit is contained in:
@@ -88,6 +88,7 @@ static inline bool br_multicast_router(const struct net_device *dev)
|
||||
#if IS_ENABLED(CONFIG_BRIDGE) && IS_ENABLED(CONFIG_BRIDGE_VLAN_FILTERING)
|
||||
bool br_vlan_enabled(const struct net_device *dev);
|
||||
int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid);
|
||||
int br_vlan_get_pvid_rcu(const struct net_device *dev, u16 *p_pvid);
|
||||
int br_vlan_get_info(const struct net_device *dev, u16 vid,
|
||||
struct bridge_vlan_info *p_vinfo);
|
||||
#else
|
||||
@@ -101,6 +102,11 @@ static inline int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int br_vlan_get_pvid_rcu(const struct net_device *dev, u16 *p_pvid)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int br_vlan_get_info(const struct net_device *dev, u16 vid,
|
||||
struct bridge_vlan_info *p_vinfo)
|
||||
{
|
||||
|
Reference in New Issue
Block a user