]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
netdevice: Add a function to check macvlan port
authorMahesh Bandewar <maheshb@google.com>
Sat, 6 Dec 2014 23:53:04 +0000 (15:53 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Dec 2014 21:10:06 +0000 (16:10 -0500)
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>
include/linux/netdevice.h

index 29c92ee9ed56d8a23fc0a587a889ebb60e8354b5..1f49aac258f9a9c1d5e11c712236575fbbe46602 100644 (file)
@@ -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;