aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_3ad.c
diff options
context:
space:
mode:
authorVeaceslav Falico <vfalico@redhat.com>2013-09-25 03:20:14 -0400
committerDavid S. Miller <davem@davemloft.net>2013-09-26 16:02:05 -0400
commit9caff1e7b761c28018bf1858f6661439b4055f51 (patch)
treef68f67537234e09d2b7a033573de4649c92865af /drivers/net/bonding/bond_3ad.c
parent81f23b13ac985e9a3cfb889c690695a8932e02c2 (diff)
bonding: make bond_for_each_slave() use lower neighbour's private
It needs a list_head *iter, so add it wherever needed. Use both non-rcu and rcu variants. CC: Jay Vosburgh <fubar@us.ibm.com> CC: Andy Gospodarek <andy@greyhouse.net> CC: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r--drivers/net/bonding/bond_3ad.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 0d8f427ade93..3847aee34968 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2419,6 +2419,7 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
2419{ 2419{
2420 struct slave *slave, *start_at; 2420 struct slave *slave, *start_at;
2421 struct bonding *bond = netdev_priv(dev); 2421 struct bonding *bond = netdev_priv(dev);
2422 struct list_head *iter;
2422 int slave_agg_no; 2423 int slave_agg_no;
2423 int slaves_in_agg; 2424 int slaves_in_agg;
2424 int agg_id; 2425 int agg_id;
@@ -2444,7 +2445,7 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
2444 2445
2445 slave_agg_no = bond->xmit_hash_policy(skb, slaves_in_agg); 2446 slave_agg_no = bond->xmit_hash_policy(skb, slaves_in_agg);
2446 2447
2447 bond_for_each_slave(bond, slave) { 2448 bond_for_each_slave(bond, slave, iter) {
2448 struct aggregator *agg = SLAVE_AD_INFO(slave).port.aggregator; 2449 struct aggregator *agg = SLAVE_AD_INFO(slave).port.aggregator;
2449 2450
2450 if (agg && (agg->aggregator_identifier == agg_id)) { 2451 if (agg && (agg->aggregator_identifier == agg_id)) {
@@ -2515,11 +2516,12 @@ int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond,
2515void bond_3ad_update_lacp_rate(struct bonding *bond) 2516void bond_3ad_update_lacp_rate(struct bonding *bond)
2516{ 2517{
2517 struct port *port = NULL; 2518 struct port *port = NULL;
2519 struct list_head *iter;
2518 struct slave *slave; 2520 struct slave *slave;
2519 int lacp_fast; 2521 int lacp_fast;
2520 2522
2521 lacp_fast = bond->params.lacp_fast; 2523 lacp_fast = bond->params.lacp_fast;
2522 bond_for_each_slave(bond, slave) { 2524 bond_for_each_slave(bond, slave, iter) {
2523 port = &(SLAVE_AD_INFO(slave).port); 2525 port = &(SLAVE_AD_INFO(slave).port);
2524 __get_state_machine_lock(port); 2526 __get_state_machine_lock(port);
2525 if (lacp_fast) 2527 if (lacp_fast)