Skip to content

Commit 7be6183

Browse files
jpirkodavem330
authored andcommitted
net: add netif_is_lag_master helper
Some code does not mind if the master is bond or team and treats them the same, as generic LAG. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f7f019e commit 7be6183

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎include/linux/netdevice.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3902,6 +3902,11 @@ static inline bool netif_is_team_port(struct net_device *dev)
39023902
return dev->priv_flags & IFF_TEAM_PORT;
39033903
}
39043904

3905+
static inline bool netif_is_lag_master(struct net_device *dev)
3906+
{
3907+
return netif_is_bond_master(dev) || netif_is_team_master(dev);
3908+
}
3909+
39053910
/* This device needs to keep skb dst for qdisc enqueue or ndo_start_xmit() */
39063911
static inline void netif_keep_dst(struct net_device *dev)
39073912
{

0 commit comments

Comments
 (0)