diff options
author | Mahesh Bandewar <maheshb@google.com> | 2014-12-06 18:53:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-09 16:10:06 -0500 |
commit | 2f33e7d59cb09d9b20d6648086b314f0ba61fb03 (patch) | |
tree | c1fe6ccbe35cf04b8c77bea967c293edc349a5d6 /include/linux/netdevice.h | |
parent | dbfc4fb7d578d4f224faa6b60deb40804dfdc1b1 (diff) |
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: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 29c92ee9ed56..1f49aac258f9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -3641,6 +3641,11 @@ static inline bool netif_is_macvlan(struct net_device *dev) | |||
3641 | return dev->priv_flags & IFF_MACVLAN; | 3641 | return dev->priv_flags & IFF_MACVLAN; |
3642 | } | 3642 | } |
3643 | 3643 | ||
3644 | static inline bool netif_is_macvlan_port(struct net_device *dev) | ||
3645 | { | ||
3646 | return dev->priv_flags & IFF_MACVLAN_PORT; | ||
3647 | } | ||
3648 | |||
3644 | static inline bool netif_is_bond_master(struct net_device *dev) | 3649 | static inline bool netif_is_bond_master(struct net_device *dev) |
3645 | { | 3650 | { |
3646 | return dev->flags & IFF_MASTER && dev->priv_flags & IFF_BONDING; | 3651 | return dev->flags & IFF_MASTER && dev->priv_flags & IFF_BONDING; |