bonding: fix 802.3ad standards compliance error
authorJay Vosburgh <fubar@us.ibm.com>
Fri, 13 Nov 2009 13:13:01 +0000 (13:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Nov 2009 06:21:34 +0000 (22:21 -0800)
commit2d6682db114cb53bc94991659478756302e6a600
tree7854ccf1c9b0098fa84c444c07d88a360d662aa8
parentb93ab837a2d3eb394082c9eae4ee0a4f83060027
bonding: fix 802.3ad standards compliance error

The language of 802.3ad 43.4.9 requires the "recordPDU" function
to, in part, compare the Partner parameter values in a received LACPDU
to the stored Actor values.  If those match, then the Partner's
synchronization state is set to true.

The current 802.3ad implementation is performing these steps out
of order; first, the synchronization check is done, then the paramters are
checked to see if they match (the synch check being done against a match
check of a prior LACPDU).  This causes delays in establishing aggregators
in some circumstances.

This patch modifies the 802.3ad code to call __choose_matched,
the function that does the "match" comparisions, as the first step of
__record_pdu, instead of immediately afterwards.  This new behavior is
in compliance with the language of the standard.

Some additional commentary relating to code vs. standard is also
added.

Reported by Martin Patterson <martin@gear6.com> who also supplied
the logic of the fix and verified the patch.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_3ad.c