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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id F1ED1C433F5 for ; Mon, 22 Nov 2021 10:53:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 220028373B; Mon, 22 Nov 2021 11:53:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1637578425; bh=Geup9GRYGShIDSuuu19Ce8ESBsW8n4ZsI04wznyeJMk=; h=To:cc:From:Subject:In-reply-to:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=U2JFue1JSQxfsmoJCDI36tv7bLvkCWYVjHh+hO+fyzAn8TK7DQPi34pWlX7bmDAuK MNXn3HEyUR1afdOGhASc8SlvxLMAzrfTTN46oQo18oKhuhjZ9FEi3nL+J5ldSSnn9o 6aHdZ8A7WNuYNlpBdffcwGZJbEwshZyhYqNzBHsTgpyWTpU+OOxktcZc5iTI0m/cO4 RDvNH+i1W3JLY/8zPpgvGluqLeqvqh05U2fqNtAQyR7MBXfqjkRXcpuZqV9MiESNAW 0WkWSsVzKxHbjKdWvxGhkspdEVMXx1N3v1oR9Rg2nn3h8JIgEIvAfjewJznyC0Az94 Ru76kVrRfLy7w== Received: from janitor.denx.de (unknown [62.91.23.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: noc@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 1A62883723 for ; Mon, 22 Nov 2021 11:53:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1637578423; bh=Geup9GRYGShIDSuuu19Ce8ESBsW8n4ZsI04wznyeJMk=; h=To:cc:From:Subject:In-reply-to:References:Date:From; b=L5Vz3b+NvgkqALl8I2bwvRMpAqY4Lo8PtCDQTEWYHUX7Gw/Cp+hzn505gMeyYJjc3 J+GEfM8CjxT9KyP4cQpas8XeFUp1ovIFpY2oUYSTESiF7cG98WK/b6qyOfyIRve0om niqT7Glt6PnNWNAZ91t6DRJh1S6oAD/Go0+YSeRpw4dYpzDyJtEkijNYhz3Qu2SJYb AaXXFf0s2wDZUjzZPLZYk08GRV/o4xDSFWzJI6UijvWVL+hWn6u1UvbeVs9+16tNK9 UlVh1oDzA07zWltPrHLlk3LDRTbHtZuzT49vj3ATsqsnyj/bJXfIzTnezm9FbGDyOj HC04SfVmK5cQg== Received: by janitor.denx.de (Postfix, from userid 108) id C53FEA0262; Mon, 22 Nov 2021 11:53:42 +0100 (CET) Received: from gemini.denx.de (gemini.denx.de [10.4.0.2]) by janitor.denx.de (Postfix) with ESMTPS id 943DFA00AD; Mon, 22 Nov 2021 11:53:34 +0100 (CET) Received: from gemini.denx.de (localhost [IPv6:::1]) by gemini.denx.de (Postfix) with ESMTP id 6BE7F1E1813; Mon, 22 Nov 2021 11:53:34 +0100 (CET) To: Tom Rini cc: u-boot@lists.denx.de, Michal Simek , Ramon Fried From: Wolfgang Denk Subject: Re: [PATCHv2] net: uclass: Save ethernet MAC address when generated MIME-Version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 8bit In-reply-to: <20211120155358.376540-1-trini@konsulko.com> References: <20211120155358.376540-1-trini@konsulko.com> Comments: In-reply-to Tom Rini message dated "Sat, 20 Nov 2021 10:53:58 -0500." Date: Mon, 22 Nov 2021 11:53:34 +0100 Message-ID: <2513466.1637578414@gemini.denx.de> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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 Dear Tom, In message <20211120155358.376540-1-trini@konsulko.com> you wrote: > > When MAC address is randomly generated it should be also saved to > variables. This step is there when MAC address is passed via pdata but not > when it is randomly generated. "saved to variables" ? Which variables? In C code? In the environment? This is not clear here. > Selecting this will allow the Ethernet interface to function > - even when the ethaddr variable for that interface is unset. > - A new MAC address will be generated on every boot and it will > - not be added to the environment. > + even when the ethaddr variable for that interface is unset by > + generating a new MAC address in the locally administered address > + space and setting the appropriate environment variable. Same here: "ethaddr variable" - I guess this refers to the environment variable? Then we should write that. Hmmm: "when the ethaddr variable ... is unset by generating ... and setting the appropriate environment variable." this is misleading, as the "ethaddr variable" is not unset by setting the env var. Suggestion: Selecting this will allow the Ethernet interface to function even when the ethaddr variable for that interface is unset. In this case, a random MAC address in the locally administered address space is generated. It will be saved to the appropriate environment variable, too. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de A conservative is a man with two perfectly good legs who has never learned to walk. - Franklin D. Roosevelt