Ilya Maximets <[email protected]> writes: > On 8/13/25 8:05 PM, Aaron Conole via dev wrote: >> When adjusting bond parameters, any adjustment is considered sufficient >> for triggering a rebalance. This is a very simplistic config update >> scheme that triggers a complete rebalance even if the time adjustment >> would move the next expiration out beyond the last calculated expiration. >> >> For the interval parameter only, we can simply recalculate the expiry >> deadline and let the next bond_run() event do the rebalance if needed. >> Even if the recalculation would cause the deadline to have occurred in >> the past, it should execute on the next bond_run() anyway. This is >> still okay, as the rebalance interval timeout may not result in a >> full rebalance anyway. >> >> Reported-at: >> https://www.mail-archive.com/[email protected]/msg10409.html > > This should be a link to the primary ovs-discuss archives: > https://mail.openvswitch.org/pipermail/ovs-discuss/2025-April/053588.html
ACK - I'll fix it on apply (which I'll do later today) >> Signed-off-by: Aaron Conole <[email protected]> >> --- >> ofproto/bond.c | 17 ++++++++++++++++- >> 1 file changed, 16 insertions(+), 1 deletion(-) >> >> diff --git a/ofproto/bond.c b/ofproto/bond.c >> index 3859ddca08..00f5dc754c 100644 >> --- a/ofproto/bond.c >> +++ b/ofproto/bond.c >> @@ -459,8 +459,23 @@ bond_reconfigure(struct bond *bond, const struct >> bond_settings *s) >> } >> >> if (bond->rebalance_interval != s->rebalance_interval) { >> + if (s->rebalance_interval && bond->rebalance_interval) { >> + /* Recompute the next rebalance interval by moving the >> + * next_rebalance to be offset by the new interval. In this >> + * case, if all that was updated is the rebalance interval, >> + * we can skip triggering the rest of the port reconfiguration. >> */ >> + if (bond->next_rebalance) { >> + long long int old_start_time = >> + bond->next_rebalance - s->rebalance_interval; >> + bond->next_rebalance = >> + old_start_time + bond->rebalance_interval; >> + } >> + } else { >> + /* When the bond is doing a disable/enable of the rebalance >> + * interval, trigger the revalidation. */ >> + revalidate = true; >> + } >> bond->rebalance_interval = s->rebalance_interval; >> - revalidate = true; >> } >> >> if (bond->balance != s->balance) { > > Would be nice to have a test for this, but we can add one while fixing the > rest of the issues discussed in v1. Agreed - I'll add it to the next round of submission for bond changes :) > With the link update (may be fixed while applying, I suppose): > > Acked-by: Ilya Maximets <[email protected]> Thanks Ilya! _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
