🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7292

Re: [PATCH net] bonding: fix missing down path on speed/duplex failure after FAIL->UP

#7292
From: Hangbin Liu
Date: Mon, 26 Oct 2026 00:56
38 lines
9967 bytes
On Fri, Oct 23, 2026 at 03:35:57PM +0300, Timur Stukan wrote:
> On Fri, 23 Oct 2026 at 10:48, Hangbin Liu <hangbin.liu@linux.dev> wrote:
> 
> > >  static void bond_miimon_commit(struct bonding *bond)
> > >  {
> > >       struct slave *slave, *primary, *active;
> > > @@ -2807,10 +2828,21 @@ static void bond_miimon_commit(struct bonding *bond)
> > >                       err = bond_update_speed_duplex(slave);
> > >                       netdev_unlock_ops(slave->dev);
> > >                       if (err && bond_needs_speed_duplex(bond)) {
> > > -                             slave->link = BOND_LINK_DOWN;
> >
> > Hmm, this issue only happens when link_state is on
> >
> >         netif_running(slave->dev) && netif_carrier_ok(slave->dev);
> >
> > while !netif_device_present. Should we set the link up when device detached?
> 
> 
> Hi Hangbin,
> 
> Thanks for the review and the suggestion.
> 
> A detached device is one way to get there, but it does not cover all
> the ways to hit this bug. In particular, it does not cover the case i
> reproduced: during inspect both link_state and netif_device_present()
> are true, but the carrier is lost after inspect and before commit, so
> reading speed/duplex fails in commit.

Hi Timur,

Thanks for the explain, but the same question to this patch. How do you
make sure the carrier is not lost during bond_miimon_inspect() and 
this slave->link_prev_state setting?

Thanks
Hangbin
Technical Details
Message-ID: <at6lTNHwA1V9Xja9@fedora>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351657-linux-kernel-netdev=dewy.ru
References: <20261022103821.89552-1-timur.stukan.linux@gmail.com> <atsRW-aYHeB-cEgi@fedora> <CAF+_u5Byu9BccKQpZ9VcXAb-fMEhpKAD9A65LktLDJ77ng+KfQ@mail.gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351657-linux-kernel-netdev=dewy.ru
From: hangbin.liu@linux.dev (Hangbin Liu)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] bonding: fix missing down path on speed/duplex
 failure after FAIL->UP
Date: Mon, 26 Oct 2026 08:56:44 +0800
Organization: Usenet Network
Message-ID: <at6lTNHwA1V9Xja9@fedora>
References: <20261022103821.89552-1-timur.stukan.linux@gmail.com>
 <atsRW-aYHeB-cEgi@fedora>
 <CAF+_u5Byu9BccKQpZ9VcXAb-fMEhpKAD9A65LktLDJ77ng+KfQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1185631"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:S5aavogf/9qAHAGb+Jub89lJhE0= sha256:BGxR40Y++Bam8CR34irBm37lv4h+q3jJ/QsXC5yBRks=
	sha1:CoCaixjiPLDdBCQ22uEjAc06Ywg= sha256:0S60ZT8mxYf4z8TuZVGE5/dR1Wc/cJgTzn1t/+vxUDA=
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 BC81B125B88; Mon, 26 Oct 2026 03:57:48 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 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.25,
	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 fxMj4RNHI-1M;
	Mon, 26 Oct 2026 03:57:41 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-351657-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 3F5CD125B87; Mon, 26 Oct 2026 03:57:28 +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 B8A2E27751; Mon, 26 Oct 2026 00:57:17 +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=1792976237;
	b=AXpZ3BqP/tAPVJzS+/5P9IqsbMmjr10nhyFnv3Rm2c5k6SEOwSaCi4EmsN6d4z9DQQx3
	 kvJ2B6BP4BvFIGofjR6uA5F5ra398wacO7ZlQ2atncPeXEFv5OdDr/cb0+nBOrTHOFkmU
	 gsz7/zBRC7+InDGL47BbGhAIRuHVdGhrPm10NXIXikASkIItAwCyobXE9wLuZz0FJOXV7
	 IyLFoTWj/1aaqpTM2EAts/dBkinukmNs7Ckt69+P4ULkeJmMaiIQAOHIu9BjWik6woPQH
	 vvg7GGSQJXVSmtcc4FRpPvOO98pdswhmcTF8hl8pjBDTz89oPIcTf+3n0qtXPRdv7MQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792976237;
	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=RLx2Ro+oXYG6Esl8h8Oz8vJrCiQY2x6fL9DTdSUob0M=;
	b=uwEKthDB3SsX/y5OmayY6b/Gkyw2ikoHLsFwzrbyciCK+x1DzQZ2ClUEbRZLQZ/30qms
	 LkP1pgLOUicffkyR+avim+8733jEyI2MUKAixe69lZOv4ojoUHST3dAcWIETEvNscCYHY
	 HqTEG3cgpN9EKfgvvjymdB7HzVlCW/DPOUUJVBQtne7ZSA/qPcBBvg4TPvGmRQbl5jFF+
	 CGxpRbiMqKG1IGOPjD22MhciecGa60JRJenZokPlxIWCPMkesaWpeCO5EbPoF/vuh0D3v
	 8ck02hmE9zc6laoTsIiPtVDOKx+K3HEhTJl8LO1KU0W6LQnGAJgGdjcjWAoG6QCia9w==
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=D3HVgW8u;
	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 09D1B606A320;
	Mon, 26 Oct 2026 00:57:12 +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=D3HVgW8u
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.34
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792976215;
	b=gJcWCG5gKhmv0TsflfOdT+tVPZQCyZiGgatfKW3FZYPzz5fw0ionLaV+nVTKCR5Z9zzq
	 wH0lxPa0964x7bY0e0Hj+CNhTRgRwBR9WjVOdDVAZKX2QA15uHL8lFEIL5xYBbBCpAse/
	 TyFOWDE9T+kWVI5oL/jAh8sGz5njU8iVX7amMVHFPO8Pq8Mq24JaIPmK3JAgHVhLcjVVm
	 mcTq73LDgL81Rwk/Af4V1ixt1uNKiwo1Pa0/Zxz+54kHwfL+qyaew4kcJHnA6d8P9cK0O
	 qNIqjPFUX0AiSNY4OcclJAGI2m0NpHZ/43nms211pANtB40MKFXm5AwJC0d5dJ07DLA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792976215;
	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=RLx2Ro+oXYG6Esl8h8Oz8vJrCiQY2x6fL9DTdSUob0M=;
	b=qH1fXoIRDvAKQkqR42PBcCBnN/FuOxKNCVO5xBWDV3cOWD+13vATNN72Zir34y3PdmEm
	 veYLtilFqYuv1C0tsh5549GuvWlsrDHTutvSX/Yd96lFfE0E1viGSOmaD5XYVYFo1MR3u
	 Il7pIEYa7eTtJhwBkK52vnbeQKgmg0QM66tLRCA2lbusYCOfscuSq9mqbx2uFRpY7I8ty
	 Z3FVnoSGekus5xs2u1hCdiot4U7AWZOgSEaIrAE2tThk/GDKcdgWtyfDbmeaP6tmQxe2j
	 6iJC2uPYO26a8tzYQvGTkh872V4Z3D7A+ppkPzOnWX4exp/rICvlz6jJs+PFMrM72oQ==
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=D3HVgW8u;
	arc=none smtp.remote-ip=95.215.58.34
X-Received: from mta1.migadu.com (out-34.mta1.migadu.com [95.215.58.34])
	(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 5E252606A31D
	for <netdev@vger.kernel.org>; Mon, 26 Oct 2026 00:56:53 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5E252606A31D
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=DhZfvcVUIAIZszQSJBwAYpMOK0X26Pzmzgl/OqwUSZI=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1792976212; v=1; x=1793581012;
 b=D3HVgW8u+Is1mGe+u+pOX/SkrZtonVjGkXjBIqj0GBsj+Rc8JDSpV3aWyYoVKQdhzmmU1+wm
 8r0ZVJ801W+QlSPfzu9ykiPFe7+evZWPLIcrsiCL4fXZHzHQN9fAE2VZrVh0Takx0cAQMGu14fd
 VAmXyfHnCnUf+9evqXJvr2zw=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by mta10.migadu.com with ESMTPS id 0f3592458cc6a98b;
	Mon, 26 Oct 2026 00:56:52 +0000
X-Mizu-Trace-ID: 0f3592458cc6a98b
X-Migadu-Flow: FLOW_OUT
X-Cc: netdev@vger.kernel.org, Hangbin Liu <liuhangbin@gmail.com>,
	Fernando Fernandez Mancera <fmancera@suse.de>,
	Jay Vosburgh <jv@jvosburgh.net>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Nikolay Aleksandrov <razor@blackwall.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>, linux-kernel@vger.kernel.org
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: <CAF+_u5Byu9BccKQpZ9VcXAb-fMEhpKAD9A65LktLDJ77ng+KfQ@mail.gmail.com>