summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorFlavio Leitner2011-05-25 10:38:58 +0200
committerDavid S. Miller2011-05-25 23:55:33 +0200
commit94265cf5f731c7df29fdfde262ca3e6d51e6828c (patch)
treee19d43a5e8b19a220a4258a5a9f30d63ffc4bf55 /drivers/net/bonding/bond_main.c
parentbonding: prevent deadlock on slave store with alb mode (v3) (diff)
downloadkernel-qcow2-linux-94265cf5f731c7df29fdfde262ca3e6d51e6828c.tar.gz
kernel-qcow2-linux-94265cf5f731c7df29fdfde262ca3e6d51e6828c.tar.xz
kernel-qcow2-linux-94265cf5f731c7df29fdfde262ca3e6d51e6828c.zip
bonding: documentation and code cleanup for resend_igmp
Improves the documentation about how IGMP resend parameter works, fix two missing checks and coding style issues. Signed-off-by: Flavio Leitner <fbl@redhat.com> Acked-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 9ec4a505a79f..6141667c5fb7 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -852,7 +852,7 @@ static void bond_resend_igmp_join_requests(struct bonding *bond)
static void bond_resend_igmp_join_requests_delayed(struct work_struct *work)
{
struct bonding *bond = container_of(work, struct bonding,
- mcast_work.work);
+ mcast_work.work);
bond_resend_igmp_join_requests(bond);
}
@@ -1172,10 +1172,12 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
}
/* resend IGMP joins since active slave has changed or
- * all were sent on curr_active_slave */
- if (((USES_PRIMARY(bond->params.mode) && new_active) ||
- bond->params.mode == BOND_MODE_ROUNDROBIN) &&
- netif_running(bond->dev)) {
+ * all were sent on curr_active_slave.
+ * resend only if bond is brought up with the affected
+ * bonding modes and the retransmission is enabled */
+ if (netif_running(bond->dev) && (bond->params.resend_igmp > 0) &&
+ ((USES_PRIMARY(bond->params.mode) && new_active) ||
+ bond->params.mode == BOND_MODE_ROUNDROBIN)) {
bond->igmp_retrans = bond->params.resend_igmp;
queue_delayed_work(bond->wq, &bond->mcast_work, 0);
}