summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2015-12-03 12:12:08 +0100
committerGeorg Veichtlbauer <georg@vware.at>2023-11-02 10:58:52 +0100
commit580956808514afa6de2949f1e916105683b9a9c4 (patch)
tree55f406de380a3d614c4f65d391c8769d9f276ea9 /include/linux
parent7746abf2d00e88b99a783e5c2e95a5a4fd72333a (diff)
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. Change-Id: I97803f67bdaf42a2cbf3eb6adf417c1aeebb5be1 Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netdevice.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 1e4d467eec7a..6b6aa44b6dcb 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3987,6 +3987,11 @@ static inline bool netif_is_team_port(struct net_device *dev)
return dev->priv_flags & IFF_TEAM_PORT;
}
+static inline bool netif_is_lag_master(struct net_device *dev)
+{
+ return netif_is_bond_master(dev) || netif_is_team_master(dev);
+}
+
/* This device needs to keep skb dst for qdisc enqueue or ndo_start_xmit() */
static inline void netif_keep_dst(struct net_device *dev)
{