summaryrefslogtreecommitdiffstats
path: root/kernel/include/net/bonding.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/include/net/bonding.h')
-rw-r--r--kernel/include/net/bonding.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/include/net/bonding.h b/kernel/include/net/bonding.h
index 78ed135e9..c1740a279 100644
--- a/kernel/include/net/bonding.h
+++ b/kernel/include/net/bonding.h
@@ -136,6 +136,9 @@ struct bond_params {
int packets_per_slave;
int tlb_dynamic_lb;
struct reciprocal_value reciprocal_packets_per_slave;
+ u16 ad_actor_sys_prio;
+ u16 ad_user_port_key;
+ u8 ad_actor_system[ETH_ALEN];
};
struct bond_parm_tbl {
@@ -307,6 +310,13 @@ static inline bool bond_uses_primary(struct bonding *bond)
return bond_mode_uses_primary(BOND_MODE(bond));
}
+static inline struct net_device *bond_option_active_slave_get_rcu(struct bonding *bond)
+{
+ struct slave *slave = rcu_dereference(bond->curr_active_slave);
+
+ return bond_uses_primary(bond) && slave ? slave->dev : NULL;
+}
+
static inline bool bond_slave_is_up(struct slave *slave)
{
return netif_running(slave->dev) && netif_carrier_ok(slave->dev);