bond link status change comes from carrier and lacp may_enable ,when carrir does not change and lacp change, prompt of LACP will be more accurate.
Signed-off-by: yangchang <[email protected]> --- lib/bond.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/bond.c b/lib/bond.c index cffdae249..b42904775 100644 --- a/lib/bond.c +++ b/lib/bond.c @@ -1313,8 +1313,14 @@ bond_link_status_update(struct bond_slave *slave, struct tag_set *tags) up = netdev_get_carrier(slave->netdev) && slave->may_enable; if ((up == slave->enabled) != (slave->delay_expires == LLONG_MAX)) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20); - VLOG_INFO_RL(&rl, "interface %s: link state %s", - slave->name, up ? "up" : "down"); + if (up == netdev_get_carrier(slave->netdev)) { + VLOG_INFO_RL(&rl, "interface %s: link state %s", + slave->name, up ? "up" : "down"); + } else { + VLOG_INFO_RL(&rl, "interface %s: lacp may_enable %s", + slave->name, up ? "true" : "false"); + } + if (up == slave->enabled) { slave->delay_expires = LLONG_MAX; VLOG_INFO_RL(&rl, "interface %s: will not be %s", -- 2.27.0.windows.1 [email protected] _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
