net: add netif_is_bridge_master helper
authorJiri Pirko <jiri@mellanox.com>
Thu, 27 Aug 2015 07:31:19 +0000 (09:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Aug 2015 23:28:34 +0000 (16:28 -0700)
Add this helper so code can easily figure out if netdev is a bridge.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h

index 39f30da..be625f4 100644 (file)
@@ -3848,6 +3848,11 @@ static inline bool netif_is_vrf(const struct net_device *dev)
        return dev->priv_flags & IFF_VRF_MASTER;
 }
 
+static inline bool netif_is_bridge_master(const struct net_device *dev)
+{
+       return dev->priv_flags & IFF_EBRIDGE;
+}
+
 static inline bool netif_index_is_vrf(struct net *net, int ifindex)
 {
        bool rc = false;