aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorMahesh Bandewar <maheshb@google.com>2014-12-06 15:53:33 -0800
committerDavid S. Miller <davem@davemloft.net>2014-12-09 16:10:06 -0500
commit5933fea7aa7237ba52d67c069c39ad5c3ab7a036 (patch)
treed3e2a240606e79cc961337001297e8609ecc1220 /include/linux/netdevice.h
parentipvlan: play well with macvlan device (diff)
downloadlinux-dev-5933fea7aa7237ba52d67c069c39ad5c3ab7a036.tar.xz
linux-dev-5933fea7aa7237ba52d67c069c39ad5c3ab7a036.zip
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 '')
-rw-r--r--include/linux/netdevice.h10
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;