🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #15628

Re: [PATCH net] selftests: bonding: fix failover race in bond_options.sh prio test

#15628
From: Hangbin Liu
Date: Fri, 13 Nov 2026 05:59
57 lines
11029 bytes
On Fri, Nov 13, 2026 at 01:23:40PM +0800, Hangbin Liu wrote:
> Hi Pin-yen,
> On Wed, Nov 11, 2026 at 05:46:18PM -0800, Pin-yen Lin wrote:
> > The prio test intermittently fails in the arp_ip_target and
> > ns_ip6_target variants:
> > 
> >   TEST: prio (active-backup ns_ip6_target primary_reselect 1)   [FAIL]
> >   	Current active slave is eth0 but not eth2
> > 
> > The ARP/NS monitor marks a slave down when it has received nothing for
> > too long. With arp_interval 100 and the default arp_missed_max, that is
> > about 250ms for the active slave (eth1) and 350ms for a backup slave
> > (eth0, eth2). Every 100ms, eth1 sends a probe: eth1 receives the reply,
> > and eth0/eth2 receive a copy forwarded by the gateway bridge. Once eth1
> > is down, its probes reach no one and no slave receives anything, so
> > eth1 normally times out first and the new active slave is picked by
> > prio:
> > 
> >   t=0    probe: eth1 gets the reply, eth0/eth2 get a copy
> >   t=10   test sets eth1 down
> >   t=300  monitor: eth1 idle 300ms -> down
> >                   eth0/eth2 idle 300ms -> up, eth2 picked by prio
> > 
> > But the test takes eth1 down right after bond_check_connection(), whose
> > ping replies only arrive on eth1:
> > 
> >   t=0    probe: eth1 gets the reply, eth0/eth2 get a copy
> >   t=70   ping reply on eth1 only
> >   t=85   test sets eth1 down
> >   t=300  monitor: eth1 idle 230ms -> still up
> >   t=400  monitor: eth1 idle 330ms -> down
> >                   eth2 idle 400ms -> down too
> > 
> > eth2 can then no longer be picked. eth0 becomes the active slave if it
> > happened to receive some other packet (e.g. an MLD report), otherwise
> > whichever slave comes back first does. With primary_reselect 1 or 2,
> > the bond keeps eth0 even after eth2 comes back.
> > 
> > Before taking the active slave down, wait two monitor intervals
> > (200ms), so that at least one more probe is sent after the last ping
> > reply and all slaves last received that probe. The miimon variants do
> > not need the wait, but the extra delay is negligible.
> 
> I'm afraid the waiting time is too strict, especially with a debug kernel
> since delays can happen.
> 
> Bjoern is also fixing[1] this issue by pinging a non-existent neighbor to
> keep traffic flowing. Would you like to test whether that works for you?
> 
> [1] https://lore.kernel.org/netdev/20261104142018.552135-1-doebel@amazon.de/

BTW, using ping may not able to triger the arp request in time. You can try
arping instead.

Thanks
Hangbin
Technical Details
Message-ID: <avanVkILHDYdpond@fedora>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362445-linux-kernel-netdev=dewy.ru
References: <20261112014942.2946303-1-treapking@google.com> <avaewOJD7tX1UYfE@fedora>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362445-linux-kernel-netdev=dewy.ru
From: hangbin.liu@linux.dev (Hangbin Liu)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] selftests: bonding: fix failover race in
 bond_options.sh prio test
Date: Fri, 13 Nov 2026 13:59:50 +0800
Organization: Usenet Network
Message-ID: <avanVkILHDYdpond@fedora>
References: <20261112014942.2946303-1-treapking@google.com>
 <avaewOJD7tX1UYfE@fedora>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1292204"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:qgOyyKLdEzEjOZuX2wJX9wVS9xY= sha256:Tgmc7z3fqocGOhK1M0Y93RaAvwAk4/KGLe3qd0de6JI=
	sha1:gaGSjnS5gIevm3zUjkG+50hXyTI= sha256:xpZDg6+7HTOJRR2vyV59BEyBjTplWgcn9/UwHn9CiRs=
Content-Disposition: inline
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 6AB2E1144B9; Fri, 13 Nov 2026 10:58:11 +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 MyuY37rsk5dT;
	Fri, 13 Nov 2026 10:58:06 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-362445-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id D7D75114382; Fri, 13 Nov 2026 10:57:57 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 79AD62330C1; Fri, 13 Nov 2026 06:00:13 +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=1794549610;
	b=vDKbth9yob715zZ/nXcHLfducEWaN0P6eDVcEz6mag5+8rjkbT8W429lG8snAXpYwhy3
	 nagaPxvdYLoQrUMeVdqlXHzVs26u2wsbZJ9PriHVU71oDdswlOj6sVXZSGiKFrO/3gFrG
	 RMXqFT1ZemFnpb9N4MCEsvqv/Fc/TQLSDIBfSm8qzo74ecoIU6Zqd9fo7typTHXSK2DiY
	 OAONAmOPFZQsxlCanubONOlo8GCGx4R+/ZYfb8r3PHsB6sZ9IoUARIO9pTz2SyPHDbJCP
	 Q6g62uPWlm2XHKMCH7ZgZjSyKC2cvr4qqRlZWKS5A1JOuzbglQOUT4c/L/OmJrm9EnQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794549610;
	h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature:
	 X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:
	 Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=EUL/aitfrfcM+1FPige7nV2S2I8JxJoAUHGZmHuZsgI=;
	b=RYyC1ckuSvtiLBhL+OV6gN4c1eGcAYot+xDbUVpvJvaWj6UQ3/WoJtCPPMKrnQnUDqV1
	 5wH4YongwB2coVkOpjNzEQ6bfc2qiqIAbUiTN7Zyn1WrinvTfMDczpCzTDPK2CvKlzXrv
	 HV/Z+L6Ua/Qxu+hcOtci41ICEkjaI3DBOVaVamdZc3NDFZ7owU51/3EEW+fopMlyNldrR
	 O68c2oAV6Jcutr8S3MdojfljMJqwO9rKZ+htIZtrhsUNp0gwGx8IyfDHoA9XFtmpqnJSZ
	 ms+T+dQd6LLKytgTvuncvH2brGehlK+GZ/SfjdMpfMwaD2iP/I6OQj1Ok4L6oSiqUGA==
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=iO0RfYFP;
	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 5CBF8606A327;
	Fri, 13 Nov 2026 06:00:10 +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=iO0RfYFP
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.224
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794549609;
	b=SFMW2+mzyf2etH9BM28kti4sIkOf5a1PI78Ueqf4r9R5ZtT+jviVCcLanUziP5+jjsZn
	 1/z9F42Xrz/iHJLiBGn8K+1Qry0Dfo8elJ9h7WSZNUXd+a0EkqfsuOjyltyRIlH3tDGXa
	 JF/dN/nEReHuE6N1HvhUQGknfx3lBEW/ZMY+x6ZZYMQBpnxiHmwS9sqIjOeV7Ge4hc+92
	 9AqcO6Rnu9/g4PtJRh0Mpd25KP+PWOP281C3rh95iw6P9cNQlNiMdm26/coL11YpNdV6Y
	 BA9y35p3vZNz89n3m2KwPp71dlPSyyNTWqZhKJhqIGpYoOTuMrucJvYJncCuYRLuf1g==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794549609;
	h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received:
	 X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:Subject:Message-ID:
	 References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=EUL/aitfrfcM+1FPige7nV2S2I8JxJoAUHGZmHuZsgI=;
	b=pEFsO3UxrUX2CUYfwJGiC7jhOCV2w2lsyZbpSZY1Kz+VILI0LfpQ3KXi5PCz/mzOGhpX
	 v4XnaTdq/czwE7P5EGi2SWtS1XAQ12Ty9XBJAb9ERLzohuFlArCAd6fXOk98E9RS/LBLE
	 5cxJsh+2xNO42QzcOLz28+F+4CXtQwNQMg4kecfsE1+qALpK1J1xL0iK14XENutpqYtIn
	 0Kbc7nja4mNdJngo/cOJ1+o4xQ0pxCOotDD22EbhLXKkIIHjoFpKtg1H6jz4Etalt/xWi
	 5gYLtHOLClypiMpWWaVd8UeOioKS1DyxqqUnKtRfKNY0hXhRG1GZIfokAd3S6tpHm0Q==
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=iO0RfYFP;
	arc=none smtp.remote-ip=95.215.58.224
X-Received: from mta1.migadu.com (out-224.mta1.migadu.com [95.215.58.224])
	(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 58BF8606A31C
	for <netdev@vger.kernel.org>; Fri, 13 Nov 2026 06:00:07 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 58BF8606A31C
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=1shkp6ga0nLVFcW3TwDYwwcGH+hW1PeCl5r+sJWDuUM=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1794549606; v=1; x=1795154406;
 b=iO0RfYFPG97y9HZmu9OO1xu1ajZ/BA/0EsxCmoC1yesK+6jn+JLZM/wR3xYz4/1Qvk9ToqGy
 PJ9u6VbkX18iA1f9EjYYfGtknyQTHmGDSShieuvo8lFGUgVH1Z0j4d+0c9YCSDhrYfE2ySalY7b
 T66PS43WiYbTCrNpam84iPsc=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by mta12.migadu.com with ESMTPS id ec24db99b47d8887;
	Fri, 13 Nov 2026 06:00:04 +0000
X-Mizu-Trace-ID: ec24db99b47d8887
X-Migadu-Flow: FLOW_OUT
X-Cc: Jay Vosburgh <jv@jvosburgh.net>, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Bjoern Doebel <doebel@amazon.de>, Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>,
	netdev@vger.kernel.org, Matthieu Baerts <matttbe@kernel.org>,
	linux-kernel@vger.kernel.org,
	Jonathan Toppins <jon.toppins+linux@gmail.com>,
	linux-kselftest@vger.kernel.org, Hangbin Liu <liuhangbin@gmail.com>
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: <avaewOJD7tX1UYfE@fedora>