* [net-next] bond: output message before setting slave to inactive
@ 2016-03-29 6:32 Zhang Shengju
2016-03-30 19:37 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Zhang Shengju @ 2016-03-29 6:32 UTC (permalink / raw)
To: j.vosburgh, vfalico, gospo; +Cc: netdev
This patch moves output message before setting slave to inactive, this will
print the correct status of slave device.
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
---
drivers/net/bonding/bond_main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 941ec99..97fad05 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1830,6 +1830,10 @@ static int __bond_release_one(struct net_device *bond_dev,
return -EINVAL;
}
+ netdev_info(bond_dev, "Releasing %s interface %s\n",
+ bond_is_active_slave(slave) ? "active" : "backup",
+ slave_dev->name);
+
bond_set_slave_inactive_flags(slave, BOND_SLAVE_NOTIFY_NOW);
bond_sysfs_slave_del(slave);
@@ -1849,10 +1853,6 @@ static int __bond_release_one(struct net_device *bond_dev,
if (bond_mode_uses_xmit_hash(bond))
bond_update_slave_arr(bond, slave);
- netdev_info(bond_dev, "Releasing %s interface %s\n",
- bond_is_active_slave(slave) ? "active" : "backup",
- slave_dev->name);
-
oldcurrent = rcu_access_pointer(bond->curr_active_slave);
RCU_INIT_POINTER(bond->current_arp_slave, NULL);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [net-next] bond: output message before setting slave to inactive
2016-03-29 6:32 [net-next] bond: output message before setting slave to inactive Zhang Shengju
@ 2016-03-30 19:37 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2016-03-30 19:37 UTC (permalink / raw)
To: zhangshengju; +Cc: j.vosburgh, vfalico, gospo, netdev
From: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Date: Tue, 29 Mar 2016 06:32:57 +0000
> This patch moves output message before setting slave to inactive, this will
> print the correct status of slave device.
>
> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
I think the message is in the appropriate spot wrt. state, so I will not
apply this, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [net-next] bond: output message before setting slave to inactive
@ 2016-03-31 1:23 张胜举
0 siblings, 0 replies; 3+ messages in thread
From: 张胜举 @ 2016-03-31 1:23 UTC (permalink / raw)
To: 'David Miller'; +Cc: j.vosburgh, vfalico, gospo, netdev
> From: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
> Date: Tue, 29 Mar 2016 06:32:57 +0000
>
> > This patch moves output message before setting slave to inactive, this
> > will print the correct status of slave device.
> >
> > Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
>
> I think the message is in the appropriate spot wrt. state, so I will not
apply
> this, thanks.
The message will always print 'backup', since the code set it to inactive
before this output.
I think this will cause a little confused, because even when I detach an
active slave, the output is always 'backup'.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-31 1:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-29 6:32 [net-next] bond: output message before setting slave to inactive Zhang Shengju
2016-03-30 19:37 ` David Miller
2016-03-31 1:23 张胜举
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.