From: Holger Eitzenberger <holger@eitzenberger.org>
To: Jay Vosburgh <fubar@us.ibm.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [patch 1/9] bonding: improve elaborate port_state assignment
Date: Wed, 17 Dec 2008 22:28:28 +0100 [thread overview]
Message-ID: <20081217213007.374131068@jonathan.eitzenberger.org> (raw)
In-Reply-To: 20081217212827.080073908@jonathan.eitzenberger.org
[-- Attachment #1: bonding-3ad-improve-partner-assignment.diff --]
[-- Type: text/plain, Size: 1517 bytes --]
The previous code was just a funny way of assigning both values (they
are both of type u8).
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Index: bonding-2.6/drivers/net/bonding/bond_3ad.c
===================================================================
--- bonding-2.6.orig/drivers/net/bonding/bond_3ad.c
+++ bonding-2.6/drivers/net/bonding/bond_3ad.c
@@ -491,16 +491,7 @@ static void __record_pdu(struct lacpdu *
port->partner_oper_system = lacpdu->actor_system;
port->partner_oper_system_priority = ntohs(lacpdu->actor_system_priority);
port->partner_oper_key = ntohs(lacpdu->actor_key);
- // zero partener's lase states
- port->partner_oper_port_state = 0;
- port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_LACP_ACTIVITY);
- port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_LACP_TIMEOUT);
- port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_AGGREGATION);
- port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_SYNCHRONIZATION);
- port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_COLLECTING);
- port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_DISTRIBUTING);
- port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_DEFAULTED);
- port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_EXPIRED);
+ port->partner_oper_port_state = lacpdu->actor_state;
// set actor_oper_port_state.defaulted to FALSE
port->actor_oper_port_state &= ~AD_STATE_DEFAULTED;
--
next prev parent reply other threads:[~2008-12-17 21:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-17 21:28 [patch 0/9] [RFC] bonding updates for net-next-2.6 Holger Eitzenberger
2008-12-17 21:28 ` Holger Eitzenberger [this message]
2008-12-17 21:28 ` [patch 2/9] bonding: introduce and use port_params structure Holger Eitzenberger
2008-12-17 21:28 ` [patch 3/9] bonding: use port_params in __record_pdu() Holger Eitzenberger
2008-12-17 21:28 ` [patch 4/9] bonding: use plain memcpy in __record_default() Holger Eitzenberger
2008-12-17 21:28 ` [patch 5/9] bonding: init port_params from template Holger Eitzenberger
2008-12-17 21:28 ` [patch 6/9] bonding: remove various function declarations Holger Eitzenberger
2008-12-17 21:28 ` [patch 7/9] bonding: use port_params in __update_selected() Holger Eitzenberger
2008-12-17 21:28 ` [patch 8/9] bonding: use port_params in __update_default_selected() Holger Eitzenberger
2008-12-17 21:28 ` [patch 9/9] bonding: use port_params in __update_lacpdu_from_port Holger Eitzenberger
2008-12-18 3:14 ` [patch 0/9] [RFC] bonding updates for net-next-2.6 David Miller
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=20081217213007.374131068@jonathan.eitzenberger.org \
--to=holger@eitzenberger.org \
--cc=davem@davemloft.net \
--cc=fubar@us.ibm.com \
--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;
as well as URLs for NNTP newsgroup(s).