Article View: linux.kernel.netdev
Article #26126Re: [PATCH net-next 2/2] selftests: bonding: test that the ARP monitor keeps UP slaves when it starts
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 03:35
Date: Thu, 03 Dec 2026 03:35
83 lines
10965 bytes
10965 bytes
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
Technical Details
Message-ID:
<179626890111.3146.588026340804732751@kernel.org>Path:
mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376261-linux-kernel-netdev=dewy.ruReferences:
<20261201-bonding-arp-reseed-v1-2-984d4a3991cb@well-founded.dev>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376261-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev 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 Organization: Usenet Network Message-ID: <179626890111.3146.588026340804732751@kernel.org> References: <20261201-bonding-arp-reseed-v1-2-984d4a3991cb@well-founded.dev> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2132655"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:ww2ou0ajuF4uAPbl/KmNBKLl3Vg= sha256:IH4+oMW+5lRqo6O6vkqbdLFG5icdpQnPryXHEJzN5MU= sha1:XtpFbJ2NOsVHByCctvrsc7mKASg= sha256:cD7Jae+GMlepzRzx7ozsNPsZLZus7y36V9/JW0LQZrM= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 48613117803; Thu, 3 Dec 2026 06:35:20 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.501 X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7EH649Wav_cI; Thu, 3 Dec 2026 06:35:16 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-376261-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id CD934117804; Thu, 3 Dec 2026 06:35:07 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 4FB40260CA; Thu, 3 Dec 2026 03:35:05 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796268903; b=3queJp1IFcvwaXuYzD1tANsUHFPdYVHpwRT6G+c2/EwuLJPRpFr1pzpuyqgzjKXArPzq KZ98Z0LruH7/xPuv1yHGl3mtruPzJbBonX5P/06CygG59xIHAK3jh7dV5WjDVH5ZKX2Ht UqRWdj7Lt7KWuadFG+Q8BmfPgDYIsFtmO6Qg3iJN2y8K3hw98jL/cP5OJCWoNcGewDSu2 TMi48qayhg31uZtm4STaE2uibpdz9d4w1RQOFi7XpdgKmAvcOqsSqEFRKpcoM8dcFhujL +e+INvxZnUaaZKP6RSwrdNXAXChUvSrvyg8dFM2zXTL5HGUU1Wp9jPj0T7r/15v+dNw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796268903; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=asIarur4VWnPRCepF9pyQCNkY+x88S+EEvPeRPoyiyw=; b=ekug+xs+wzhYi2RkDzhnVGu/zHzQSUb5AUcL5ZxAsvkUPcgS9Z+Up59+APsjwTqlVa/K /CrBvWbdGV6daohHcSuEPs0uW016CYTefn5cTAfXytknKouiI8jxbPWHR78W0BjMvOXkQ jykmfVIzAUEVNkbOasXHAKlJj9DLPpzjqVeW271Y3edq6FnLico5gngA0tZhnehXAYt32 ZV3o4gkE5Jvmh5Nw4S9PRC6qnAM27ICa1nLi53xDuvXlG5VMjGBWf8vfkRefK4RaX+z/Y DB0dUE4Y+9Ri0tKa57HMoquVI6V9mQHyb0Y0GyPb4vicJO8WLzK3i2nGRoCN6m+Ksdg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Q3lZcVWM; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F98E606A692; Thu, 3 Dec 2026 03:35:03 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Q3lZcVWM X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796268902; b=FsLEttTCVF7JLiy12wc0+5zzOLOTpaN9vnFRC1xyiIBLLsXQkRyuPSJVcrPywPbPvAv0 yNrE98QKD9Nyi7ChWMO/IPG0Luuz3GHxSURn5fCy5sTbGMn85tnPuMIQJTTWR2kxFlfs9 bIMSv1EwFo1/atNS0kkLUoA70GZTBccnQEf7LY4l+ALnY0SwArA4nF8qQ+XEgEcWmCawe owCWsZi7WAYKJV9EkU6oMzOp680Ogg3BATHh/Yt3zZM93EJaF52mbZfh/tgUn1wRJ841G jXyiBEjJglcUi7wLcflkUmVH1VtFzG8EsEO1yMSen7oGzMzT1pJJT/cuN4s74KdYRZQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796268902; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=asIarur4VWnPRCepF9pyQCNkY+x88S+EEvPeRPoyiyw=; b=hu8c6yM+78v/bjjxsCM23XFP/JYvS75OmENrZ1Qn0Hq/Mg8HKjxvvfpMosA0vy6QA+i2 qz8FhndjDG+iUMOSqcw7QsgPyUkaAVoe8q5SHrdq3KBw9nsBIwUUNdzCJhvQoWikFlEuU FmjLTrgyXcdDTThsEbaSTAYsJ0C5WOhdK9plggbtPl/vBdXRnj1WtAi3K4kxAA18hNbXw K1X7XkMyPpH1vM14gMyF+ErqQFvjjBnNkSwUP97GSzcbzm//WkIUzBFgRY5WdWiORqRGz FWrfR5qAiXzqQ10XzZZsMvtsIfJP21QcyIhRevgv3InCzkmIV3kGEiJv6z4MvlUYYnw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Q3lZcVWM; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 906FE606A684; Thu, 3 Dec 2026 03:35:02 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88E7D1F00899; Thu, 3 Dec 2026 03:35:01 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796268902; bh=asIarur4VWnPRCepF9pyQCNkY+x88S+EEvPeRPoyiyw=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Q3lZcVWMDst/fPn21ZNt6IG5fTUr+JClzw4OqqHOFTWrve5mSbq9BYtTgXBoAkv5E nVT+Gq92o+QYZBVtwrCQsZZV4wmGWh1b/7MFyhlJL+3aaCH4Ib/D5NCys3B2oyGfro XwWe9l4BKu7UZ6o4pH/k7tigHHQBcPH8Y8M+fTKWAPkQQtKbKVeOT+Mjh1b82j01If cyQRwDp8IyCCLhskUUHnUAXhH4OW3eFwaPEK7y9apy6qFOUqNo19impJc1fNMHthcW R8aEO584/f44CLcC7+CFXvXKV8Zmr1C8ztI3shMCT/2XB7v/FmWzp5hVaPv6iIZicL 1oFeP88Xas9WQ== X-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 X-In-Reply-To: <20261201-bonding-arp-reseed-v1-2-984d4a3991cb@well-founded.dev> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-Received-Bytes: 10768