From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA0E123EA8B for ; Tue, 3 Feb 2026 03:24:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770089057; cv=none; b=CLYi01ahlcguIdq1VrGyQuhT3pqpUQLEqkdT8J3KHioTfaEIAO4zRxa8uk+5ALrL00cCElTnhJIMwU81crn+huYvUHGdQOrc/aEYW8lz4xxgi87gjcCMdvN0tCoocfdR7UBJVxE2xZAslWeeOnYCxT40tWp5DQF51IpeyuwRDWM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770089057; c=relaxed/simple; bh=s2/NiPRF8pByV42uHHuUV6Cd8yTO4MG04MmcjvnU9cU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Qdzur3Ekd54Ga/Im0FzpOqjrWVZbWSWNpUdh1O8FRUfljGqbxRONQfaKJYs/Ts0cn6Igj/ckqKocpEfNCKrOhNrfJzqbnjYK4v5EpjXBTtHucfrHu8lEZT+5zezsr1bmeXsNkl89DFQ41UrEUAc7QoIkbEeVnMPXv44qxaLjQD8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Qn9d+Gta; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Qn9d+Gta" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2a79998d35aso34551475ad.0 for ; Mon, 02 Feb 2026 19:24:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770089056; x=1770693856; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=iHSPOirFIFdpbKmf5I0OdBd45CTjYQzdFrAVFSsykfE=; b=Qn9d+Gta1W/CLBKd4m3e3jaiOg3oacEuN7tLI0WvuqzmfCrswsQKos7iDATbRlvYXl /mNXpU3vLGKu4dTgS2ZCrKS1Gkrnok2EnRYY5P3YCENu8rp7LY7nh0AOyYjO9bEN1Uyo 20G6sgZ6QqGC9MR7zZA8sMgx/p7OSDFFM0wqLduHTMz6Xer1I0heSEFGcER3owVHnTpa 4r9PNw5CpSiMomxT2BQtukf171aLpHgTjxZf+8ZLGIe2F/RpfqD1opMDtnC02oQuBPaO N6IckaXb/87E67QDxPghc6G8Bni3l63odc759Aj9YEBPbtKgMVJ4u03JjDQRRgoLZYAH koBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770089056; x=1770693856; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iHSPOirFIFdpbKmf5I0OdBd45CTjYQzdFrAVFSsykfE=; b=AM2fqHDr+6COLywdzYJfgNXki0JH/I/ohqb8x/55SQ9ToB8+burSCu1/FLaVciAb0M ygKGTpGUqZVzDUUIMxWyt6cWW8ikeYfZyEXyZ294s4Yfp67G/5mhrYpGfTU0biDvwiJB Sk4FNn9Rg+8QyYh0i7LLd7L/q6oHNiP2uWqh0w9txxlDGqLmI9n2qathDxq8Vt/EtHgE c9BGwpZ937uRrFDYZY+KhkxoHb+fQFR9fRpsm2wTP5t76MVK2i5P25hBBwma/6/oLm1a 6CPvJLkU46IlC55FAbkChGSYz8WBRbuivkueJ5z0vsqJAQOf4aSqvGbR2+hAQMZGBTd8 Ehiw== X-Forwarded-Encrypted: i=1; AJvYcCWnZ58NXW7e+oI4y4Io/J/Pq6Vbqz8r3nXdxI6+NOA2x0FVMplUHF1hZ0e0Uz6dLs07BplWVBDs2EOhgZA=@vger.kernel.org X-Gm-Message-State: AOJu0YxVw6i0u0RYR2iys3dDAcYVnapT2anXoV9JIoVhuas50BM3YGW5 FwLaiJCeCMgOD69GFREu8AJlOwFyQtRYmRg33tysaGSHbvch0JXIfNco X-Gm-Gg: AZuq6aId4sEjJ07rjXZ/rt8PQvL50Muh8wR3ZOhb2LHiH2uzmxO09LLukQ7EzDbwKvx 9aFO9qs2NtB76GdnKTQBGuQe4Nmf+Xv1XnqVEeahPYKQ0z/MqVs8oDTsVgT+MrY/o7bOpQWywye n8Ccla/h3VCyQFjtS86IJVzo4rKol5OIIRaX1v9pc8Z/ZUVkH06BpKQDHrFdKMnX25YnYkAOlIk YCRMX6N2O6sx/LWx8YD5DYmqxIgeAQFT0mczRlh/zrglDFs1nz7QgAlkYQcfP0VIZrjPZJaQ7Zt CZeIPrxMP4JJM2vLrhwC5bEgnCatAcL18eGiDUFgoqJilZWBv7J00u2vvK10Ka0OMqGHhRBF8H0 RV1MSqpKynTktjM1pyO56j02SaHiMgvyZkOMVDMVWRCsLAaNVm0dQjMy9uJf1ZrMS9lXSMlKSCn 8mxn/rDk6IumMj3lM= X-Received: by 2002:a17:902:e886:b0:2a9:2858:19ad with SMTP id d9443c01a7336-2a928581f05mr3998675ad.49.1770089055954; Mon, 02 Feb 2026 19:24:15 -0800 (PST) Received: from fedora ([209.132.188.88]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a9295c2ee6sm1283485ad.2.2026.02.02.19.24.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 19:24:15 -0800 (PST) Date: Tue, 3 Feb 2026 03:24:09 +0000 From: Hangbin Liu To: Thomas Bogendoerfer Cc: Jay Vosburgh , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] bonding: only set speed/duplex to unknown, if getting speed failed Message-ID: References: <20260130111904.144024-1-tbogendoerfer@suse.de> <20260202151726.36abe1d0@samweis> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260202151726.36abe1d0@samweis> On Mon, Feb 02, 2026 at 03:17:26PM +0100, Thomas Bogendoerfer wrote: > On Fri, 30 Jan 2026 12:36:19 +0000 > Hangbin Liu wrote: > > > On Fri, Jan 30, 2026 at 12:19:04PM +0100, Thomas Bogendoerfer wrote: > > > bond_update_speed_duplex() first set speed/duplex to unknown and > > > then asks slave driver for current speed/duplex. Since getting > > > speed/duplex might take longer there is a race, where this false state > > > is visible by /proc/net/bonding. With commit 691b2bf14946 ("bonding: > > > > The patch looks good to me. But based on your description, I don't think > > the fixes tag is correct. > > the race is old, but it got visible by that commit. Before > bond_update_speed_duplex() was only called on enslaving and when bond > is brought up. Now it could also be called during normal operation and > that's what caught attention by customers. > > I'm fine changing the fixes tag to whatever we agree to. So which should > I take ? Maybe 98f41f694f46 ("bonding:update speed/duplex for NETDEV_CHANGE") and 589665f5a600 ("bonding: comparing a u8 with -1 is always false")? The 98f41f694f46 set speed/duplex to -1 by default, which could cause the race to show SPEED_UNKNOWN. But (slave->duplex == -1) checking is always false, so no possible to show DUPLEX_UNKNOWN. The 589665f5a600 fixed this issue, after that speed/duplex both could be shown as UNKNOWN. Thanks Hangbin