Hi When I use bond/show to get next balance time, it sometimes get a negative value.
It can easily reproduce by run shell scripts: while true; do ovs-appctl bond/show | grep next done and it can be easily fixed by: ofproto/bond.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/bond.c b/ofproto/bond.c index cfdf44f85..384ffdb08 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -1539,7 +1539,7 @@ bond_print_details(struct ds *ds, const struct bond *bond) if (bond_is_balanced(bond)) { ds_put_format(ds, "next rebalance: %lld ms\n", - bond->next_rebalance - time_msec()); + (bond->next_rebalance + bond->rebalance_interval - time_msec()) % bond->rebalance_interval); } ds_put_format(ds, "lacp_status: %s\n", Best Regards ------------------------------------------------------------------------------------------------------------------------------------- ????????????????????????????????? ???????????????????????????????????????? ???????????????????????????????????????? ??? This e-mail and its attachments contain confidential information from New H3C, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!
_______________________________________________ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss