Article View: linux.kernel.netdev
Article #23308Re: [PATCH net 1/3] Revert "bonding: do not set usable_slaves for broadcast mode"
From: netdev-bot+sashiko
Date: Fri, 27 Nov 2026 03:15
Date: Fri, 27 Nov 2026 03:15
113 lines
12021 bytes
12021 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] Commit trailer and tagging problems on the revert.
- [Low] Comments no longer match how broadcast mode uses usable_slaves.
--
Revert "bonding: do not set usable_slaves for broadcast mode"
This reverts commit 45fc134bcfad. That commit stopped publishing
bond->usable_slaves in broadcast mode, so updelay was no longer ignored
when there were no active slaves. A follow-up patch in the series
rebuilds the slave array on link changes for broadcast mode.
> Revert "bonding: do not set usable_slaves for broadcast mode"
>
> This reverts commit 45fc134bcfadde456639c1b1e206e6918d69a553.
[ ... ]
> Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
[Severity: Low]
The From: address is Hangbin Liu <hangbin.liu@linux.dev>, but the
Signed-off-by: address is Hangbin Liu <liuhangbin@kylinos.cn>. Checkpatch
reports this as FROM_SIGN_OFF_MISMATCH. The other two patches in the series
have the same mismatch.
Should this revert carry a Fixes: tag, or a stable dependency note?
Commit 45fc134bcfad went in through net with its own Fixes: e0caeb24f538,
so it has probably reached stable. The follow-up "bonding: update slave
array on link change for broadcast mode" has Fixes: e0caeb24f538 and says
it needs this revert first. None of the tags tell stable tooling about
that ordering.
If only the follow-up is backported, it has no effect. The
bond_set_slave_arr() from 45fc134bcfad still drops usable_slaves for
broadcast mode.
If only this revert is backported, the bug that 45fc134bcfad fixed comes
back: in broadcast mode the stale, empty usable_slaves array makes the
bond always ignore updelay.
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 042d7c75548fa..d6675e87d06b6 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -5140,18 +5140,13 @@ static void bond_set_slave_arr(struct bonding *bond,
> {
> struct bond_up_slave *usable, *all;
>
> - all = rtnl_dereference(bond->all_slaves);
> - rcu_assign_pointer(bond->all_slaves, all_slaves);
> - kfree_rcu(all, rcu);
> -
> - if (BOND_MODE(bond) == BOND_MODE_BROADCAST) {
> - kfree_rcu(usable_slaves, rcu);
> - return;
> - }
> -
> usable = rtnl_dereference(bond->usable_slaves);
> rcu_assign_pointer(bond->usable_slaves, usable_slaves);
> kfree_rcu(usable, rcu);
[Severity: Low]
This isn't a bug, but after this revert bond->usable_slaves is published
for BOND_MODE_BROADCAST too. Should the related comments in bond_main.c be
updated to match?
The comment above bond_update_slave_arr() still lists only the xmit-hash
modes:
drivers/net/bonding/bond_main.c:
/* Build the usable slaves array in control path for modes that use xmit-hash
* to determine the slave interface -
* (a) BOND_MODE_8023AD
* (b) BOND_MODE_XOR
* (c) (BOND_MODE_TLB || BOND_MODE_ALB) && tlb_dynamic_lb == 0
The call site in bond_enslave() explains the broadcast case only in terms
of all_slaves:
/* broadcast mode uses the all_slaves to loop through slaves. */
if (bond_mode_can_use_xmit_hash(bond) ||
BOND_MODE(bond) == BOND_MODE_BROADCAST)
bond_update_slave_arr(bond, NULL);
However, bond_miimon_inspect() now relies on the broadcast-mode
usable_slaves to decide ignore_updelay:
usable_slaves = rcu_dereference(bond->usable_slaves);
if (usable_slaves && usable_slaves->count == 0)
ignore_updelay = true;
The rest of the series does not change either comment. Neither comment
says that broadcast mode must keep usable_slaves current on link changes,
which the follow-up patch makes a requirement.
> +
> + all = rtnl_dereference(bond->all_slaves);
> + rcu_assign_pointer(bond->all_slaves, all_slaves);
> + kfree_rcu(all, rcu);
> }
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261126-bond_broadcast_updelay-v1-0-188e5538d6ca%40kylinos.cn
Technical Details
Message-ID:
<179574935536.3135.14725054266290783008@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372426-linux-kernel-netdev=dewy.ruReferences:
<20261126-bond_broadcast_updelay-v1-1-188e5538d6ca@kylinos.cn>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372426-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net 1/3] Revert "bonding: do not set usable_slaves for broadcast mode" Date: Fri, 27 Nov 2026 03:15:55 +0000 Organization: Usenet Network Message-ID: <179574935536.3135.14725054266290783008@kernel.org> References: <20261126-bond_broadcast_updelay-v1-1-188e5538d6ca@kylinos.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="626100"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:7jHVjf6Bnuiwk5BbVTEBU5RrmcQ= sha256:LPU5DUPB3n719iSKzci1TolOq1rPuEOuhLbklQsLrFo= sha1:ZUOlpBne/S45dpUN2hxLBbyjv4A= sha256:sBEzjSCj1yVvl2tw/XCGDWpWHDhyCWIz+Ajmj8cwAkQ= 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 1E491125F0E; Fri, 27 Nov 2026 06:16:21 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, 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 f5HFLgfkuJZJ; Fri, 27 Nov 2026 06:16:13 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-372426-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 ED50F125F0A; Fri, 27 Nov 2026 06:16:02 +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 2D64A2EA1E; Fri, 27 Nov 2026 03:15:59 +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=1795749358; b=Wl5TSwZ+dc6c1GTjvLgT0UHqO94/q2cKa+813kCqER4NTqsKAerFm1HJypoUq9lcryJO bHawGnHSQkhb6xF+pLdLsiMHKrk+v/sK25xgySnYNhB4F3yVdg/DX1BZpavYzpW8WKOuG UjzxTtaxE56UA0BD3QVSkNStbf0iKlDpmLz+Opys6o/thDKG+UhIeQkHEEiSpGt61A6rp HtZwqvvt+efBrn1/9OT4V4u6/WZYPxh0jQdhyn0652IbSISfD2Zqu+tdgXdAZgk092MQn dB0kWGyO2aHIbms1Y2Mc9QBxSocTPEsdC5jTLNOGjJg4KzxCmesIxWqmzB0baVWd5sg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795749358; 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=zacDcZZkB0SgR1IDOo839AuEOBLi4HSRGIYFOfbcasw=; b=Pq1kdlC4um0vTTd4mDYM/f5keW4H3XWxPCa/qDK0IO/B6bOklF5SQYilKwh4tNcCcbM1 7GDYivfSPnzD1qaYISsAXVXrJ/WCN7DZDrNpRWvVEYPk9lDREWz9G/LDBscmUGg76KmXc ZnxPgnx9PeONvwmILLhNVsVGZZdfW0B4pe7RQ/loFypqL7SpTlsXKwju5+Y9hYYBRZA95 WvM8kL0sWerM+qEPXsMIfsUV6FGDVziM+bUKgJ7kOPnETsIRbXcmpnuaOKSaxiWe90Fkn H7SW1Z6nmzMrYwlVKSikCdPmb4rI38n3xsXn7s2IzaAP4Mc6oBjubvZFUkNlkgN06fw== 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=G9LFas5B; 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 1D928606A32F; Fri, 27 Nov 2026 03:15:58 +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=G9LFas5B 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=1795749357; b=jTpZ3ha09NZ1aGx4/h6KgbwyftKy/Qw9Z3m9D5eAKDmtkq4JQQnv9jd0N3EFAbm5iypC SmUaZnXq0mu6JECCGyU4KjrmTSAstUq6UjsgPyEdfsaWCci4+K/pEBlVtBy8YAHY/E8aI rOSpHtW53v7TOcaEvG46Xbfahb3/z1fjqJnVHicObU+QGxIE0l3JScKgIu0F3idY8lvoC ejAIAGcgSNTYbqGvzX6Z+MdQDAqBwyryfK4K42bLOTmFkIZV0MVhr1lJkpvsTWVjFZ0Te zHrLzRpCugfjiZQG6OaNlKyOfAKdP6kZKI8vyF4b7DPGx0Smkztdemn3t4agJtie52w== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795749357; 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=zacDcZZkB0SgR1IDOo839AuEOBLi4HSRGIYFOfbcasw=; b=LzzX9RuAYGwow5AKqoBCsM06M/4zK9/s6LK/f86Ar8lUm+EVp3OHf2fV86F8zgGJJU/n a4YGtn1lno2CJrD5raSjJpPNwbyDUZCIaVuS4ykxf+HhEqamsOhvFyy1WrQYspN5RJLU3 RlxaJ1IV2rV/GAHPZUNfO42+GLjk+LboipktiWdO6VHg4xGGOVplu8SZ89E7d9+wVZKTH xsIgYQYoPdkFQ2BaBnguJgEWLDudmT94xy6kTctURkxa6fWOQ4H2J6xn0DzVSuigFLycu pIVLDuOCE7UOYsIvcpqCQCawlU/0YsKMKohYLm3WSjjNN6jTdA/Kb7wRiB65wrtQ8eg== 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=G9LFas5B; 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 3E69F606A31E; Fri, 27 Nov 2026 03:15:56 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id C76301F000C1; Fri, 27 Nov 2026 03:15:55 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795749356; bh=zacDcZZkB0SgR1IDOo839AuEOBLi4HSRGIYFOfbcasw=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=G9LFas5BPBTw99X+KtzXq0mMuRbxNxAz02QeK3RoHBkOiF2kpU7Dg0FnjIfnf2ZQX Kb2aBITCjy0rM3SD/A0jvOPgGGXr2RYRbxrTl6OTM07GuLStW5e1pQ4I53DuI/TGw7 lyVJXIr1pE4imG+RMQUK1mi0inPMIxWoGOW0dHmyLOniIj07mUsUcqMkj48jkFj0mO gz+hAQeYlQBDnlHNCJ4SMAOqSympGqz0+Fxf1Vjk6mePjjDOFu2u3SSFF985nfUroL lcuAeRbDs0EAMI//uj/PZnijOaZBT5eVLam4hDwKFQffvIPGA4g6gRBjQ5ipHGhxmW VKoBQplAvELLw== X-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 X-In-Reply-To: <20261126-bond_broadcast_updelay-v1-1-188e5538d6ca@kylinos.cn> 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