aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSatish Ashok <sashok@cumulusnetworks.com>2015-01-26 01:17:00 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-27 20:09:04 -0500
commit2f6373245a09e2a34f36df7d982f783291ec8fce (patch)
treeb57fc65073c189e8b310d4352a7293e435b0a6ff
parent63b46242f707849a1df10b70e026281bfa40e849 (diff)
bonding: fix LACP PDU not sent on slave port sometimes
When a slave is added to a bond and it is not in full duplex mode, AD_PORT_LACP_ENABLED flag is cleared, due to this LACP PDU is not sent on slave. When the duplex is changed to full, the flag needs to be set to send LACP PDU. Cc: Andy Gospodarek <gospo@cumulusnetworks.com> Reviewed-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: Satish Ashok <sashok@cumulusnetworks.com> Signed-off-by: Jonathan Toppins <jtoppins@cumulusnetworks.com> Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/bonding/bond_3ad.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index e3c96b216eb8..cfc4a9c1000a 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2219,8 +2219,10 @@ static int bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave,
2219 switch (lacpdu->subtype) { 2219 switch (lacpdu->subtype) {
2220 case AD_TYPE_LACPDU: 2220 case AD_TYPE_LACPDU:
2221 ret = RX_HANDLER_CONSUMED; 2221 ret = RX_HANDLER_CONSUMED;
2222 netdev_dbg(slave->bond->dev, "Received LACPDU on port %d\n", 2222 netdev_dbg(slave->bond->dev,
2223 port->actor_port_number); 2223 "Received LACPDU on port %d slave %s\n",
2224 port->actor_port_number,
2225 slave->dev->name);
2224 /* Protect against concurrent state machines */ 2226 /* Protect against concurrent state machines */
2225 spin_lock(&slave->bond->mode_lock); 2227 spin_lock(&slave->bond->mode_lock);
2226 ad_rx_machine(lacpdu, port); 2228 ad_rx_machine(lacpdu, port);
@@ -2312,7 +2314,10 @@ void bond_3ad_adapter_duplex_changed(struct slave *slave)
2312 port->actor_admin_port_key &= ~AD_DUPLEX_KEY_MASKS; 2314 port->actor_admin_port_key &= ~AD_DUPLEX_KEY_MASKS;
2313 port->actor_oper_port_key = port->actor_admin_port_key |= 2315 port->actor_oper_port_key = port->actor_admin_port_key |=
2314 __get_duplex(port); 2316 __get_duplex(port);
2315 netdev_dbg(slave->bond->dev, "Port %d changed duplex\n", port->actor_port_number); 2317 netdev_dbg(slave->bond->dev, "Port %d slave %s changed duplex\n",
2318 port->actor_port_number, slave->dev->name);
2319 if (port->actor_oper_port_key & AD_DUPLEX_KEY_MASKS)
2320 port->sm_vars |= AD_PORT_LACP_ENABLED;
2316 /* there is no need to reselect a new aggregator, just signal the 2321 /* there is no need to reselect a new aggregator, just signal the
2317 * state machines to reinitialize 2322 * state machines to reinitialize
2318 */ 2323 */