Skip to content

Commit

Permalink
netdevice: Add a function to check macvlan port
Browse files Browse the repository at this point in the history
Similar to a check for macvlan device, netif_is_macvlan(), add
another function to check if a device is used as macvlan port.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Mahesh Bandewar authored and David S. Miller committed Dec 9, 2014
1 parent dbfc4fb commit 2f33e7d
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 @@ -3641,6 +3641,11 @@ static inline bool netif_is_macvlan(struct net_device *dev)
return dev->priv_flags & IFF_MACVLAN;
}

static inline bool netif_is_macvlan_port(struct net_device *dev)
{
return dev->priv_flags & IFF_MACVLAN_PORT;
}

static inline bool netif_is_bond_master(struct net_device *dev)
{
return dev->flags & IFF_MASTER && dev->priv_flags & IFF_BONDING;
Expand Down

0 comments on commit 2f33e7d

Please sign in to comment.