Linux Kernel Selftest development
 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 3/3] selftests: bonding: add recovery updelay test for broadcast mode
Date: Fri, 27 Nov 2026 03:15:59 +0000	[thread overview]
Message-ID: <179574935907.3135.6831461021438057155@kernel.org> (raw)
In-Reply-To: <20261126-bond_broadcast_updelay-v1-3-188e5538d6ca@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 cases in recovery-updelay.sh pass whether or not
  the companion fix "bonding: update slave array on link change for…
- [Low] The commit author is "Hangbin Liu <hangbin.liu@linux.dev>", but
  the only Signed-off-by is "Hangbin Liu <liuhangbin@kylinos.cn>".

--

selftests: bonding: add recovery updelay test for broadcast mode

This merges the mode 1 and mode 2 recovery updelay selftests into one
recovery-updelay.sh script. The script now also covers bonding mode 3
(broadcast), and the Makefile installs the merged script.

> Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>

[Severity: Low]
The Author: line is "Hangbin Liu <hangbin.liu@linux.dev>", but the only
Signed-off-by is "Hangbin Liu <liuhangbin@kylinos.cn>". Won't checkpatch.pl
report this as a From:/Signed-off-by: email mismatch?

Could a From: line that matches the sign-off identity be added to the body?
Adding a sign-off from the author address would also work. The other two
patches in the series appear to have the same mismatch.

[ ... ]

> 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]
Do the new mode 3 cases pass whether or not the companion fix "bonding:
update slave array on link change for broadcast mode" is applied?

After the flap, test_bond_recovery() in lag_lib.sh only checks that ping
works again:

tools/testing/selftests/drivers/net/bonding/lag_lib.sh:test_bond_recovery() {
    ...
	slowwait 2 ip netns exec ${CLIENT} ping ${SWITCHIP} -c 2 -W 0.1 &> /dev/null
    ...
}

That covers the case where no slave is usable, so updelay is ignored. The
companion fix handles the opposite case. There, a stale usable_slaves
snapshot with count == 0 makes bond_miimon_inspect() set ignore_updelay
on every pass:

drivers/net/bonding/bond_main.c:bond_miimon_inspect() {
    ...
		if (usable_slaves && usable_slaves->count == 0)
			ignore_updelay = true;
    ...
}

Without the fix, this is what happens:

- create_bond() enslaves eth0 and eth1 with updelay > 0.
- bond_enslave() puts both slaves in BOND_LINK_BACK.
- bond_update_slave_arr() builds usable_slaves with count == 0, because
  bond_slave_can_tx() requires BOND_LINK_UP.

In broadcast mode nothing rebuilds that array on link change.
bond_miimon_link_change() has no BOND_MODE_BROADCAST case. The rebuilds in
bond_open() and the NETDEV_CHANGE handler only run when
bond_mode_can_use_xmit_hash() is true. So recovery is always immediate,
and the test still passes.

Could a case be added that checks a slave still waits out updelay while
another slave is usable? Without one, the companion fix has no test
coverage. The revert patch says the two patches together "keep
ignore_updelay correct in both directions", but only one direction is
tested.

Also, slowwait waits 2 seconds, so the delays from 0 to 1000 ms appear to
pass even with 45fc134bcfad still applied. Only the 2000 (borderline), 5000
and 10000 ms cases seem to tell the two behaviours apart.

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261126-bond_broadcast_updelay-v1-0-188e5538d6ca%40kylinos.cn

  reply	other threads:[~2026-11-27  3:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  2:30 [PATCH net 0/3] bonding: ignore updelay when no active links for broadcast mode Hangbin Liu
2026-11-26  2:30 ` [PATCH net 1/3] Revert "bonding: do not set usable_slaves for broadcast mode" Hangbin Liu
2026-11-27  3:15   ` netdev-bot+sashiko
2026-11-26  2:30 ` [PATCH net 2/3] bonding: update slave array on link change for broadcast mode Hangbin Liu
2026-11-27  3:15   ` netdev-bot+sashiko
2026-11-27  6:00     ` Hangbin Liu
2026-11-26  2:30 ` [PATCH net 3/3] selftests: bonding: add recovery updelay test " Hangbin Liu
2026-11-27  3:15   ` netdev-bot+sashiko [this message]
2026-11-26  2:32 ` [PATCH net 0/3] bonding: ignore updelay when no active links " netdev-bot+sinfo
2026-11-26  7:28 ` jiangjiehua (A)

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=179574935907.3135.6831461021438057155@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