diff options
author | Peter Pan(潘卫平) <panweiping3@gmail.com> | 2011-06-08 21:19:02 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-09 15:02:19 -0700 |
commit | 56d00c677de0a6285587af4f6c6f10aef3209f9f (patch) | |
tree | eee1af15c0b836495d59e42053bac065827a1618 /drivers/net/bonding/bond_3ad.c | |
parent | ba824a8b2d77942d51ce45ed721f65764c00ab50 (diff) | |
download | linux-56d00c677de0a6285587af4f6c6f10aef3209f9f.tar.gz linux-56d00c677de0a6285587af4f6c6f10aef3209f9f.tar.bz2 linux-56d00c677de0a6285587af4f6c6f10aef3209f9f.zip |
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>
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 4512bc459d33..013a8018daf1 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -1868,11 +1868,10 @@ static u16 aggregator_identifier; * bond_3ad_initialize - initialize a bond's 802.3ad parameters and structures * @bond: bonding struct to work on * @tick_resolution: tick duration (millisecond resolution) - * @lacp_fast: boolean. whether fast periodic should be used * * Can be called only after the mac address of the bond is set. */ -void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution, int lacp_fast) +void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution) { // check that the bond is not initialized yet if (MAC_ADDRESS_COMPARE(&(BOND_AD_INFO(bond).system.sys_mac_addr), @@ -1880,7 +1879,6 @@ void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution, int lacp_fas aggregator_identifier = 0; - BOND_AD_INFO(bond).lacp_fast = lacp_fast; BOND_AD_INFO(bond).system.sys_priority = 0xFFFF; BOND_AD_INFO(bond).system.sys_mac_addr = *((struct mac_addr *)bond->dev->dev_addr); @@ -1903,6 +1901,7 @@ void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution, int lacp_fas int bond_3ad_bind_slave(struct slave *slave) { struct bonding *bond = bond_get_bond_by_slave(slave); + int lacp_fast = bond->params.lacp_fast; struct port *port; struct aggregator *aggregator; @@ -1918,7 +1917,7 @@ int bond_3ad_bind_slave(struct slave *slave) // port initialization port = &(SLAVE_AD_INFO(slave).port); - ad_initialize_port(port, BOND_AD_INFO(bond).lacp_fast); + ad_initialize_port(port, lacp_fast); port->slave = slave; port->actor_port_number = SLAVE_AD_INFO(slave).id; |