netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Vosburgh <fubar@us.ibm.com>
To: Veaceslav Falico <vfalico@redhat.com>
Cc: netdev@vger.kernel.org, Andy Gospodarek <andy@greyhouse.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] bonding: properly unset current_arp_slave on slave link up
Date: Thu, 05 Apr 2012 09:43:22 -0700	[thread overview]
Message-ID: <27159.1333644202@death.nxdomain> (raw)
In-Reply-To: <20120405134743.GB16870@darkmag.usersys.redhat.com>

Veaceslav Falico <vfalico@redhat.com> wrote:

>When a slave comes up, we're unsetting the current_arp_slave without
>removing active flags from it, which can lead to situations where we have
>more than one slave with active flags in active-backup mode.
>
>To avoid this situation we must remove the active flags from a slave before
>removing it as a current_arp_slave.
>
>Signed-off-by: Veaceslav Falico <vfalico@redhat.com>

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>

>---
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index 0c76186..ad731a1 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -3001,7 +3001,11 @@ static void bond_ab_arp_commit(struct bonding *bond, int delta_in_ticks)
> 					   trans_start + delta_in_ticks)) ||
> 			    bond->curr_active_slave != slave) {
> 				slave->link = BOND_LINK_UP;
>-				bond->current_arp_slave = NULL;
>+				if (bond->current_arp_slave) {
>+					bond_set_slave_inactive_flags(
>+						bond->current_arp_slave);
>+					bond->current_arp_slave = NULL;
>+				}
>
> 				pr_info("%s: link status definitely up for interface %s.\n",
> 					bond->dev->name, slave->dev->name);
>

  reply	other threads:[~2012-04-05 16:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-05 13:47 [PATCH 1/1] bonding: properly unset current_arp_slave on slave link up Veaceslav Falico
2012-04-05 16:43 ` Jay Vosburgh [this message]
2012-04-05 18:06 ` Andy Gospodarek
2012-04-05 20:22 ` Marcelo Leitner
2012-04-05 23:08 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=27159.1333644202@death.nxdomain \
    --to=fubar@us.ibm.com \
    --cc=andy@greyhouse.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vfalico@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).