Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251662
b: refs/heads/master
c: 94265cf
h: refs/heads/master
v: v3
  • Loading branch information
Flavio Leitner authored and David S. Miller committed May 25, 2011
1 parent 9cc6d17 commit af11e46
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9fe0617d9b6d21f700ee9e658e1c9fe3be2fb402
refs/heads/master: 94265cf5f731c7df29fdfde262ca3e6d51e6828c
13 changes: 11 additions & 2 deletions trunk/Documentation/networking/bonding.txt
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,17 @@ resend_igmp
a failover event. One membership report is issued immediately after
the failover, subsequent packets are sent in each 200ms interval.

The valid range is 0 - 255; the default value is 1. This option
was added for bonding version 3.7.0.
The valid range is 0 - 255; the default value is 1. A value of 0
prevents the IGMP membership report from being issued in response
to the failover event.

This option is useful for bonding modes balance-rr (0), active-backup
(1), balance-tlb (5) and balance-alb (6), in which a failover can
switch the IGMP traffic from one slave to another. Therefore a fresh
IGMP report must be issued to cause the switch to forward the incoming
IGMP traffic over the newly selected slave.

This option was added for bonding version 3.7.0.

3. Configuring Bonding Devices
==============================
Expand Down
12 changes: 7 additions & 5 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1533,17 +1533,17 @@ static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR,
* Show and set the number of IGMP membership reports to send on link failure
*/
static ssize_t bonding_show_resend_igmp(struct device *d,
struct device_attribute *attr,
char *buf)
struct device_attribute *attr,
char *buf)
{
struct bonding *bond = to_bond(d);

return sprintf(buf, "%d\n", bond->params.resend_igmp);
}

static ssize_t bonding_store_resend_igmp(struct device *d,
struct device_attribute *attr,
const char *buf, size_t count)
struct device_attribute *attr,
const char *buf, size_t count)
{
int new_value, ret = count;
struct bonding *bond = to_bond(d);
Expand All @@ -1555,7 +1555,7 @@ static ssize_t bonding_store_resend_igmp(struct device *d,
goto out;
}

if (new_value < 0) {
if (new_value < 0 || new_value > 255) {
pr_err("%s: Invalid resend_igmp value %d not in range 0-255; rejected.\n",
bond->dev->name, new_value);
ret = -EINVAL;
Expand Down

0 comments on commit af11e46

Please sign in to comment.