summaryrefslogtreecommitdiffstats
path: root/include/net/bonding.h
diff options
context:
space:
mode:
authorMaor Gottlieb <maorg@mellanox.com>2020-04-30 21:21:38 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2020-05-01 21:15:38 +0200
commit6b447e76ed44cc354cd0a346b86efe393e603e0d (patch)
tree1f7c9fdbe528fdcfe3816bb90bd7bce243f43fdc /include/net/bonding.h
parentbonding: Add function to get the xmit slave in active-backup mode (diff)
downloadlinux-6b447e76ed44cc354cd0a346b86efe393e603e0d.tar.xz
linux-6b447e76ed44cc354cd0a346b86efe393e603e0d.zip
bonding: Add array of all slaves
Keep all slaves in array so it could be used to get the xmit slave assume all the slaves are active. The logic to add slave to the array is like the usable slaves, except that we also add slaves that currently can't transmit - not up or active. Signed-off-by: Maor Gottlieb <maorg@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Jay Vosburgh <jay.vosburgh@canonical.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'include/net/bonding.h')
-rw-r--r--include/net/bonding.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/bonding.h b/include/net/bonding.h
index 33bdb6d5182d..b5e49bedbc9f 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -200,7 +200,8 @@ struct bonding {
struct slave __rcu *curr_active_slave;
struct slave __rcu *current_arp_slave;
struct slave __rcu *primary_slave;
- struct bond_up_slave __rcu *usable_slaves; /* Array of usable slaves */
+ struct bond_up_slave __rcu *usable_slaves;
+ struct bond_up_slave __rcu *all_slaves;
bool force_primary;
s32 slave_cnt; /* never change this value outside the attach/detach wrappers */
int (*recv_probe)(const struct sk_buff *, struct bonding *,