* [PATCH] bonding: fire NETDEV_RELEASE event only on 0 slaves
@ 2013-03-06 17:10 Veaceslav Falico
2013-03-07 3:38 ` Neil Horman
0 siblings, 1 reply; 3+ messages in thread
From: Veaceslav Falico @ 2013-03-06 17:10 UTC (permalink / raw)
To: netdev; +Cc: nhorman, fubar, andy
Currently, if we set up netconsole over bonding and release a slave,
netconsole will stop logging on the whole bonding device. Change the
behavior to stop the netconsole only when the last slave is released.
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
---
drivers/net/bonding/bond_main.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 7bd068a..8b4e96e 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1964,7 +1964,6 @@ static int __bond_release_one(struct net_device *bond_dev,
}
block_netpoll_tx();
- call_netdevice_notifiers(NETDEV_RELEASE, bond_dev);
write_lock_bh(&bond->lock);
slave = bond_get_slave_by_dev(bond, slave_dev);
@@ -2066,8 +2065,10 @@ static int __bond_release_one(struct net_device *bond_dev,
write_unlock_bh(&bond->lock);
unblock_netpoll_tx();
- if (bond->slave_cnt == 0)
+ if (bond->slave_cnt == 0) {
call_netdevice_notifiers(NETDEV_CHANGEADDR, bond->dev);
+ call_netdevice_notifiers(NETDEV_RELEASE, bond->dev);
+ }
bond_compute_features(bond);
if (!(bond_dev->features & NETIF_F_VLAN_CHALLENGED) &&
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] bonding: fire NETDEV_RELEASE event only on 0 slaves
2013-03-06 17:10 [PATCH] bonding: fire NETDEV_RELEASE event only on 0 slaves Veaceslav Falico
@ 2013-03-07 3:38 ` Neil Horman
2013-03-07 21:15 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Neil Horman @ 2013-03-07 3:38 UTC (permalink / raw)
To: Veaceslav Falico; +Cc: netdev, fubar, andy
On Wed, Mar 06, 2013 at 06:10:32PM +0100, Veaceslav Falico wrote:
> Currently, if we set up netconsole over bonding and release a slave,
> netconsole will stop logging on the whole bonding device. Change the
> behavior to stop the netconsole only when the last slave is released.
>
> Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
> ---
> drivers/net/bonding/bond_main.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 7bd068a..8b4e96e 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -1964,7 +1964,6 @@ static int __bond_release_one(struct net_device *bond_dev,
> }
>
> block_netpoll_tx();
> - call_netdevice_notifiers(NETDEV_RELEASE, bond_dev);
> write_lock_bh(&bond->lock);
>
> slave = bond_get_slave_by_dev(bond, slave_dev);
> @@ -2066,8 +2065,10 @@ static int __bond_release_one(struct net_device *bond_dev,
> write_unlock_bh(&bond->lock);
> unblock_netpoll_tx();
>
> - if (bond->slave_cnt == 0)
> + if (bond->slave_cnt == 0) {
> call_netdevice_notifiers(NETDEV_CHANGEADDR, bond->dev);
> + call_netdevice_notifiers(NETDEV_RELEASE, bond->dev);
> + }
>
> bond_compute_features(bond);
> if (!(bond_dev->features & NETIF_F_VLAN_CHALLENGED) &&
> --
> 1.7.1
>
>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bonding: fire NETDEV_RELEASE event only on 0 slaves
2013-03-07 3:38 ` Neil Horman
@ 2013-03-07 21:15 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2013-03-07 21:15 UTC (permalink / raw)
To: nhorman; +Cc: vfalico, netdev, fubar, andy
From: Neil Horman <nhorman@tuxdriver.com>
Date: Wed, 6 Mar 2013 22:38:19 -0500
> On Wed, Mar 06, 2013 at 06:10:32PM +0100, Veaceslav Falico wrote:
>> Currently, if we set up netconsole over bonding and release a slave,
>> netconsole will stop logging on the whole bonding device. Change the
>> behavior to stop the netconsole only when the last slave is released.
>>
>> Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
...
> Acked-by: Neil Horman <nhorman@tuxdriver.com>
Applied, thanks everyone.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-07 21:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-06 17:10 [PATCH] bonding: fire NETDEV_RELEASE event only on 0 slaves Veaceslav Falico
2013-03-07 3:38 ` Neil Horman
2013-03-07 21:15 ` David Miller
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).