summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_private.h
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2018-04-29 10:56:08 +0300
committerDavid S. Miller <davem@davemloft.net>2018-04-30 12:42:40 -0400
commit4d4fd36126d66d6091ca5aaabab262b5da3849c5 (patch)
treea51be25d13043d00071ac504f98284a47da0ed1a /net/bridge/br_private.h
parent6df93462c2e3ed9656829078aa68214c64619042 (diff)
downloadblackbird-obmc-linux-4d4fd36126d66d6091ca5aaabab262b5da3849c5.tar.gz
blackbird-obmc-linux-4d4fd36126d66d6091ca5aaabab262b5da3849c5.zip
net: bridge: Publish bridge accessor functions
Add a couple new functions to allow querying FDB and vlan settings of a bridge. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_private.h')
-rw-r--r--net/bridge/br_private.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index a7cb3ece5031..1a5093115534 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -594,11 +594,22 @@ static inline bool br_rx_handler_check_rcu(const struct net_device *dev)
return rcu_dereference(dev->rx_handler) == br_handle_frame;
}
+static inline bool br_rx_handler_check_rtnl(const struct net_device *dev)
+{
+ return rcu_dereference_rtnl(dev->rx_handler) == br_handle_frame;
+}
+
static inline struct net_bridge_port *br_port_get_check_rcu(const struct net_device *dev)
{
return br_rx_handler_check_rcu(dev) ? br_port_get_rcu(dev) : NULL;
}
+static inline struct net_bridge_port *
+br_port_get_check_rtnl(const struct net_device *dev)
+{
+ return br_rx_handler_check_rtnl(dev) ? br_port_get_rtnl_rcu(dev) : NULL;
+}
+
/* br_ioctl.c */
int br_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
int br_ioctl_deviceless_stub(struct net *net, unsigned int cmd,
OpenPOWER on IntegriCloud