From mboxrd@z Thu Jan 1 00:00:00 1970 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 A8911C433F5 for ; Mon, 15 Nov 2021 12:24:45 +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 851F76324D for ; Mon, 15 Nov 2021 12:24:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 851F76324D 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 16415831E9; Mon, 15 Nov 2021 13:24:42 +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="cLMY/C8I"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 88EB78069C; Mon, 15 Nov 2021 13:24:39 +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 679D4831E9 for ; Mon, 15 Nov 2021 13:24:35 +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 7483022221; Mon, 15 Nov 2021 13:24:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1636979074; 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=mmHxtF5Pk/CjfUi5iCXlnTh8vICqttAiR79HGPtpUvg=; b=cLMY/C8IwnuzgxFANETVtP49IvNnaC8c2Yd0YnOy2b6akdymSP5YdoJr4SIRjV6P7gIxGt s69y6IrXJ7eS84/J6wLtB23XdXG1z9eZA0G78Wj7LpyPHz8RY9n+Umy8PGtRBL4BUpMNJA NzABMdaSCmadoDZkBoHn2VhiOS8kv/k= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 15 Nov 2021 13:24:34 +0100 From: Michael Walle To: Marek Vasut Cc: u-boot@lists.denx.de, Grygorii Strashko , Michal Simek , fried.dev@gmail.com, joe.hershberger@ni.com, sjg@chromium.org Subject: Re: [PATCH RFC] cmd: fix net list command In-Reply-To: <32aff992-c84b-7b71-b412-7594c2a7d20e@denx.de> References: <20211115121152.3470910-1-michael@walle.cc> <32aff992-c84b-7b71-b412-7594c2a7d20e@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 Am 2021-11-15 13:15, schrieb Marek Vasut: > On 11/15/21 1:11 PM, Michael Walle wrote: >> Don't get the MAC address by the environment, but by the platform data >> of the udevice. This will fix "net list" if the MAC address is >> randomly >> generated and won't change behavior when linux is booted. >> >> Signed-off-by: Michael Walle >> --- >> >> Hi, >> >> this is a proposal to fix the "net list" in a way that linux still can >> have >> its own fallback mechanism of MAC addresses even if the bootloader has >> CONFIG_NET_RANDOM_ETHADDR enabled. >> >> The intention is to replace [1], where if I understood correctly, the >> intention was to fix "net list". >> >> [1] >> https://lore.kernel.org/u-boot/3996ba2ee4e6ac136c0802dc0df4ef9b1750157c.1635506067.git.michal.simek@xilinx.com/ > > Does that mean U-Boot and Linux will possibly each have different MAC > address on the same device ? That is clearly wrong and not how it is > supposed to work, U-Boot passes its ethaddr/ethNaddr settings to Linux > so that they would have the same MAC address on the same device. Yes they have different ones, but having a random mac address is wrong in the first place. So IMHO it is more useful to dectect that in linux, (and there was a good point that usually a user will look at dmesg and not some u-boot output) than having two different random MAC addresses, one for u-boot and one for linux. Initially that random MAC address thing was supposed to get networking running in u-boot if there is no ethaddr at all, eg. for network console. Now we are passing this made up network address to linux, too. Why? Just because it is wrong to have two different mac addresses? Some drivers doesn't even probe without one. And we are just masking away this error. You get this "two different mac addresses" between reboots. Which is also wrong. This actually strenghten my opinion that this "feature" should be an u-boot only thing. -michael