* [PATCH 3/5] bonding: Initialize the ALB work queue for lb mode only.
@ 2014-03-29 5:29 Mahesh Bandewar
2014-03-31 15:49 ` Eric Dumazet
0 siblings, 1 reply; 5+ messages in thread
From: Mahesh Bandewar @ 2014-03-29 5:29 UTC (permalink / raw)
To: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek, David Miller
Cc: netdev, Mahesh Bandewar, Eric Dumazet, Maciej Zenczykowski
micro change to initialize / cancel the ALB work queue only
if the mode selected is ALB or TLB.
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
---
drivers/net/bonding/bond_main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 06024abcffcf..e4f062ddc23e 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3046,7 +3046,8 @@ static void bond_work_init_all(struct bonding *bond)
{
INIT_DELAYED_WORK(&bond->mcast_work,
bond_resend_igmp_join_requests_delayed);
- INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor);
+ if (bond_is_lb(bond))
+ INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor);
INIT_DELAYED_WORK(&bond->mii_work, bond_mii_monitor);
if (bond->params.mode == BOND_MODE_ACTIVEBACKUP)
INIT_DELAYED_WORK(&bond->arp_work, bond_activebackup_arp_mon);
@@ -3059,7 +3060,8 @@ static void bond_work_cancel_all(struct bonding *bond)
{
cancel_delayed_work_sync(&bond->mii_work);
cancel_delayed_work_sync(&bond->arp_work);
- cancel_delayed_work_sync(&bond->alb_work);
+ if (bond_is_lb(bond))
+ cancel_delayed_work_sync(&bond->alb_work);
cancel_delayed_work_sync(&bond->ad_work);
cancel_delayed_work_sync(&bond->mcast_work);
}
--
1.9.1.423.g4596e3a
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 3/5] bonding: Initialize the ALB work queue for lb mode only.
2014-03-29 5:29 [PATCH 3/5] bonding: Initialize the ALB work queue for lb mode only Mahesh Bandewar
@ 2014-03-31 15:49 ` Eric Dumazet
2014-03-31 16:27 ` Jay Vosburgh
0 siblings, 1 reply; 5+ messages in thread
From: Eric Dumazet @ 2014-03-31 15:49 UTC (permalink / raw)
To: Mahesh Bandewar
Cc: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek, David Miller,
netdev, Eric Dumazet, Maciej Zenczykowski
On Fri, 2014-03-28 at 22:29 -0700, Mahesh Bandewar wrote:
> micro change to initialize / cancel the ALB work queue only
> if the mode selected is ALB or TLB.
>
> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
> ---
Can the mode of a bonding device be dynamically changed ?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/5] bonding: Initialize the ALB work queue for lb mode only.
2014-03-31 15:49 ` Eric Dumazet
@ 2014-03-31 16:27 ` Jay Vosburgh
2014-03-31 16:40 ` Eric Dumazet
0 siblings, 1 reply; 5+ messages in thread
From: Jay Vosburgh @ 2014-03-31 16:27 UTC (permalink / raw)
To: Eric Dumazet
Cc: Mahesh Bandewar, Veaceslav Falico, Andy Gospodarek, David Miller,
netdev, Eric Dumazet, Maciej Zenczykowski
Eric Dumazet <eric.dumazet@gmail.com> wrote:
>On Fri, 2014-03-28 at 22:29 -0700, Mahesh Bandewar wrote:
>> micro change to initialize / cancel the ALB work queue only
>> if the mode selected is ALB or TLB.
>>
>> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
>> ---
>
>Can the mode of a bonding device be dynamically changed ?
No. The mode can only be changed when there are no slaves in
the bond, and the bond is administratively down.
-J
---
-Jay Vosburgh, j.vosburgh@gmail.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/5] bonding: Initialize the ALB work queue for lb mode only.
2014-03-31 16:27 ` Jay Vosburgh
@ 2014-03-31 16:40 ` Eric Dumazet
2014-03-31 22:00 ` Mahesh Bandewar
0 siblings, 1 reply; 5+ messages in thread
From: Eric Dumazet @ 2014-03-31 16:40 UTC (permalink / raw)
To: Jay Vosburgh
Cc: Mahesh Bandewar, Veaceslav Falico, Andy Gospodarek, David Miller,
netdev, Eric Dumazet, Maciej Zenczykowski
On Mon, 2014-03-31 at 09:27 -0700, Jay Vosburgh wrote:
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> >On Fri, 2014-03-28 at 22:29 -0700, Mahesh Bandewar wrote:
> >> micro change to initialize / cancel the ALB work queue only
> >> if the mode selected is ALB or TLB.
> >>
> >> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
> >> ---
> >
> >Can the mode of a bonding device be dynamically changed ?
>
> No. The mode can only be changed when there are no slaves in
> the bond, and the bond is administratively down.
I don't see why this patch is needed.
What about mii_work, arp_work ?
There is no cost calling INIT_DELAYED_WORK(&bond->alb_work,
bond_alb_monitor) and cancel_delayed_work_sync(&bond->alb_work)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/5] bonding: Initialize the ALB work queue for lb mode only.
2014-03-31 16:40 ` Eric Dumazet
@ 2014-03-31 22:00 ` Mahesh Bandewar
0 siblings, 0 replies; 5+ messages in thread
From: Mahesh Bandewar @ 2014-03-31 22:00 UTC (permalink / raw)
To: Eric Dumazet
Cc: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek, David Miller,
netdev, Eric Dumazet, Maciej Zenczykowski
On Mon, Mar 31, 2014 at 9:40 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Mon, 2014-03-31 at 09:27 -0700, Jay Vosburgh wrote:
>> Eric Dumazet <eric.dumazet@gmail.com> wrote:
>>
>> >On Fri, 2014-03-28 at 22:29 -0700, Mahesh Bandewar wrote:
>> >> micro change to initialize / cancel the ALB work queue only
>> >> if the mode selected is ALB or TLB.
>> >>
>> >> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
>> >> ---
>> >
>> >Can the mode of a bonding device be dynamically changed ?
>>
>> No. The mode can only be changed when there are no slaves in
>> the bond, and the bond is administratively down.
>
> I don't see why this patch is needed.
>
> What about mii_work, arp_work ?
>
I was focusing on the lb mode only at this time.
> There is no cost calling INIT_DELAYED_WORK(&bond->alb_work,
> bond_alb_monitor) and cancel_delayed_work_sync(&bond->alb_work)
>
Why even bother initialize if we know *for sure* we are not going to
use it. In subsequent patch though the work queue may or may not be
needed based on the tlb_dynamic_mode selected. That's when I though we
should *only* enabled it in the mode that is relevant.
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-31 22:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-29 5:29 [PATCH 3/5] bonding: Initialize the ALB work queue for lb mode only Mahesh Bandewar
2014-03-31 15:49 ` Eric Dumazet
2014-03-31 16:27 ` Jay Vosburgh
2014-03-31 16:40 ` Eric Dumazet
2014-03-31 22:00 ` Mahesh Bandewar
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).