Article View: linux.kernel.netdev
Article #22860[PATCH net 1/3] Revert "bonding: do not set usable_slaves for broadcast mode"
From: Hangbin Liu
Date: Thu, 26 Nov 2026 02:30
Date: Thu, 26 Nov 2026 02:30
76 lines
11582 bytes
11582 bytes
From: Hangbin Liu <liuhangbin@kylinos.cn>
This reverts commit 45fc134bcfadde456639c1b1e206e6918d69a553.
Commit 45fc134bcfad ("bonding: do not set usable_slaves for broadcast mode")
assumes the bond updelay always applies. However, per commit f8a65ab2f3ff
("bonding: fix link recovery in mode 2 when updelay is nonzero") and
section 13.1 paragraph 4 of the bonding documentation, when a slave is
enslaved and there are no active slaves, the slave should become usable
immediately once its link comes up, updelay should be ignored.
Before this revert: with no active interfaces, the only slave still waited
out the 1000 ms updelay before being brought into use.
[ 154.846629] bond0: (slave veth0): link status definitely down, disabling slave
[ 154.849879] bond0: now running without any active interface!
[ 159.544736] bond0: (slave veth0): link status up, enabling it in 1000 ms
[ 160.586299] bond0: (slave veth0): link status definitely up, 10000 Mbps full duplex
[ 160.603278] bond0: active interface up!
After this revert: the first slave can be used immediately on link up.
Subsequent slave veth2 still honor the 1000 ms updelay.
[ 94.106425] bond0: (slave veth0): link status definitely down, disabling slave
[ 94.109130] bond0: now running without any active interface!
[ 98.272494] bond0: (slave veth0): link status up, enabling it in 0 ms
[ 98.273279] bond0: (slave veth0): link status definitely up, 10000 Mbps full duplex
[ 98.275056] bond0: active interface up!
[ 110.855705] bond0: (slave veth2): Enslaving as an active interface with an up link
[ 111.904688] bond0: (slave veth2): link status definitely up, 10000 Mbps full duplex
[ 114.608488] bond0: (slave veth2): link status definitely down, disabling slave
[ 117.624491] bond0: (slave veth2): link status up, enabling it in 1000 ms
[ 118.664636] bond0: (slave veth2): link status definitely up, 10000 Mbps full duplex
The stale-empty side of the problem that motivated 45fc134bcfad is
addressed by the follow-up patch in this series, "bonding: update
slave array on link change for broadcast mode", which rebuilds the
array on link transitions, together they keep ignore_updelay correct
in both directions.
Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
---
drivers/net/bonding/bond_main.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 042d7c75548f..d6675e87d06b 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);
+
+ all = rtnl_dereference(bond->all_slaves);
+ rcu_assign_pointer(bond->all_slaves, all_slaves);
+ kfree_rcu(all, rcu);
}
static void bond_reset_slave_arr(struct bonding *bond)
--
2.56.0
Technical Details
Message-ID:
<20261126-bond_broadcast_updelay-v1-1-188e5538d6ca@kylinos.cn>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371824-linux-kernel-netdev=dewy.ruReferences:
<20261126-bond_broadcast_updelay-v1-0-188e5538d6ca@kylinos.cn>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371824-linux-kernel-netdev=dewy.ru From: hangbin.liu@linux.dev (Hangbin Liu) Newsgroups: linux.kernel.netdev Subject: [PATCH net 1/3] Revert "bonding: do not set usable_slaves for broadcast mode" Date: Thu, 26 Nov 2026 10:30:55 +0800 Organization: Usenet Network Message-ID: <20261126-bond_broadcast_updelay-v1-1-188e5538d6ca@kylinos.cn> References: <20261126-bond_broadcast_updelay-v1-0-188e5538d6ca@kylinos.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="361614"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:+QNKPPjtai6mZd4vRs3E4ppvEA0= sha256:XSzPHlYORG7EOWplkFTVbq5Wk84N2yk5lwrLCGZAV1s= sha1:Hw+bR/qdTfr8MLNYGhQfOWx7PAk= sha256:HT1Xf1rOeYRfYbfsEuvoDiTY+6I3L8ztu+9jPtNtfGY= 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 8C958125EB0; Thu, 26 Nov 2026 05:31:46 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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 (1024-bit key) header.d=linux.dev 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 TlZftKu5qjqG; Thu, 26 Nov 2026 05:31:43 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-371824-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 870F0125EA3; Thu, 26 Nov 2026 05:31:35 +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 73C123D11B; Thu, 26 Nov 2026 02:31:29 +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=1795660274; b=rIJVoWkxKfTHaE5SAEoAxWqFIUliJNEp2Z3Zy3vSMa05jl3mMyDAdv2tVa+DmLo+n7KZ JQ21LceJKU8TEaCKKPLA9gm33Px65Zo+WJy/qIutojyWo0WUU2VuX1mxyGBymIdP2jqOM 0DaBgCwzXLOXq70sIyh/vabZx1P2fykaowK4pymvN8E49lMAqb7oCuEKl7Rhaf0Gk4T2r AskR0s2FY2fGOGtrJ8kXyoPHPKd+tUPtA2l3KCpwbX5JWAMWRUgjGK79lWv/U/K5MGPLM IIT02/JFz3O2E08j/mY0Xw2mAdkj68d5iHe5TqVZmPRAw5qQPOIc1ppqtSIY8dUdbXg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795660274; h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature: X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:From:Date: Subject:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer; bh=PlLPJEnikDumUId5OPUoeA0R2LExnIMK5NTAdtsyIQs=; b=gK/JjwxyIE8HYLcoCp/a2jQ0XDE8GBBz8nnaOke4miKfuOdb+5wKUcaxOHSmB8xfJjLz kN36Tkw06WYsX4TKnMEolh7IQ+F3kBqbQUix0jjRmk6jWEhU3HF5ZhhZUQNgeuIx/HPwt aycXkwhVclXDwBZ+VeA8H0Zwkfp7BucUTHSgbQiXZVDTt9Cjzewp59KDvHzn1o1T7ADc6 UGNt2NNo4kp2EYPkyo3IThWyVeg/3Pc4EollIy8UX0CdA2lMudn2PbsexW+xU2rwhQIOb x1heCiCpSraZhBHgFUO9x2MpSuOqAnl/qKLjyMLh0VV2wujfVtm+vuYxa2n5ng3jGRA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=QUB7LMUs; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; 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 6758560A260E; Thu, 26 Nov 2026 02:31:14 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=QUB7LMUs X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.41 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795660273; b=ILasLT+i2A2qh/LKMcjh8rEY2XlDNgtOixkiOYmy7arcrzxYzWw3ZvvjRjC5SQOSpCVQ V/UTNrPNvkZaTT2XFGi1fv/YvKREV4/zHDGmJvztDS+DOmf/ERXPps9t2eQD3Xhxm7jXq 81gMZ5IbABcmjvENlA2OklcxIRkJVNQ6KZ94Gqoz6Eq+QITHTEiZK0gSURAUTx9A2lj7n gk5F2iphlc0fSY65NW8/na8Lu4gLC2bu5JVy+WOSFpMPU5N8uYKLkq9Y+COMcLRqVK0gN 1Nf2tQeExDlVh24qwQotIHO2HmDTmkSozNif2Ig/LP8UtLiQ6pQDf0sbvYKcKF8GbJw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795660273; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:Date:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer; bh=PlLPJEnikDumUId5OPUoeA0R2LExnIMK5NTAdtsyIQs=; b=GjHoaQMgrBBUK2Sc1WlvWLRZ1W96WtDQKjo+rTHdO9p10qxxYs2Fqcag3+3NmiRBK0Df MfBAt0E21pfd4bKxJMYYCxAMKlk6xGucI5SkLu12cfTqb7sJOe36opaxNhQFz4egirj/1 NGRjykwBlU6fUZlJfGHIVusjqRfxcLxQrRfmKq9U4/72qJjBi1efNcJ0oanjNy/5guV70 6R3BPbL3U3GENHDXk9q3QvoZIKkxnh+5jpCIjwnPXVwVqyB8xNy2GcwVUYT4RoFMCFvfb 0yvKjvzNy55cIVJPWfYMpZTabRyAAwrGTorfyRJkJ92zmPGroi88WL1F76YidgUOvWQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=QUB7LMUs; arc=none smtp.remote-ip=91.218.175.41 X-Received: from mta0.migadu.com (out-41.mta0.migadu.com [91.218.175.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E49C7606A6B6 for <netdev@vger.kernel.org>; Thu, 26 Nov 2026 02:31:12 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E49C7606A6B6 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: netdev@vger.kernel.org X-DKIM-Signature: a=rsa-sha256; bh=InHibhT9bQrLYoZnMNQjZvZLY7yEnp1XSGdpTAyLP2I=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1795660270; v=1; x=1796265070; b=QUB7LMUsxfpBIAMKZ7Bt8IqQ+eRV+YVKTMG1uMZHKjW8H3IlLgGI4o3SJ6RWn2tOvJwLOI8F 7O2ZZbuc8UNTImJxNGHiR3mFh9yhNXiJU+/hvnN2wkLRMLnj31EUuDx1TRbgz74jkAETUdp6FXo dydMPVf04TkZ4zUGuD5xmOUY= X-Envelope-To: netdev@vger.kernel.org X-Received: by mta11.migadu.com with ESMTPS id 2ca089d9032a043c; Thu, 26 Nov 2026 02:31:10 +0000 X-Mizu-Trace-ID: 2ca089d9032a043c X-Migadu-Flow: FLOW_OUT 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-In-Reply-To: <20261126-bond_broadcast_updelay-v1-0-188e5538d6ca@kylinos.cn> X-Cc: "jiangjiehua (A)" <jiangjiehua1@huawei.com>, Hangbin Liu <hangbin.liu@linux.dev>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Hangbin Liu <hangbin.liu@linux.dev> X-Mailer: b4 0.16.0