Skip to content

Commit

Permalink
net: add netif_is_bridge_master helper
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Aug 27, 2015
1 parent 0e4ead9 commit 0894ae3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0894ae3

Please sign in to comment.