Skip to content

Commit 2f33e7d

Browse files
Mahesh Bandewardavem330
authored andcommitted
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>
1 parent dbfc4fb commit 2f33e7d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/linux/netdevice.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3641,6 +3641,11 @@ static inline bool netif_is_macvlan(struct net_device *dev)
36413641
return dev->priv_flags & IFF_MACVLAN;
36423642
}
36433643

3644+
static inline bool netif_is_macvlan_port(struct net_device *dev)
3645+
{
3646+
return dev->priv_flags & IFF_MACVLAN_PORT;
3647+
}
3648+
36443649
static inline bool netif_is_bond_master(struct net_device *dev)
36453650
{
36463651
return dev->flags & IFF_MASTER && dev->priv_flags & IFF_BONDING;

0 commit comments

Comments
 (0)