提交 2f33e7d5 编写于 作者: M Mahesh Bandewar 提交者: David S. Miller

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: NMahesh Bandewar <maheshb@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 dbfc4fb7
...@@ -3641,6 +3641,11 @@ static inline bool netif_is_macvlan(struct net_device *dev) ...@@ -3641,6 +3641,11 @@ static inline bool netif_is_macvlan(struct net_device *dev)
return dev->priv_flags & IFF_MACVLAN; 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) static inline bool netif_is_bond_master(struct net_device *dev)
{ {
return dev->flags & IFF_MASTER && dev->priv_flags & IFF_BONDING; return dev->flags & IFF_MASTER && dev->priv_flags & IFF_BONDING;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册