Re: [PATCH net] bonding: fix missing down path on speed/duplex failure after FAIL->UP

From: Timur Stukan

Date: Mon Oct 26 2026 - 09:21:32 EST


On Mon, 26 Oct 2026 at 13:01, <netdev-bot+sashiko@xxxxxxxxxx> wrote:
> > + if (slave->link_prev_state == BOND_LINK_FAIL) {
> > + if (bond_miimon_slave_down(bond, slave))
> > + do_failover = true;
> > + continue;
> > + }
>
> [Severity: Medium]
> In 802.3ad mode, does BOND_LINK_FAIL always mean the slave is still in use?

Good catch. No, BOND_LINK_FAIL does not always mean that slave is
still in use, bond_miimon_inspect() follows that rule but
bond_slave_netdev_event() does not.

That is not new behaviour though, before this patch it could be reproduced also:

Take the 802.3ad slave in BOND_LINK_DOWN with a non-zero last_link_up.
Its carrier comes back and is lost again before miimon brings the
slave up and driver still reports unknown speed/duplex, so the
bond_slave_netdev_event() sets slave as FAIL, then in
bond_miimon_inspect() carrier check fails and link_new_state is
proposed as DOWN and bond_miimon_commit() runs the slave through the
full down path although it is already down, with the same
consequences: link_failure_count incremented, a notify event, dmesg
print and a call to bond_3ad_handle_link_change(). This patch only
adds another way into that path, when the carrier is up but
speed/duplex are still invalid.

The root cause is the notifier using the last_link_up rather than the
current link state. I can fix that with a separate patch that sets
FAIL only for a slave that is currently UP or FAIL, either as part of
this series or as a follow-up.

Anyway, I'll wait for Jay's feedback on the overall approach before sending v2.

pw-bot: cr