Re: [PATCH net v2 3/3] selftests: bonding: add recovery updelay test for broadcast mode
From: netdev-bot+sashiko
Date: Thu Dec 03 2026 - 01:30:09 EST
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The new mode-3 (broadcast) cases in recovery-updelay.sh cannot
detect a regression of the fix in commit "bonding: update slave array…
- [Low] The commit author identity 'Hangbin Liu <hangbin.liu@xxxxxxxxx>'
has no matching Signed-off-by.
--
selftests: bonding: add recovery updelay test for broadcast mode
This commit adds broadcast mode (mode 3) to the bonding recovery updelay
selftest. It merges the mode 1 and mode 2 scripts into a single
recovery-updelay.sh, which loops over modes 1, 2 and 3 and a set of
updelay values.
> Signed-off-by: Hangbin Liu <liuhangbin@xxxxxxxxxx>
[Severity: Low]
The Author: address (hangbin.liu@xxxxxxxxx) doesn't match the only
Signed-off-by: address (liuhangbin@xxxxxxxxxx). checkpatch reports this
as FROM_SIGN_OFF_MISMATCH.
The two earlier patches in the series have the same mismatch:
"Revert "bonding: do not set usable_slaves for broadcast mode"" and
"bonding: update slave array on link change for broadcast mode".
Could the series be resent with a matching From:, or with an added
Signed-off-by: for the author address?
> diff --git a/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh b/tools/testing/selftests/drivers/net/bonding/recovery-updelay.sh
> similarity index 72%
> rename from tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh
> rename to tools/testing/selftests/drivers/net/bonding/recovery-updelay.sh
> index 9d26ab4cad0b3..05edf9915cc0a 100755
> --- a/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh
> +++ b/tools/testing/selftests/drivers/net/bonding/recovery-updelay.sh
> @@ -34,12 +34,11 @@ cleanup()
> trap cleanup 0 1 2
>
> lag_setup_network
[ ... ]
> +
> +for mode in 1 2 3; do
> + for delay in 0 200 500 1000 2000 5000 10000; do
> + test_bond_recovery mode "${mode}" miimon 100 updelay "${delay}"
> + done
> +done
[Severity: Low]
Would the new mode 3 cases catch a regression of the follow-up fix
"bonding: update slave array on link change for broadcast mode"?
test_bond_recovery() in lag_lib.sh only checks ping before and after the
flap:
tools/testing/selftests/drivers/net/bonding/lag_lib.sh:test_bond_recovery() {
...
ip netns exec ${SWITCH} ip link set eth0 down
sleep 2
ip netns exec ${SWITCH} ip link set eth0 up
ip netns exec ${SWITCH} ip link set eth1 down
# re-verify connectivity
slowwait 2 ip netns exec ${CLIENT} ping ${SWITCHIP} -c 2 -W 0.1 &> /dev/null
...
}
Without the follow-up commit, only bond_enslave() and
__bond_release_one() rebuild the broadcast usable_slaves array.
When updelay is non-zero, bond_enslave() puts a slave whose carrier is
up into BOND_LINK_BACK. bond_update_slave_arr() skips slaves that fail
bond_slave_can_tx(), so the array is built empty.
For broadcast mode, bond_open(), bond_miimon_link_change() and the
NETDEV_CHANGE handler do not rebuild the array. So bond_miimon_inspect()
always takes this branch:
drivers/net/bonding/bond_main.c:bond_miimon_inspect() {
...
if (usable_slaves && usable_slaves->count == 0)
ignore_updelay = true;
...
}
In that state, updelay is skipped even while a peer slave is still
forwarding. The recovery step still succeeds at once, so every mode 3
case passes.
So if someone removed the case the follow-up adds to
bond_miimon_link_change():
case BOND_MODE_XOR:
case BOND_MODE_BROADCAST:
bond_update_slave_arr(bond, NULL);
none of these cases would fail. The only state they seem to catch is a
kernel without the revert, where usable_slaves is never published for
broadcast.
Separately, the updelay 0, 200, 500, 1000 and probably 2000 cases finish
inside the roughly 2.3 second slowwait/ping window even when updelay is
honoured. Only the 5000 and 10000 cases exercise the "ignore updelay
when nothing is up" logic.
Could the test also check that updelay still applies while another slave
is up, for example by reading the slave link state or measuring timing?
That would cover both directions described in the series.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261201-bond_broadcast_updelay-v2-0-969e1844f2c4%40kylinos.cn