From: netdev-bot+sashiko@kernel.org
To: ramses@well-founded.dev
Cc: jv@jvosburgh.net, andrew+netdev@lunn.ch, davem@davemloft.net,
kuba@kernel.org, pabeni@redhat.com, jbohac@suse.cz,
edumazet@kernel.org, willemb@google.com, horms@kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, razor@blackwall.org,
hangbin.liu@linux.dev, shuah@kernel.org
Subject: Re: [PATCH net-next 2/2] selftests: bonding: test that the ARP monitor keeps UP slaves when it starts
Date: Thu, 03 Dec 2026 03:35:01 +0000 [thread overview]
Message-ID: <179626890111.3146.588026340804732751@kernel.org> (raw)
In-Reply-To: <20261201-bonding-arp-reseed-v1-2-984d4a3991cb@well-founded.dev>
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 comment in arp_monitor_start_on_interval_set()…
--
selftests: bonding: test that the ARP monitor keeps UP slaves when it starts
This adds a selftest for two ways the ARP monitor can start after the
slaves are enslaved. In the first, the bond is brought up after slaves
were enslaved while it was down. In the second, arp_interval is set on a
running bond that uses miimon. In both cases the test checks that the
primary stays active and that no slave records a link failure.
> diff --git a/tools/testing/selftests/drivers/net/bonding/bond_arp_monitor_start.sh b/tools/testing/selftests/drivers/net/bonding/bond_arp_monitor_start.sh
> new file mode 100755
> index 0000000000000..a718292172244
> --- /dev/null
> +++ b/tools/testing/selftests/drivers/net/bonding/bond_arp_monitor_start.sh
[ ... ]
> +arp_monitor_start_on_interval_set()
> +{
> + RET=0
> +
> + bond_create miimon 100
> + ip -n "$h_ns" link set bond0 up
> + bond_enslave
> + slowwait 5 active_slave_is eth0
> + check_err $? "eth0 did not become the active slave with miimon"
> + sleep "$ENSLAVE_WAIT"
> + # arp_validate cannot be set while miimon is in use. bond_changelink()
> + # sets arp_interval first, which turns miimon off.
[Severity: Low]
This isn't a bug, but does this comment match what bond_changelink()
does?
In drivers/net/bonding/bond_netlink.c, the miimon that the
arp_validate check uses is local to the request. It starts at 0, and
it is only assigned when the same netlink message carries
IFLA_BOND_MIIMON:
bond_changelink() {
int miimon = 0;
...
if (data[IFLA_BOND_MIIMON]) {
miimon = nla_get_u32(data[IFLA_BOND_MIIMON]);
...
if (arp_validate && miimon) {
NL_SET_ERR_MSG_ATTR(extack, data[IFLA_BOND_ARP_VALIDATE],
"ARP validating cannot be used with MII monitoring");
return -EINVAL;
}
...
}
bond_option_arp_validate_set() does not check miimon either. So the
bond's current miimon state never blocks arp_validate. Handling
IFLA_BOND_ARP_INTERVAL first, which clears bond->params.miimon, has no
effect on whether arp_validate is accepted.
It looks like a plain "ip link set bond0 type bond arp_validate all" on
a bond running miimon would also be accepted. The combined command
works because iproute2 does not send IFLA_BOND_MIIMON in that request.
Could the comment be reworded or dropped so it does not describe a
constraint and an ordering dependency that the kernel doesn't have?
> + ip -n "$h_ns" link set bond0 type bond arp_interval "$ARP_INTERVAL" \
> + arp_validate all
> + check_err $? "Failed to switch to the ARP monitor"
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261201-bonding-arp-reseed-v1-0-984d4a3991cb%40well-founded.dev
prev parent reply other threads:[~2026-12-03 3:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 10:20 [PATCH net-next 0/2] bonding: reseed the ARP monitor when it starts Ramses de Norre via B4 Relay
2026-12-01 10:20 ` [PATCH net-next 1/2] " Ramses de Norre via B4 Relay
2026-12-03 3:18 ` Hangbin Liu
2026-12-03 3:34 ` netdev-bot+sashiko
2026-12-01 10:20 ` [PATCH net-next 2/2] selftests: bonding: test that the ARP monitor keeps UP slaves " Ramses de Norre via B4 Relay
2026-12-03 3:23 ` Hangbin Liu
2026-12-03 3:35 ` netdev-bot+sashiko [this message]
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=179626890111.3146.588026340804732751@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=horms@kernel.org \
--cc=jbohac@suse.cz \
--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=ramses@well-founded.dev \
--cc=razor@blackwall.org \
--cc=shuah@kernel.org \
--cc=willemb@google.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