Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: hangbin.liu@linux.dev
Cc: jv@jvosburgh.net, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	tonghao@bamaicloud.com, razor@blackwall.org, shuah@kernel.org,
	jiangjiehua1@huawei.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net v2 3/3] selftests: bonding: add recovery updelay test for broadcast mode
Date: Thu, 03 Dec 2026 06:29:54 +0000	[thread overview]
Message-ID: <179627939427.3146.1212423331497238818@kernel.org> (raw)
In-Reply-To: <20261201-bond_broadcast_updelay-v2-3-969e1844f2c4@kylinos.cn>

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@linux.dev>'
  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@kylinos.cn>

[Severity: Low]
The Author: address (hangbin.liu@linux.dev) doesn't match the only
Signed-off-by: address (liuhangbin@kylinos.cn). 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

  reply	other threads:[~2026-12-03  6:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  6:29 [PATCH net v2 0/3] bonding: ignore updelay when no active links for broadcast mode Hangbin Liu
2026-12-01  6:29 ` [PATCH net v2 1/3] Revert "bonding: do not set usable_slaves for broadcast mode" Hangbin Liu
2026-12-03  6:29   ` netdev-bot+sashiko
2026-12-01  6:29 ` [PATCH net v2 2/3] bonding: update slave array on link change for broadcast mode Hangbin Liu
2026-12-03  6:29   ` netdev-bot+sashiko
2026-12-01  6:29 ` [PATCH net v2 3/3] selftests: bonding: add recovery updelay test " Hangbin Liu
2026-12-03  6:29   ` netdev-bot+sashiko [this message]
2026-12-01  6:34 ` [PATCH net v2 0/3] bonding: ignore updelay when no active links " netdev-bot+sinfo
2026-12-01  8:38   ` Hangbin Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179627939427.3146.1212423331497238818@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hangbin.liu@linux.dev \
    --cc=jiangjiehua1@huawei.com \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=shuah@kernel.org \
    --cc=tonghao@bamaicloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox