Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2667947rdb; Mon, 5 Feb 2024 13:50:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHBs2Y6z+1tU4wHyLQS1C19CqhDLQ1xHsNDoKYctLgZoi9Mzopa3BNaz3+2Aw3FsfjbmhLU X-Received: by 2002:a05:620a:cc3:b0:783:2516:58c8 with SMTP id b3-20020a05620a0cc300b00783251658c8mr698931qkj.19.1707169831583; Mon, 05 Feb 2024 13:50:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707169831; cv=pass; d=google.com; s=arc-20160816; b=K/yDc1bG471huUZjHzRL7dYf77v4SMkM7Vn5ha6ADRJDn5E/CD/5Xx/rxfM8bOGgwA XO4eahAEgUcSLxJX/yRqoG+jf5BJEXMjDg6LQ3z/AxYWtusUs2TeF6ufGfLL7HcAsezX w8c2MWwnKosi2QqR9/QBZaXQ49NzQvK7WZuXys/6Ih+kuuRrvgP1DEt1liKfss+Q/Znh u3JYsepKTZ9YE3CoryvP4WF5/TwR22wDXBg6MaP/x2opWUjMe6RnzXYfugfKytLMmocm F2+Oi6j4l2AaQSME1F45YVybVQRq+AtjqaSF26fPxsns4yezooymGadZFccxWzRYbXai 6jbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ybapUfqzuvYYWTklz2FUq3Tu24rh2dOO9XsrfWbS7YY=; fh=ActOVV4OnPz11R240K8U/AWAeiLpVmJIAKf1c5iDudc=; b=xS3XfDAW2WltFLEL0awN5+ZUolFpwlKcmf8dmL7ZUy4GZhfbLMohZ9c+Prlo5o7Ut+ 5LBxybo/qI/xwGkIVohYXGwcSZlC6NkwX5QCHv+PunD7o8pbdX65kAix0TDo48t2PUGl ileucAc1Q8vxMhcEkTzxlfdC4V0XtwlOXkSHlzEE0lcFp1PKYi0qZTg/xBNMPLa8Zngy 1jv96w66TNsH3cI9CH3JUUv2PKcr83LD14vDSSOCcNSjwSwJV6qbK5P4b19sPT20wLLn iFTFoV+mubmmcjSQFSfFOY4zYeTyICao66eDTPAf/AzBwT/CreotlTQ5tDVjgYA1+kaB 45fg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=TnzMcBJ1; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-52886-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52886-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch X-Forwarded-Encrypted: i=1; AJvYcCXIwjOdvhfKD1xu/9NSzPHoWxtcSkzWUd0Cis7e4vLGG1b3CYy4jtytMy+qpJliBDgL+UOM4QEw2bFgH833IUhVaod3mHMzzQhEjpfTrA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y8-20020a37e308000000b007855bec5d7fsi806162qki.187.2024.02.05.13.50.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 13:50:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52886-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=TnzMcBJ1; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-52886-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52886-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0A6C81C234C5 for ; Mon, 5 Feb 2024 15:20:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E28DB2CCD6; Mon, 5 Feb 2024 15:20:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="TnzMcBJ1" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E4032C84C; Mon, 5 Feb 2024 15:20:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707146437; cv=none; b=BH5aPoY/cpDReaF6NaokJ8PqLMUPBPlPNR53VDhucFHo2XIIL2BpmQkkT/JT4CPNkObJ/iTJKzt4hkEnktOUEu1E4DMB+baH0X5/xCc5lNJ8Bwhzgc79uPfIUzp/d+uZ2fwlkTpqaAVGIbtikTKoWUQxTWmDDbawWDU8MM7vXcI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707146437; c=relaxed/simple; bh=hpLodnPFTzGDmybN3BEWyUWqwYKKEqaVJLjW6ZG61sY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oRUuobislM3FIyyDhaPy7IkF4L5SscKaHz86uide0zABHMc6Z3SlFqY2G52gZAkWNAq5IXmTzXUqzAph58rCCUloczPou6x57HfrY5ceJrCA5ZiC05Hoh+oiKkLo2BNqSAKEUoPLvADcOeVT8P0CE32MYpfNDvmfm1P72m6uhvU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=TnzMcBJ1; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=ybapUfqzuvYYWTklz2FUq3Tu24rh2dOO9XsrfWbS7YY=; b=TnzMcBJ1FcNgRR3WOsGVIUTGQu wsTRA8QaiF3Yhfo9HyugD5whR5g6esiNWH5+KDEozZKCZ7J1/JsCrMUsapyy1dEIyOdmSavTUyahV V2MhL+OCk+UUdgoMUmyOu+aY0nwZczlEyP2G8VylzZjzxrVxzqZDKgwr8/gZXQ3+5jcc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rX0lg-0072dB-IZ; Mon, 05 Feb 2024 16:20:20 +0100 Date: Mon, 5 Feb 2024 16:20:20 +0100 From: Andrew Lunn To: David Cc: Jonathan Corbet , "David S. Miller" , David Ahern , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Greg Kroah-Hartman , "Paul E. McKenney" , Randy Dunlap , Xiongwei Song , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] net: make driver settling time configurable Message-ID: <580001e3-17ef-4f24-8fd8-bc14110e874e@lunn.ch> References: <20240205114609.440597-1-david@davidv.dev> <1e08910b-8ae2-4985-8423-45a1a823cefc@lunn.ch> 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: On Mon, Feb 05, 2024 at 03:31:38PM +0100, David wrote: > On 2/5/24 15:06, Andrew Lunn wrote: > > On Mon, Feb 05, 2024 at 12:44:40PM +0100, David Ventura wrote: > > > During IP auto configuration, some drivers apparently need to wait a > > > certain length of time to settle; as this is not true for all drivers, > > > make this length of time configurable. > > Do you see this problem with multiple drivers, or just one in > > particular. To me this seems like a driver bug, and you are just > > papering over the cracks. > > > > Andrew > I don't know of any drivers that may need to wait -- I noticed > this code path being hit when building a minimal kernel that only > had a virtio network device. > At least for the virtio device, the wait is unnecessary and bloats > the time to boot a minimal kernel from 15ms to 33ms. Looking at the code, a delay has been here a long time, since before git. However, 2011 the delay was changes from 1 second to 10ms. There was a discussion about this at the time: https://lore.kernel.org/netdev/1305696161-18277-1-git-send-email-micha@neli.hopto.org/t/ It was said that ARP and DHCP retries should recover any system where the first transmit/receive gets lost with the change from 1s to 10ms. Maybe after 12 years, its time to try a default of 0ms? I would suggest that is a second patch, which is easy to revert if it all goes horribly wrong. Andrew