The command "ovs-appctl bond/show" is used for display information of bond ports.
When bond mode is "balance_slb" or "balance_tcp", we can find that the value followed behind "next rebalance" is negative somtimes. Signed-off-by: Binbin Xu <xu.binb...@zte.com.cn> --- ofproto/bond.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ofproto/bond.c b/ofproto/bond.c index 1d0c3ce..151cd37 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -1287,6 +1287,7 @@ bond_print_details(struct ds *ds, const struct bond *bond) bool may_recirc; uint32_t recirc_id; int i; + long long int next_rebalance; ds_put_format(ds, "---- %s ----\n", bond->name); ds_put_format(ds, "bond_mode: %s\n", @@ -1302,8 +1303,10 @@ bond_print_details(struct ds *ds, const struct bond *bond) ds_put_format(ds, "downdelay: %d ms\n", bond->downdelay); if (bond_is_balanced(bond)) { + next_rebalance = bond->next_rebalance - time_msec(); ds_put_format(ds, "next rebalance: %lld ms\n", - bond->next_rebalance - time_msec()); + next_rebalance >= 0 ? next_rebalance + : next_rebalance + bond->rebalance_interval); } ds_put_cstr(ds, "lacp_status: "); -- 2.9.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev