From: Mahesh Bandewar <maheshb@google.com>
To: Jay Vosburgh <fubar@us.ibm.com>,
Veaceslav Falico <vfalico@redhat.com>,
Andy Gospodarek <andy@greyhouse.net>,
David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
Mahesh Bandewar <maheshb@google.com>,
Eric Dumazet <edumazet@google.com>,
Maciej Zenczykowski <maze@google.com>
Subject: [PATCH v3 3/5] bonding: Initialize the ALB work queue for lb mode only.
Date: Wed, 2 Apr 2014 00:00:12 -0700 [thread overview]
Message-ID: <1396422012-32022-1-git-send-email-maheshb@google.com> (raw)
micro change to initialize / cancel the ALB work queue only
if the mode selected is ALB or TLB.
Change-Id: I27a6cf65f72819889bf15b68f6ef4fca7d617186
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
---
v2:
Rebase
v3:
Rebase
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 6e96d510bc8d..676db41b98bc 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
next reply other threads:[~2014-04-02 7:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 7:00 Mahesh Bandewar [this message]
2014-04-02 11:03 ` [PATCH v3 3/5] bonding: Initialize the ALB work queue for lb mode only Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1396422012-32022-1-git-send-email-maheshb@google.com \
--to=maheshb@google.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fubar@us.ibm.com \
--cc=maze@google.com \
--cc=netdev@vger.kernel.org \
--cc=vfalico@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).