Skip to content

Commit e0ba141

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

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
@@ -3907,6 +3907,11 @@ static inline bool netif_is_lag_master(struct net_device *dev)
39073907
return netif_is_bond_master(dev) || netif_is_team_master(dev);
39083908
}
39093909

3910+
static inline bool netif_is_lag_port(struct net_device *dev)
3911+
{
3912+
return netif_is_bond_slave(dev) || netif_is_team_port(dev);
3913+
}
3914+
39103915
/* This device needs to keep skb dst for qdisc enqueue or ndo_start_xmit() */
39113916
static inline void netif_keep_dst(struct net_device *dev)
39123917
{

0 commit comments

Comments
 (0)