All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] bonding: properly unset current_arp_slave on slave link up
@ 2012-04-05 13:47 Veaceslav Falico
  2012-04-05 16:43 ` Jay Vosburgh
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Veaceslav Falico @ 2012-04-05 13:47 UTC (permalink / raw)
  To: netdev; +Cc: Jay Vosburgh, Andy Gospodarek, linux-kernel

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>

---
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);

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] bonding: properly unset current_arp_slave on slave link up
  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
  2012-04-05 18:06 ` Andy Gospodarek
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Jay Vosburgh @ 2012-04-05 16:43 UTC (permalink / raw)
  To: Veaceslav Falico; +Cc: netdev, Andy Gospodarek, linux-kernel

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);
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] bonding: properly unset current_arp_slave on slave link up
  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
@ 2012-04-05 18:06 ` Andy Gospodarek
  2012-04-05 20:22 ` Marcelo Leitner
  2012-04-05 23:08 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Andy Gospodarek @ 2012-04-05 18:06 UTC (permalink / raw)
  To: Veaceslav Falico; +Cc: netdev, Jay Vosburgh, Andy Gospodarek, linux-kernel

On Thu, Apr 05, 2012 at 03:47:43PM +0200, Veaceslav Falico 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: Andy Gospodarek <andy@greyhouse.net>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] bonding: properly unset current_arp_slave on slave link up
  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
  2012-04-05 18:06 ` Andy Gospodarek
@ 2012-04-05 20:22 ` Marcelo Leitner
  2012-04-05 23:08 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Marcelo Leitner @ 2012-04-05 20:22 UTC (permalink / raw)
  To: Veaceslav Falico; +Cc: netdev, Jay Vosburgh, Andy Gospodarek, linux-kernel

On 04/05/2012 10:47 AM, Veaceslav Falico 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: Marcelo Ricardo Leitner <mleitner@redhat.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] bonding: properly unset current_arp_slave on slave link up
  2012-04-05 13:47 [PATCH 1/1] bonding: properly unset current_arp_slave on slave link up Veaceslav Falico
                   ` (2 preceding siblings ...)
  2012-04-05 20:22 ` Marcelo Leitner
@ 2012-04-05 23:08 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2012-04-05 23:08 UTC (permalink / raw)
  To: vfalico; +Cc: netdev, fubar, andy, linux-kernel

From: Veaceslav Falico <vfalico@redhat.com>
Date: Thu, 5 Apr 2012 15:47:43 +0200

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-04-05 23:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2012-04-05 18:06 ` Andy Gospodarek
2012-04-05 20:22 ` Marcelo Leitner
2012-04-05 23:08 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.