mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Weiping Pan <panweiping3@gmail.com>
To: fubar@us.ibm.com, andy@greyhouse.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Weiping Pan <panweiping3@gmail.com>
Subject: [PATCH net-next 3/5] bonding:delete agg_select_mode from ad_bond_info
Date: Thu,  9 Jun 2011 15:03:29 +0800	[thread overview]
Message-ID: <61b3301f160012b2568e9801325d09787c8dff4c.1307601948.git.panweiping3@gmail.com> (raw)
In-Reply-To: <cover.1307601948.git.panweiping3@gmail.com>
In-Reply-To: <cover.1307601948.git.panweiping3@gmail.com>

bond_params->ad_select and ad_bond_info->agg_select_mode have the same
meaning, they are duplicate and need extra synchronization.

__get_agg_selection_mode() get ad_select from bond_params directly.

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
---
 drivers/net/bonding/bond_3ad.c |    3 +--
 drivers/net/bonding/bond_3ad.h |    1 -
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 013a801..6122725 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -262,7 +262,7 @@ static inline u32 __get_agg_selection_mode(struct port *port)
 	if (bond == NULL)
 		return BOND_AD_STABLE;
 
-	return BOND_AD_INFO(bond).agg_select_mode;
+	return bond->params.ad_select;
 }
 
 /**
@@ -1859,7 +1859,6 @@ static void ad_marker_response_received(struct bond_marker *marker,
 void bond_3ad_initiate_agg_selection(struct bonding *bond, int timeout)
 {
 	BOND_AD_INFO(bond).agg_select_timer = timeout;
-	BOND_AD_INFO(bond).agg_select_mode = bond->params.ad_select;
 }
 
 static u16 aggregator_identifier;
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index 9782785..1682e69 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -253,7 +253,6 @@ struct ad_system {
 struct ad_bond_info {
 	struct ad_system system;	    /* 802.3ad system structure */
 	u32 agg_select_timer;	    // Timer to select aggregator after all adapter's hand shakes
-	u32 agg_select_mode;	    // Mode of selection of active aggregator(bandwidth/count)
 	struct timer_list ad_timer;
 };
 
-- 
1.7.4.4


  parent reply	other threads:[~2011-06-09  7:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09  7:03 [PATCH v4 net-next 0/5] bonding:use latest lacp_rate and ad_select, Weiping Pan
2011-06-09  7:03 ` [PATCH net-next 1/5] bonding: make 802.3ad use latest lacp_rate Weiping Pan
2011-06-09  7:03 ` [PATCH net-next 2/5] bonding:delete lacp_fast from ad_bond_info Weiping Pan
2011-06-09  7:03 ` Weiping Pan [this message]
2011-06-09  7:03 ` [PATCH net-next 4/5] bonding: delete unused ad_timer Weiping Pan
2011-06-09  7:03 ` [PATCH net-next 5/5] bonding: delete unused arp_mon_pt Weiping Pan
2011-06-09  7:13 ` [PATCH v4 net-next 0/5] bonding:use latest lacp_rate and ad_select, WeipingPan
2011-06-09  7:19 [PATCH v4 net-next 0/5] bonding:use latest lacp_rate and ad_select and delete unused ad_timer and arp_mon_pt Weiping Pan
2011-06-09  7:19 ` [PATCH net-next 3/5] bonding:delete agg_select_mode from ad_bond_info Weiping Pan

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=61b3301f160012b2568e9801325d09787c8dff4c.1307601948.git.panweiping3@gmail.com \
    --to=panweiping3@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=fubar@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®