diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-07-05 21:16:34 +0800 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-07-05 21:34:48 +0200 |
commit | 7582f5b70f9a2335f3713edb9a2614a50f1f1a90 (patch) | |
tree | 58377fc81d0e865f9e72f2d86c94380001ff76c1 /include | |
parent | 9d6a1ecdc99717051a4831ea9b6554dc42830dee (diff) | |
download | linux-7582f5b70f9a2335f3713edb9a2614a50f1f1a90.tar.bz2 |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_bridge.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index f3fab5d0ea97..950db1dad830 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h @@ -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) { |