Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 318E5C433F5 for ; Mon, 15 Nov 2021 14:53:00 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BF37863211 for ; Mon, 15 Nov 2021 14:52:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BF37863211 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1E4A8836A1; Mon, 15 Nov 2021 15:52:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.b="psvj0I8s"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EA6D4836C3; Mon, 15 Nov 2021 15:52:55 +0100 (CET) Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9884B836BE for ; Mon, 15 Nov 2021 15:52:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@walle.cc Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id A1F9522221; Mon, 15 Nov 2021 15:52:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1636987972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GBH7/y8iu3okK+OYkCsR8B/Rc2pjXQhpa9/YeNpv0cU=; b=psvj0I8sxMMfsBCaRq3fBsAqCtH1uHHgq1PLcfavm1NtW18HL9J9UYwwmKSSdR92LmCyKF sKzOz9Q1rQSGmvL4B5ZQyC2aVkoG6AJ5jLNNkrwYPRPr5Pd0bJGfr3kXrCjW1rquN2b6gD 4qvdr4F32QR7oLAoRNBa4upTpkCgAzk= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 15 Nov 2021 15:52:51 +0100 From: Michael Walle To: Wolfgang Denk Cc: Marek Vasut , u-boot@lists.denx.de, Grygorii Strashko , Michal Simek , fried.dev@gmail.com, joe.hershberger@ni.com, sjg@chromium.org, Tom Rini Subject: Re: [PATCH RFC] cmd: fix net list command In-Reply-To: <1646331.1636986670@gemini.denx.de> References: <20211115121152.3470910-1-michael@walle.cc> <32aff992-c84b-7b71-b412-7594c2a7d20e@denx.de> <257391f0-9d69-62cc-2353-8f4fc0751d7d@denx.de> <1646331.1636986670@gemini.denx.de> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: michael@walle.cc X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.35 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi, Am 2021-11-15 15:31, schrieb Wolfgang Denk: > In message you wrote: >> >> And again you're masking the error and possible fixes by linux itself. >> Seems like this isn't an argument. > > Respecting the explicit will of the user (i. e using what he > configured in U-Boot and passed to the kernel) is not an error. it > is intended and documented behaviour. What is the will of the user in this case? It is the will of the developer to make the board more robust. That is, if there is for whatever reason no valid ethernet address found, then there will be one generated. That is the sole purpose of the config option in question (or maybe I used it completely wrong). So from a user perspective, this shouldn't even happen and I doubt he is even aware that there will be a random one. (I saw Tom's mail and I'm not talking about the USB adapters where this might be the normal case.) I might come from a different perspective, but users ususally don't look at the serial output. Instead they look at the kernel log. And there will be not the slightest error, because u-boot will happily fix the missing MAC address with a random one. >> Sorry, if the original intention was to make "net list" work >> correctly, then why is there now such a huge fuzz around that >> CONFIG_NET_RANDOM_ETHADDR config option and why can't we just >> fix the error with "net list" and leave the behavior like it >> was for years. > > Maybe you explain what exactly the ``error with "net list"'' is, Michal mentioned it here [1]. > considering the fact that it is U-Boot which determins the > "correct" MAC address and passes it to Linux. And if the user > configures U-Boot such that a random MAC address is used, then this > _is_ the correct MAC address, as normally (*) U-Boot is just a tool > that does what the user requests. Only that the user doesn't do it but the board developer/OEM. I.e. there is no valid MAC address to pass to linux. It is really just for having netconsole running (or maybe you'll need networking for to rescue your failed EEPROM or whatever). I think, we have to distiguish between two use cases here: (1) make networking in u-boot work "somehow", to have a last resort recovery, esp. required for netconsole where the user cannot set the mac address by hand. (2) normal use case, where drivers simply doesn't have any other source for the mac address and need to fall back to a random one. I agree, for (2) the mac address should be passed to linux. But for (1) it shouldn't because it will just mask the error and any fall back mechanisms in linux. -michael [1] https://lore.kernel.org/u-boot/07b688d8-f05f-d11e-5e3e-e5454e1c9af0@xilinx.com/