]> Pileus Git - ~andy/linux/commitdiff
bonding: fix wrong port enabling in 802.3ad
authorFlavio Leitner <fbl@redhat.com>
Thu, 13 Oct 2011 07:21:23 +0000 (07:21 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Oct 2011 23:24:14 +0000 (19:24 -0400)
The port shouldn't be enabled unless its current MUX
state is DISTRIBUTING which is correctly handled by
ad_mux_machine(), otherwise the packet sent can be
lost because the other end may not be ready.

The issue happens on every port initialization, but
as the ports are expected to move quickly to DISTRIBUTING,
it doesn't cause much problem.  However, it does cause
constant packet loss if the other peer has the port
configured to stay in STANDBY (i.e. SYNC set to OFF).

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_3ad.c

index 47b928ed08f8a065e450b6ecc745ba8691116fdf..b33c099d65a43b518e1c0d6547d680d5bb6fe565 100644 (file)
@@ -1135,13 +1135,6 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port)
                        __record_pdu(lacpdu, port);
                        port->sm_rx_timer_counter = __ad_timer_to_ticks(AD_CURRENT_WHILE_TIMER, (u16)(port->actor_oper_port_state & AD_STATE_LACP_TIMEOUT));
                        port->actor_oper_port_state &= ~AD_STATE_EXPIRED;
-                       // verify that if the aggregator is enabled, the port is enabled too.
-                       //(because if the link goes down for a short time, the 802.3ad will not
-                       // catch it, and the port will continue to be disabled)
-                       if (port->aggregator
-                           && port->aggregator->is_active
-                           && !__port_is_enabled(port))
-                               __enable_port(port);
                        break;
                default:    //to silence the compiler
                        break;