🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #22861

[PATCH net 2/3] bonding: update slave array on link change for broadcast mode

#22861
From: Hangbin Liu
Date: Thu, 26 Nov 2026 02:30
43 lines
9925 bytes
From: Hangbin Liu <liuhangbin@kylinos.cn>

bond_miimon_link_change() rebuilds the slave array when a slave's
link state changes, but it has no broadcast case, so broadcast only
rebuilds usable_slaves on enslave/release. bond_miimon_inspect()
then derives ignore_updelay from a stale snapshot:

  - if the last rebuild ran while no slave was can_tx (common for
    batch enslave with updelay, since new slaves start in
    BOND_LINK_BACK), the snapshot keeps count == 0 forever and
    updelay is never honored, even once other slaves are usable;
  - if the snapshot still lists a slave that has since gone down,
    ignore_updelay stays false and updelay delays recovery even
    when the bond has no usable links, contrary to section 13.1
    paragraph 4 of the bonding documentation.

Add the broadcast case so the snapshot follows link transitions the
same way balance-xor does. This needs the revert of 45fc134bcfad as
a prerequisite: with 45fc134bcfad applied, bond_set_slave_arr()
discards the refreshed array for broadcast.

Fixes: e0caeb24f538 ("net: bonding: update the slave array for broadcast mode")
Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
---
 drivers/net/bonding/bond_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index d6675e87d06b..b1efbdf597ec 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2780,6 +2780,7 @@ static void bond_miimon_link_change(struct bonding *bond,
 		bond_alb_handle_link_change(bond, slave, link);
 		break;
 	case BOND_MODE_XOR:
+	case BOND_MODE_BROADCAST:
 		bond_update_slave_arr(bond, NULL);
 		break;
 	}

-- 
2.56.0
Technical Details
Message-ID: <20261126-bond_broadcast_updelay-v1-2-188e5538d6ca@kylinos.cn>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder2.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371825-linux-kernel-netdev=dewy.ru
References: <20261126-bond_broadcast_updelay-v1-0-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!3.eu.feeder.erje.net!feeder.erje.net!feeder2.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371825-linux-kernel-netdev=dewy.ru
From: hangbin.liu@linux.dev (Hangbin Liu)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 2/3] bonding: update slave array on link change for broadcast mode
Date: Thu, 26 Nov 2026 10:30:56 +0800
Organization: Usenet Network
Message-ID: <20261126-bond_broadcast_updelay-v1-2-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="361663"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:nLtTWM6Aje0Ie5HzpDpv1MZguZ0= sha256:vKgRYw1yjYHULF68GZl1h/j5ULRkCGYdJmXFej3y0Ug= sha1:RkCuNDErc8lPWfz1CqLOI9WBU0U= sha256:Zv9cvIq2I9YMOhNfpE3vCJp300rzmu3GfdJf5k1FOFU=
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 E1F93125EA3; Thu, 26 Nov 2026 05:31:47 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.15
X-Spam-Status: No, score=-3.15 tagged_above=-9999 required=6.31 tests=[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, URIBL_BLOCKED=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 EFooSZ7cKxv3; Thu, 26 Nov 2026 05:31:44 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-371825-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id A3C06125EAE; Thu, 26 Nov 2026 05:31:36 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 3ACF1603717; Thu, 26 Nov 2026 02:31:36 +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=1795660278; b=lb7mjowsFRgJsn7NzCYyGpZYDwniwfpRHeJRhJ5H7wmtLFXOH59Rb9dl61WFbgE3ilhM O/QjDk7gQoJcCBSJBsOvrD1nErTkGxzfadu3aiLMMSXQr4XqH6w8Ed2uWTrHUxgcuyqa9 8T7hpvoedluUVzMCgW2BTQjPM83mGrVnQT/s1Bop3V1A8pd0y2QROKQ3/RuKrcBDHIXJO ba62ULt/Z9jMRvaa44eFKk7ERDI2Ef3Gs1PMZuzsIBnmULkQ68WYp1Jv2nGL0FhsECK9y XrRUg+tJ86xDyM69mqVz0cdjAbB9uT/H+fy2b/czECBtRi/cUbt559+IjHE/PA78jwg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795660278; 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=x6RnEWdTYTK7Xk1wAs9uasJq7hXDNS8kQYggB9k9i20=; b=HOzp44zKlLRizEHJ78q3iVbSw2KFYnS5uX48dUcABoTY8Y1aWCMCrdBngQJ8Mt7gXFGy Db7RDbmnhA1MrDanjOoUWQYASDWQbs3eIHlVlFVMI3Z+CI3rVA80aGw//bipZBui3MJEI gRyafd/lrLm20Xm53XIeVX/0xNcP3ZmJsVGfJlwYVzmpZKyGCCCrM2YKHK+J1TUf6z18o DMUZvgQQr6xs792XfXoWXE9QXhqmj4grWqlYSGgMNjUQ12I5ZXvz/B1QWbJXe4So0/INX Ffyty7cKUuS0xfO9/FbIbrne7H69uMUvAls7l8A+luvW1oSGLSvhlj6ucRu1n+3l1bw==
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=lip8aObz; 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 9C8DD60A261D; Thu, 26 Nov 2026 02:31:18 +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=lip8aObz
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.46
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795660277; b=c23KMGur/QV1b6CQrULdr2evfnrLQe2LuYHMrzeqefCiZryGkktAUD0kXexVuwFCGdU+ qPTXGfuM7m6N809YJmxGNMqDkfdUnVEajwVeJf61xEJLLBW+TVZGTN6+/05pF6S1qPtrW qiUvxTm6AX+R/w+YQKiUT3q6GVvug8rpBwxefmom2WNwSwzV2cak8GYUuwDwy8QJxggPV 9fj8S3t0QruA+MOHmRgSIUQ5xTBsXMwCAWSAAJJrxIHf8Q/uoAZJVeaK042fXZfVPbbRK wKP3lLV/aHYlmd8eR+PUYTAW0l9cHHy6tMMsQF0QDYuUcjgYgKLllAFrmbRMgQb+JSA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795660277; 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=x6RnEWdTYTK7Xk1wAs9uasJq7hXDNS8kQYggB9k9i20=; b=4D167f542Ete+f/KQ0pDoKjAc2xILPZ79LhSvBkKtSGt6pqJ2V8HcAZVTa8gVCd8nrlx kjPcJwbEQ7UPRbPdAny0xrHo3yD0NB6rGSIcniLy+rjSCBNb5G0JSUISYdqQafrdtg86s TP7avQGf9bDwgdEsFNpzc8+ld2RFiaDKgfUcJ9J9Qza+8mfhTCnCkOVOgXS8b5QUCnY1l 9QbwRG/i5Sn9cVFUpRrO4gVk/ChOxzhd0SShpzfxHWljr0uNKnMY62cTId0B4POImvEa5 ohM9LKEjaX/SE6xU3iJNYhMGOSLFYAPM8JzM+47NeOh0GdR7BeUDVtmptddtxqnmd8Q==
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=lip8aObz; arc=none smtp.remote-ip=91.218.175.46
X-Received: from mta0.migadu.com (out-46.mta0.migadu.com [91.218.175.46]) (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 26EC8606A692 for <netdev@vger.kernel.org>; Thu, 26 Nov 2026 02:31:16 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 26EC8606A692
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=B95j5ov9JJOnmmZbalvHGaiXevFwCPV/nXL1BTEaITM=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1795660275; v=1; x=1796265075; b=lip8aObzsujux64pIdTlFAEp29ewtAljnU9YBt06ykMCL2meMp1CPXYna5vMJEI8vuTxkVwF tSHMl5jyZWL9i20FfAZolpa/Uwwg3R5+pcoKfKSRkYWPUidTpLoqOdfskox0daMxst15j6266jx HenOW3aBhiQfjmcDtv/ajmd8=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by mta11.migadu.com with ESMTPS id a17f42b5aef994cf; Thu, 26 Nov 2026 02:31:15 +0000
X-Mizu-Trace-ID: a17f42b5aef994cf
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