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>
This commit is contained in:
committed by
David S. Miller
parent
764e433b3c
commit
5933fea7aa
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user