Re: [PATCH 5/5] bonding: Add tlb_dynamic_lb module parameter
From: Veaceslav Falico <hidden>
Date: 2014-03-31 16:35:19
On Fri, Mar 28, 2014 at 10:29:09PM -0700, Mahesh Bandewar wrote: ...snip...
quoted hunk ↗ jump to hunk
@@ -3046,7 +3050,7 @@ static void bond_work_init_all(struct bonding *bond){ INIT_DELAYED_WORK(&bond->mcast_work, bond_resend_igmp_join_requests_delayed); - if (bond_is_lb(bond)) + if (bond_is_lb(bond) && bond->params.tlb_dynamic_lb) 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)@@ -3060,7 +3064,7 @@ static void bond_work_cancel_all(struct bonding *bond){ cancel_delayed_work_sync(&bond->mii_work); cancel_delayed_work_sync(&bond->arp_work); - if (bond_is_lb(bond)) + if (bond_is_lb(bond) && bond->params.tlb_dynamic_lb) cancel_delayed_work_sync(&bond->alb_work); cancel_delayed_work_sync(&bond->ad_work); cancel_delayed_work_sync(&bond->mcast_work);@@ -3098,7 +3102,8 @@ static int bond_open(struct net_device *bond_dev)*/ if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) return -ENOMEM; - queue_delayed_work(bond->wq, &bond->alb_work, 0); + if (bond->params.tlb_dynamic_lb) + queue_delayed_work(bond->wq, &bond->alb_work, 0);
So what happens if tlb_dynamic_lb is changed on the flight, via sysfs? Seems like the delayed_work is handled only on bond_setup/open, and changing the tlb_dynamic_lb via sysfs won't re-enable it.