Re: [PATCH 3/4] bonding: Fix work rearming

2008-01-21 Thread Makito SHIOKAWA
value <= 0)' and reject miimon == 0, instead of PATCH 3/4. (Of course, you won't be able to stop mii monitor only in that case.) Alas I don't understand the reason of this change in bond_main()... Some comment? It was unnecessary any more..., thanks. Signed-off-by: Makito SHI

Re: [PATCH 3/4] bonding: Fix work rearming

2008-01-20 Thread Makito SHIOKAWA
. For now, patch will be like below. Any slight comment for this will be helpful, regards. Signed-off-by: Makito SHIOKAWA <[EMAIL PROTECTED]> --- drivers/net/bonding/bond_main.c | 11 --- drivers/net/bonding/bond_sysfs.c | 19 +-- 2 files changed, 21 insertions(+

Re: [PATCH 3/4] bonding: Fix work rearming

2008-01-18 Thread Makito SHIOKAWA
ork); } - if (bond->dev->flags & IFF_UP) { + if (bond->params.miimon && (bond->dev->flags & IFF_UP)) { /* If the interface is up, we may need to fire off * the MII timer. If

Re: [PATCH 4/4] bonding: Fix some RTNL taking

2008-01-18 Thread Makito SHIOKAWA
Probably the difference is not much, but since this all double locking, unlocking and something between could take a while, and such a check looks cheaper than re-queueing... But I don't persist in this. Looks like this one is settled, thank you for your advice! -- Makito SHIOKAWA MIRACLE

Re: [PATCH 4/4] bonding: Fix some RTNL taking

2008-01-16 Thread Makito SHIOKAWA
ink that won't differ much.) If this if () is really necessary here, then this should be better before "delay = ..." with a block. I agree. -- Makito SHIOKAWA MIRACLE LINUX CORPORATION -- To unsubscribe from this list: send the line "unsubscribe netdev" i

Re: [PATCH 3/4] bonding: Fix work rearming

2008-01-16 Thread Makito SHIOKAWA
t mii monitor. So, this check will be needed to stop rearming mii monitor when value 0 is set to miimon. -- Makito SHIOKAWA MIRACLE LINUX CORPORATION -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordom

Re: [PATCH 1/4] bonding: Fix work initing and cancelling

2008-01-15 Thread Makito SHIOKAWA
&bond->mii_work, 0); - } + queue_delayed_work(bond->wq, &bond->mii_work, 0); } } out: --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h @@ -206,7 +206,8 @@ struct bonding { struct packet_type arp_mon_pt; struct workqueue_struct *wq; struct delayed_work mii_work; - struct delayed_work arp_work; + struct delayed_work ab_arp_work; + struct delayed_work lb_arp_work; struct delayed_work alb_work; struct delayed_work ad_work; }; -- Makito SHIOKAWA MIRACLE LINUX CORPORATION -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 3/4] bonding: Fix work rearming

2008-01-15 Thread Makito SHIOKAWA
> Though message in bonding_store_miimon() says miimon value 1-INT_MAX > rejected, but it looks like 0 can be accepted and monitor must be > stopped in that case. => miimon value *not in range* 1-INT_MAX -- Makito SHIOKAWA MIRACLE LINUX CORPORATION -- To unsubscribe from this list: s

Re: [PATCH 3/4] bonding: Fix work rearming

2008-01-15 Thread Makito SHIOKAWA
be stopped in that case. Change code not to rearm bond_mii_monitor() when value 0 is set for miimon. Signed-off-by: Makito SHIOKAWA <[EMAIL PROTECTED]> --- drivers/net/bonding/bond_main.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/bonding/bond_main.c

[PATCH 4/4] bonding: Fix some RTNL taking

2008-01-14 Thread Makito SHIOKAWA
netdev_run_todo() which takes net_todo_run_mutex, and rtnl_unlock() is called under read_lock in bond_mii_monitor(). So for the same reason as above, change code to call rtnl_unlock() outside of read_lock. Signed-off-by: Makito SHIOKAWA <[EMAIL PROTECTED]> --- drivers/net/bonding/bond_main.c

[PATCH 1/4] bonding: Fix work initing and cancelling

2008-01-14 Thread Makito SHIOKAWA
e all delayed_work_pending(), and move all INIT_DELAYED_WORK to bonding init process, just queue or cancel work. For this purpose, arp_work is divided into two works. Signed-off-by: Makito SHIOKAWA <[EMAIL PROTECTED]> --- drivers/net/bonding/bond_main.c | 46 --

[PATCH 0/4] bonding: Fix workqueue manipulation and lock taking

2008-01-14 Thread Makito SHIOKAWA
These patches fix some workqueue manipulation and lock taking in bonding driver. PATCH 1/4 through PATCH 3/4 are on workqueue manipulation, PATCH 4/4 is on lock taking, and each patch are logically independent. Patches are for latest netdev-2.6 git. -- Makito SHIOKAWA MIRACLE LINUX

[PATCH 2/4] bonding: Add destroy_workqueue() to bond device destroying process

2008-01-14 Thread Makito SHIOKAWA
There is no destroy_workqueue() in bond device destroying process, therefore worker thread will remain even if bond device is destroyed. So add destroy_workqueue(), and also, ensure all works are canceled before destroy_workqueue() is called. Signed-off-by: Makito SHIOKAWA <[EMAIL PROTEC

[PATCH 3/4] bonding: Fix work rearming

2008-01-14 Thread Makito SHIOKAWA
Change code not to rearm bond_mii_monitor() when value 0 is set for miimon. Signed-off-by: Makito SHIOKAWA <[EMAIL PROTECTED]> --- drivers/net/bonding/bond_main.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/b