Commit 7f20cd25 authored by Nikolay Aleksandrov's avatar Nikolay Aleksandrov Committed by David S. Miller

bonding: 3ad: allow to set ad_actor settings while the bond is up

No need to require the bond down while changing these settings, the change
will be reflected immediately and the 3ad mode will sort itself out.
For faster convergence set port->ntt to true in order to generate new
LACPDUs immediately.

CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Veaceslav Falico <vfalico@gmail.com>
CC: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7a02bf89
...@@ -2176,8 +2176,12 @@ void bond_3ad_update_ad_actor_settings(struct bonding *bond) ...@@ -2176,8 +2176,12 @@ void bond_3ad_update_ad_actor_settings(struct bonding *bond)
*((struct mac_addr *)bond->params.ad_actor_system); *((struct mac_addr *)bond->params.ad_actor_system);
spin_lock_bh(&bond->mode_lock); spin_lock_bh(&bond->mode_lock);
bond_for_each_slave(bond, slave, iter) bond_for_each_slave(bond, slave, iter) {
__ad_actor_update_port(&(SLAVE_AD_INFO(slave)->port)); struct port *port = &(SLAVE_AD_INFO(slave))->port;
__ad_actor_update_port(port);
port->ntt = true;
}
spin_unlock_bh(&bond->mode_lock); spin_unlock_bh(&bond->mode_lock);
} }
......
...@@ -402,7 +402,6 @@ static const struct bond_option bond_opts[BOND_OPT_LAST] = { ...@@ -402,7 +402,6 @@ static const struct bond_option bond_opts[BOND_OPT_LAST] = {
.id = BOND_OPT_AD_ACTOR_SYS_PRIO, .id = BOND_OPT_AD_ACTOR_SYS_PRIO,
.name = "ad_actor_sys_prio", .name = "ad_actor_sys_prio",
.unsuppmodes = BOND_MODE_ALL_EX(BIT(BOND_MODE_8023AD)), .unsuppmodes = BOND_MODE_ALL_EX(BIT(BOND_MODE_8023AD)),
.flags = BOND_OPTFLAG_IFDOWN,
.values = bond_ad_actor_sys_prio_tbl, .values = bond_ad_actor_sys_prio_tbl,
.set = bond_option_ad_actor_sys_prio_set, .set = bond_option_ad_actor_sys_prio_set,
}, },
...@@ -410,7 +409,7 @@ static const struct bond_option bond_opts[BOND_OPT_LAST] = { ...@@ -410,7 +409,7 @@ static const struct bond_option bond_opts[BOND_OPT_LAST] = {
.id = BOND_OPT_AD_ACTOR_SYSTEM, .id = BOND_OPT_AD_ACTOR_SYSTEM,
.name = "ad_actor_system", .name = "ad_actor_system",
.unsuppmodes = BOND_MODE_ALL_EX(BIT(BOND_MODE_8023AD)), .unsuppmodes = BOND_MODE_ALL_EX(BIT(BOND_MODE_8023AD)),
.flags = BOND_OPTFLAG_RAWVAL | BOND_OPTFLAG_IFDOWN, .flags = BOND_OPTFLAG_RAWVAL,
.set = bond_option_ad_actor_system_set, .set = bond_option_ad_actor_system_set,
}, },
[BOND_OPT_AD_USER_PORT_KEY] = { [BOND_OPT_AD_USER_PORT_KEY] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment