History log of /drivers/net/bonding/bond_3ad.h
Revision Date Author Comments
13a8e0c8cdb43982372bd6c65fb26839c8fd8ce9 09-May-2012 Jiri Bohac <jbohac@suse.cz> bonding: don't increase rx_dropped after processing LACPDUs

Since commit 3aba891d, bonding processes LACP frames (802.3ad
mode) with bond_handle_frame(). Currently a copy of the skb is
made and the original is left to be processed by other
rx_handlers and the rest of the network stack by returning
RX_HANDLER_ANOTHER. As there is no protocol handler for
PKT_TYPE_LACPDU, the frame is dropped and dev->rx_dropped
increased.

Fix this by making bond_handle_frame() return RX_HANDLER_CONSUMED
if bonding has processed the LACP frame.

Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
0cc42eb608954c1d68be7ac51af7434e5fc45659 08-Jun-2011 Peter Pan(潘卫平) <panweiping3@gmail.com> bonding: delete unused ad_timer

Now we use agg_select_timer and ad_work.

Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Weiping Pan <panweiping3@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1a14fbcbc96bd098540eb54b66976c20a73b8473 08-Jun-2011 Peter Pan(潘卫平) <panweiping3@gmail.com> bonding:delete agg_select_mode from ad_bond_info

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>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
56d00c677de0a6285587af4f6c6f10aef3209f9f 08-Jun-2011 Peter Pan(潘卫平) <panweiping3@gmail.com> bonding:delete lacp_fast from ad_bond_info

These is also a bug, that if you modify lacp_rate via sysfs,
and add new slaves in bonding, new slaves won't use the latest lacp_rate,
since ad_bond_info->lacp_fast is initialized only once,
in bond_3ad_initialize().

Since both struct bond_params and ad_bond_info have lacp_fast,
they are duplicate and need extra synchronization.

bond_3ad_bind_slave() can use bond_params->lacp_fast to initialize port.
So we can just remove lacp_fast from struct ad_bond_info.

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
ba824a8b2d77942d51ce45ed721f65764c00ab50 08-Jun-2011 Peter Pan(潘卫平) <panweiping3@gmail.com> bonding: make 802.3ad use latest lacp_rate

There is bug that when you modify lacp_rate via sysfs,
802.3ad won't use the new value of lacp_rate to transmit packets.
This is because port->actor_oper_port_state isn't changed.

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
a10e14667635dde504ed9e7ee851494c2cf2ae8e 13-May-2011 Vitalii Demianets <vitas@nppfactor.kiev.ua> bonding,llc: Fix structure sizeof incompatibility for some PDUs

With some combinations of arch/compiler (e.g. arm-linux-gcc) the sizeof
operator on structure returns value greater than expected. In cases when the
structure is used for mapping PDU fields it may lead to unexpected results
(such as holes and alignment problems in skb data). __packed prevents this
undesired behavior.

Signed-off-by: Vitalii Demianets <vitas@nppfactor.kiev.ua>
Signed-off-by: David S. Miller <davem@davemloft.net>
3aba891dde3842d89ad022237b99c1ed308040b0 19-Apr-2011 Jiri Pirko <jpirko@redhat.com> bonding: move processing of recv handlers into handle_frame()

Since now when bonding uses rx_handler, all traffic going into bond
device goes thru bond_handle_frame. So there's no need to go back into
bonding code later via ptype handlers. This patch converts
original ptype handlers into "bonding receive probes". These functions
are called from bond_handle_frame and they are registered per-mode.

Note that vlan packets are also handled because they are always untagged
thanks to vlan_untag()

Note that this also allows arpmon for eth-bond-bridge-vlan topology.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9ac3524a948cab48137a8b40a4fa8ae1092b0a24 03-Mar-2011 Nils Carlson <nils.carlson@ericsson.com> bonding 802.3ad: Rename rx_machine_lock to state_machine_lock

Rename the rx_machine_lock to state_machine_lock as this makes more
sense in light of it now protecting all the state machines against
concurrency.

Signed-off-by: Nils Carlson <nils.carlson@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
ed9b58bc443a1210b5be1ded6421b17e015bf985 09-May-2009 Richard Genoud <richard.genoud@gmail.com> Remove duplicate slow protocol define in bond_3ad.h

ETH_P_SLOW is already defined in include/linux/if_ether.h.
There's no need to define BOND_ETH_P_LACPDU in drivers/net/bonding/bond_3ad.h

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
09640e6365c679b5642b1c41b6d7078f51689ddf 01-Feb-2009 Harvey Harrison <harvey.harrison@gmail.com> net: replace uses of __constant_{endian}

Base versions handle constant folding now.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
e727149e26b08550269a7786fda977aed65578f6 26-Dec-2008 Holger Eitzenberger <holger@eitzenberger.org> 802.3ad: use standard ethhdr instead of ad_header

802.3ad has its own ethhdr-like structure in the form of an ad_header,
which is at the start of both the LACPDU and marker PDU. Both are
the same from the struct values, both are packed as well.

It's therefore perfectly fine to replace the ad_header by the ethhdr
and to remove its definition.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
e4ac43200fd6b8b8de3b487e74e74d3742f70d79 26-Dec-2008 Holger Eitzenberger <holger@eitzenberger.org> 802.3ad: generalize out mac address initializer

Generalize out mac address initializer for the LACPDU multicast
address and use in two places. Remove the now unused
AD_MULTICAST_LACPDU_ADDR.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
87f422f8618c541db0f96194cca9465817f76b89 26-Dec-2008 Holger Eitzenberger <holger@eitzenberger.org> 802.3ad: remove typedef around ad_system

As typedefs are considered a bad thing most of the time remove the
typedef around ad_system.

Signed-off-by: Holger Eitzenberger <heitzenberger@astaro.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1624db7be0d9f77f5494efe1b066d1d44b46c96c 26-Dec-2008 Holger Eitzenberger <holger@eitzenberger.org> 802.3ad: turn ports is_individual into a bool

Turn ports is_individual into a bool. There is no functional change.

Signed-off-by: Holger Eitzenberger <heitzenberger@astaro.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
f48127b6f3270cf7234a7a9f770533332e85e8ae 26-Dec-2008 Holger Eitzenberger <holger@eitzenberger.org> 802.3ad: turn ports is_enabled into a bool

Turn ports is_enabled into a bool. There is no functional change.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
d238d458a70ad134cb421c3ffc66242277f30dda 26-Dec-2008 Holger Eitzenberger <holger@eitzenberger.org> 802.3ad: make ntt bool

Turn Need-To-Transmit port variable into a bool. There is no
functional change.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
1055c9aba3b6850245fe3bbb533d4747e7f904bf 18-Dec-2008 Holger Eitzenberger <holger@eitzenberger.org> bonding: introduce and use port_params structure

It generally helps to handle those values in various places, using it
might make the code more readable and gives room for other improvements.

The IEEE standard talks about them as "parameter values".

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
fd989c83325cb34795bc4d4aa6b13c06f90eac99 05-Nov-2008 Jay Vosburgh <fubar@us.ibm.com> bonding: alternate agg selection policies for 802.3ad

This patch implements alternative aggregator selection policies
for 802.3ad. The existing policy, now termed "stable," selects the active
aggregator by greatest bandwidth, and only reselects a new aggregator
if the active aggregator is entirely disabled (no more ports or all ports
down).

This patch adds two new policies: bandwidth and count, selecting
the active aggregator by total bandwidth (like the stable policy) or by
the number of ports in the aggregator, respectively. These two policies
also differ from the stable policy in that they will reselect the active
aggregator when availability-related changes occur in the bond (e.g.,
link state change).

This permits "gang failover" within 802.3ad, allowing redundant
aggregators along parallel paths to always maintain the "best" aggregator
as the active aggregator (rather than having to wait for the active to
entirely fail).

This patch also updates the driver version to 3.5.0.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
1b76b31693d4a6088dec104ff6a6ead54081a3c2 18-Oct-2007 Jay Vosburgh <fubar@us.ibm.com> Convert bonding timers to workqueues

Convert bonding timers to workqueues. This converts the various
monitor functions to run in periodic work queues instead of timers. This
patch introduces the framework and convers the calls, but does not resolve
various locking issues, and does not stand alone.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
1c3f0b8e07de78a86f2dce911f5e245845ce40a8 19-Oct-2007 Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Change struct marker users

Prior to use struct marker in the linux kernel markers, we need to clean
two drivers which use this structure name.

Change bonding driver types :
- struct marker to struct bond_marker.
- marker_t to bond_marker_t.
- marker_header to bond_marker_header.
- marker_header_t to bond_marker_header_t.

Change qla4xxx struct marker_entry usage :
- Change struct marker_entry for struct qla4_marker_entry.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Chad Tindel <ctindel@users.sourceforge.net>
Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: David Somayajulu <david.somayajulu@qlogic.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
d3bb52b0948cf118131c951c5a34a2d4d0246171 23-Aug-2007 Al Viro <viro@zeniv.linux.org.uk> endianness annotations drivers/net/bonding/

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
ff59c4563a8d1b39597aab4917959146c61f09b0 27-Mar-2006 Jay Vosburgh <fubar@us.ibm.com> [PATCH] bonding: support carrier state for master

Add support for the bonding master to specify its carrier state
based upon the state of the slaves. For 802.3ad, the bond is up if
there is an active, parterned aggregator. For other modes, the bond is
up if any slaves are up. Updates driver version to 3.0.3.

Based on a patch by jamal <hadi@cyberus.ca>.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2e06cb5859fdaeba0529806eb1bf161ffd0db201 28-Nov-2005 Jeff Garzik <jgarzik@pobox.com> [bonding] Remove superfluous changelog.

No need to record this information in source code, its all in the git
repository, and kernel archives.
f2ccd8fa06c8e302116e71df372f5c1f83432e03 10-Aug-2005 David S. Miller <davem@davemloft.net> [NET]: Kill skb->real_dev

Bonding just wants the device before the skb_bond()
decapsulation occurs, so simply pass that original
device into packet_type->func() as an argument.

It remains to be seen whether we can use this same
exact thing to get rid of skb->input_dev as well.

Signed-off-by: David S. Miller <davem@davemloft.net>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!