netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH][Bonding]: keep slave state when admin down
@ 2006-07-20 13:19 jamal
  2006-07-20 18:50 ` Jay Vosburgh
  0 siblings, 1 reply; 4+ messages in thread
From: jamal @ 2006-07-20 13:19 UTC (permalink / raw)
  To: Jay Vosburgh; +Cc: netdev, bonding-devel

[-- Attachment #1: Type: text/plain, Size: 587 bytes --]


When a bonding netdevice is admin-ed down it looses the slaves
attributes (set via ifenslave). This is not consistent with other
behavior of netdevices (example a qdisc attached to a netdevice doesnt
disappear or an attached IP address etc).
The included patch fixes this. Ive tested by ifenslaving, downing the
bond, checking /proc and making sure it still has the slaves, up-ing the
bond and making sure things continue to work.

Jay/Bonding folks if you are ok with it, just ACK it or include it in
your tree etc. Otherwise we can discuss. This is against linus tree.

cheers,
jamal

[-- Attachment #2: bond_p2 --]
[-- Type: text/x-patch, Size: 941 bytes --]

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 8b95123..df319be 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3420,7 +3420,6 @@ static int bond_close(struct net_device 
 
 	write_lock_bh(&bond->lock);
 
-	bond_mc_list_destroy(bond);
 
 	/* signal timers not to re-arm */
 	bond->kill_timers = 1;
@@ -3451,8 +3450,6 @@ static int bond_close(struct net_device 
 		break;
 	}
 
-	/* Release the bonded slaves */
-	bond_release_all(bond_dev);
 
 	if ((bond->params.mode == BOND_MODE_TLB) ||
 	    (bond->params.mode == BOND_MODE_ALB)) {
@@ -4237,6 +4234,9 @@ static void bond_free_all(void)
 	list_for_each_entry_safe(bond, nxt, &bond_dev_list, bond_list) {
 		struct net_device *bond_dev = bond->dev;
 
+		bond_mc_list_destroy(bond);
+		/* Release the bonded slaves */
+		bond_release_all(bond_dev);
 		unregister_netdevice(bond_dev);
 		bond_deinit(bond_dev);
 	}

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

* Re: [RFC/PATCH][Bonding]: keep slave state when admin down
  2006-07-20 13:19 [RFC/PATCH][Bonding]: keep slave state when admin down jamal
@ 2006-07-20 18:50 ` Jay Vosburgh
  2006-07-20 20:22   ` jamal
  0 siblings, 1 reply; 4+ messages in thread
From: Jay Vosburgh @ 2006-07-20 18:50 UTC (permalink / raw)
  To: hadi; +Cc: netdev, bonding-devel

jamal <hadi@cyberus.ca> wrote:

>When a bonding netdevice is admin-ed down it looses the slaves
>attributes (set via ifenslave). This is not consistent with other
>behavior of netdevices (example a qdisc attached to a netdevice doesnt
>disappear or an attached IP address etc).
>The included patch fixes this. Ive tested by ifenslaving, downing the
>bond, checking /proc and making sure it still has the slaves, up-ing the
>bond and making sure things continue to work.

	Do the initscript and sysconfig packages (/sbin/ifup, ifdown,
that stuff in /etc/sysconfig/network-scripts, etc) do the right thing
with this change?

	If memory serves, the initscripts will down the bond during
setup; I'm not sure if there is any dependency on that action releasing
all (possibly preexisting) slaves.

	I don't have a big problem with this, but I'm a little concerned
that there may be dependencies on the existing behavior.

	-J

---
	-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com

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

* Re: [RFC/PATCH][Bonding]: keep slave state when admin down
  2006-07-20 18:50 ` Jay Vosburgh
@ 2006-07-20 20:22   ` jamal
  2006-08-03 12:25     ` jamal
  0 siblings, 1 reply; 4+ messages in thread
From: jamal @ 2006-07-20 20:22 UTC (permalink / raw)
  To: Jay Vosburgh; +Cc: bonding-devel, netdev

On Thu, 2006-20-07 at 11:50 -0700, Jay Vosburgh wrote:

> 
> 	Do the initscript and sysconfig packages (/sbin/ifup, ifdown,
> that stuff in /etc/sysconfig/network-scripts, etc) do the right thing
> with this change?
> 

I havent seen issues so far.

> 	If memory serves, the initscripts will down the bond during
> setup; I'm not sure if there is any dependency on that action releasing
> all (possibly preexisting) slaves.
> 

The one i have experimented with has no issues - but you may be right
some people depend on this behavior at shutdown.

> 	I don't have a big problem with this, but I'm a little concerned
> that there may be dependencies on the existing behavior.

I could add a module parameter that restores old behavior when asked to
and we keep that for a while and have it print a warning message.
The other alternative is just release it and see if someone complains.

cheers,
jamal


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

* Re: [RFC/PATCH][Bonding]: keep slave state when admin down
  2006-07-20 20:22   ` jamal
@ 2006-08-03 12:25     ` jamal
  0 siblings, 0 replies; 4+ messages in thread
From: jamal @ 2006-08-03 12:25 UTC (permalink / raw)
  To: Jay Vosburgh; +Cc: netdev, bonding-devel

Jay,

I have tested with a standard bootup script - which amongst other things
brings down the bond and gives it a new MAC before bringing it up.

What do you wanna do with the patch? I know if it sits with me it will
be lost. 

cheers,
jamal

On Thu, 2006-20-07 at 16:22 -0400, jamal wrote:
> On Thu, 2006-20-07 at 11:50 -0700, Jay Vosburgh wrote:
> 
> > 
> > 	Do the initscript and sysconfig packages (/sbin/ifup, ifdown,
> > that stuff in /etc/sysconfig/network-scripts, etc) do the right thing
> > with this change?
> > 
> 
> I havent seen issues so far.
> 
> > 	If memory serves, the initscripts will down the bond during
> > setup; I'm not sure if there is any dependency on that action releasing
> > all (possibly preexisting) slaves.
> > 
> 
> The one i have experimented with has no issues - but you may be right
> some people depend on this behavior at shutdown.
> 
> > 	I don't have a big problem with this, but I'm a little concerned
> > that there may be dependencies on the existing behavior.
> 
> I could add a module parameter that restores old behavior when asked to
> and we keep that for a while and have it print a warning message.
> The other alternative is just release it and see if someone complains.
> 
> cheers,
> jamal


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

end of thread, other threads:[~2006-08-03 12:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-20 13:19 [RFC/PATCH][Bonding]: keep slave state when admin down jamal
2006-07-20 18:50 ` Jay Vosburgh
2006-07-20 20:22   ` jamal
2006-08-03 12:25     ` jamal

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