diff options
author | Mahesh Bandewar <maheshb@google.com> | 2014-12-06 15:53:33 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-09 16:10:06 -0500 |
commit | 5933fea7aa7237ba52d67c069c39ad5c3ab7a036 (patch) | |
tree | d3e2a240606e79cc961337001297e8609ecc1220 /include/linux/netdevice.h | |
parent | 764e433b3c43d47e2d19e4bd32fec093421b9cff (diff) |
ipvlan: move the device check function into netdevice.h
Move the port check [ipvlan_dev_master()] and device check
[ipvlan_dev_slave()] functions to netdevice.h and rename them
netif_is_ipvlan_port() and netif_is_ipvlan() resp. to be
consistent with macvlan api naming.
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 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 1f49aac258f9..c31f74d76ebd 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3646,6 +3646,16 @@ static inline bool netif_is_macvlan_port(struct net_device *dev) return dev->priv_flags & IFF_MACVLAN_PORT; } +static inline bool netif_is_ipvlan(struct net_device *dev) +{ + return dev->priv_flags & IFF_IPVLAN_SLAVE; +} + +static inline bool netif_is_ipvlan_port(struct net_device *dev) +{ + return dev->priv_flags & IFF_IPVLAN_MASTER; +} + static inline bool netif_is_bond_master(struct net_device *dev) { return dev->flags & IFF_MASTER && dev->priv_flags & IFF_BONDING; |