Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1241700rdb; Fri, 9 Feb 2024 15:16:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IHychRcYfjicdNL8XyZIB//9olfWitI29ioF4aN+2/JqAYFvC8dE/THV+hSTYJAyGux8tZt X-Received: by 2002:a05:622a:cf:b0:42c:4dc0:ca36 with SMTP id p15-20020a05622a00cf00b0042c4dc0ca36mr778943qtw.18.1707520561289; Fri, 09 Feb 2024 15:16:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707520561; cv=pass; d=google.com; s=arc-20160816; b=A21dOohXdODNR9ZgzdrCUu2q7iqRf6+Xl5XR/UA2ifITfPdlFPqr0LbBZ1uN+5YvaO Eodb8oxZkkTPpbFUcX9rIfzlqGIF2jpt9TOvqiyKR1wuiuO2Vngsdbpj74O5iufKDUwl gLS7y62uT+se69wrmY4EdiyIjvVv96KDsBEqhcYmT3acwhSXdSoCwFmOTjCgXfl2rYal CpF0o3lVUdjLT1jMVYZQwSEKX44pm7e3Ubht5RdAwDCTAweZdHmslcafomFobvEPGTH/ Gib6RQV54VdkK2l6r2/xv69KCYIsrVIlPA9mD758Zp2hSVnejrHv3OJuUHaHRANpKjRQ 3J2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=u/CP1ufWlDiB0l15PSIj1o3J2nxONJTfw2pUGRmNMz0=; fh=d6ZhRYNpwFwKar7dQLijH41Z1vrNdwkf5DcyS/+Bfe8=; b=AjZ7VKiYh9ApX1rZq+QuEjMqW0qeJE484l1/phfLZ2mgz8DtzE/9TEqJKdaHSMTuqK F6qt6ZBi5IWyNki0NJLLEb3Xc64o1Kn24q3oh/TNJDxojuaVcltNFmb24JAvHMJH5y+6 W0JIpCVqqPwf8q/bo8ii2LN2E/oj6asFwVJL6/aI3uSfa2eSWkdNYI4ZnR/QBznL+1OD M/ZQkVDaRY1H9HoFONUssqAiX21SGy9mGph95mgOGLZxrRnRMv4U0ciVoJ6crafJoOAb wAr6/aqIjSSvYSqwAjmq2O4ss4+AsYYs6fd02AYCE4/xDJALu5hZRQQLbUL69jfL7NM7 B4tA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=davidv.dev); spf=pass (google.com: domain of linux-kernel+bounces-60140-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60140-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCUlhpolKIVaz2nZWdLQr0+j1kC0SGNbr/JSw6m1XfXOUbbhSgPR/FB+IGYCD/0FV031dNTq5G/HcKsyBCAfhjDUKvLNv39G4nY9GWrwYA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e11-20020ac8598b000000b0042c4e00deeasi3120712qte.97.2024.02.09.15.16.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 15:16:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60140-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=davidv.dev); spf=pass (google.com: domain of linux-kernel+bounces-60140-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60140-linux.lists.archive=gmail.com@vger.kernel.org" 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 DF22A1C22D20 for ; Fri, 9 Feb 2024 23:16:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 67A6538DD7; Fri, 9 Feb 2024 23:15:53 +0000 (UTC) Received: from davidv.dev (mail.davidv.dev [78.46.233.60]) (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 EB037374C1 for ; Fri, 9 Feb 2024 23:15:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.46.233.60 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707520552; cv=none; b=V1cMUOUD/dG1s70xOOMmHqQ0DePZ5MniQxdpFpEVCiQWdBlpeV/mnATpI6IYZKkQvQ3PyAotzyXYJPC6NrFoGHlIIoJg4gi2IgdxDj7pzC6dxZ8TfhsBjy1eI1PRkjeVKaGpKCtiVwsqJeZBvtosVVPntjnM8kSuGf7zR/jsL70= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707520552; c=relaxed/simple; bh=xEYmqoe0JpXF+8LCEEn18mFm7SSFoDzDPkuEOR2M26Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Bngff5n4E6oNTAnHQdDXN16NcoAi6tILcWo/xliaierNd8ZBxhV0X/U5PGSJcJvLsK91Zo2SQHxlprf1hqhUmwuVgxN7QWHkQgwZGQdQwWs10ZKkoI/Ceja9n2kjQWBrDOidysZR3kYJ66ezwpEFPZRfnpU21z/RFqVP3wemG5I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=davidv.dev; spf=pass smtp.mailfrom=davidv.dev; arc=none smtp.client-ip=78.46.233.60 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=davidv.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=davidv.dev Received: from [192.168.2.131] by mail.davidv.dev (chasquid) with ESMTPSA tls TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (over submission+TLS, TLS-1.2, envelope from "david@davidv.dev") ; Sat, 10 Feb 2024 00:15:43 +0100 Message-ID: Date: Sat, 10 Feb 2024 00:15:42 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] net: make driver settling time configurable Content-Language: en-US To: Andrew Lunn , Jakub Kicinski Cc: Jonathan Corbet , "David S. Miller" , David Ahern , Eric Dumazet , Paolo Abeni , Greg Kroah-Hartman , "Paul E. McKenney" , Randy Dunlap , Xiongwei Song , "open list:DOCUMENTATION" , open list , "open list:NETWORKING [IPv4/IPv6]" References: <20240208093722.246930-1-david@davidv.dev> <20240208095358.251381-1-david@davidv.dev> <20240209135944.265953be@kernel.org> <7485f0b2-93fe-4c82-95e8-5b0e10f9fa7a@lunn.ch> From: David In-Reply-To: <7485f0b2-93fe-4c82-95e8-5b0e10f9fa7a@lunn.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/9/24 23:11, Andrew Lunn wrote: > On Fri, Feb 09, 2024 at 01:59:44PM -0800, Jakub Kicinski wrote: >> On Thu, 8 Feb 2024 10:52:29 +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. >> Please CC folks who gave you feedback, Andrew's is missing. Thanks for the feedback, still learning this workflow >> >> Andrew, what do you think about just removing the wait? >> Or decreasing it to 1ms? >> It feels a little wasteful to be adding uAPI for something >> which as you said is likely papering over ancient bugs. We'll >> fix the bugs which are still around and the uAPI will stay >> forever :( > My guess is, the broken drivers are doing setup stuff after they call > netdev_register(). > > Reducing it to 1ms will probably continue to hide such bugs. So we > could just go with that, and probably not see any regressions. Or we > can decide we really do want to know about broken drivers, and just > remove the delay. > > Either way, we don't need a new uAPI. Would it make sense to move this to a build-time configuration flag? I do not have a gut-feeling for which behaviors should be configurable at build vs run time. > David, is 1ms too long for you? If we do take the delay out, you are > going to receive some of the flack from regression reports. I've used this patch to experiment with different values, and the sleep time behaves as described in Documentation/timers/timers-howto.rst, that is, a call of `msleep(1)` usually delays boot time by 12~13 ms in my tests. On top of this, I'm running this specific example on a no-smp systemm, where I do not believe the `msleep` achieves anything (but I'm a kernel newbie so please correct me if I'm wrong). > > Andrew >