Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f33e7d5 authored by Mahesh Bandewar's avatar Mahesh Bandewar Committed by David S. Miller
Browse files

netdevice: Add a function to check macvlan port



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: default avatarMahesh Bandewar <maheshb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dbfc4fb7
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;