Article View: linux.kernel.netdev
Article #26656Re: [PATCH v5 0/5] net: Derive stable MAC addresses from a unique device ID
From: Ricardo Pardini
Date: Fri, 04 Dec 2026 02:18
Date: Fri, 04 Dec 2026 02:18
55 lines
13978 bytes
13978 bytes
On 25/11/2026 20:36, Alexey Charkov wrote: > Rockchip SoCs are shipped with a unique CPU ID in their internal OTP > memory, and Rockchip bootloaders use it to give boards which have no > dedicated storage for a MAC address a stable one anyway: they hash the CPU > ID and patch the resulting addresses into the device tree they hand over. > > Kernels started without that fixup, e.g. straight from the SPL in Falcon > mode or by any other loader which does not implement Rockchip's derivation, > fall back to random MAC addresses which change on every boot. > > Derive the addresses in of_get_mac_address() instead, as the last resort > after any stored address, from a "unique-id" NVMEM cell referenced by > the Ethernet controller, so that a Linux image can use the same stable > addresses regardless of the boot flow. > [...] Hi Alexey, I tested the whole series on v7.4-rc5 on a Seeed reComputer RK3576 Dev Kit (both GMACs, ethernet0/1; DT for the board is submitted with an upcoming v2). With U-Boot (mainline v2026.07) the fixed-up local-mac-address still wins, as intended. Without u-boot proper, it gives both GMACs exactly the addresses U-Boot would assign, and both links come up. Thus: Tested-by: Ricardo Pardini <ricardo@pardini.net> # Seeed reComputer RK3576 Dev Kit I also carried the approach over to RK3588 and RK356x, and it fits them well: - the RK3588 OTP cells move into a fixed layout without trouble, the same as your RK3576 patch; RK356x already had one - the "rockchip,cpuid" compatible goes onto the RK3588 (id@7) and RK356x (id@a) CPU ID cells as is - the GMAC "unique-id" references apply the same way. On a Mekotronics R58X-Pro (RK3588, gmac0 + gmac1) both GMACs got exactly U-Boot's addresses, and so did the single GMAC (gmac1) on a Mixtile Edge 2 (RK3568) - it also works for PCIe NICs: on a Mixtile Blade 3 (RK3588, not submitted yet), the two RTL8125B behind the PCIe switch get ethernet0/1 aliases and a "unique-id" reference each, and r8169 picks the derived addresses up through of_get_mac_address() with no driver changes. So all in all, the approach works and carries over nicely to RK356x/88. I can send the RK3588 and RK356x DT patches once this lands, unless you'd rather carry them, just let me know; they'd be: - arm64: dts: rockchip: Derive GMAC MAC addresses from OTP on RK356x - arm64: dts: rockchip: Derive GMAC MAC addresses from OTP on RK3588 - arm64: dts: rockchip: Move RK3588 OTP cells into a fixed layout Plus a few different instances of - arm64: dts: rockchip: Derive RTL8125 MAC addresses from OTP on Foo Thanks, Ricardo
Technical Details
Message-ID:
<7fcf8e87-fe69-469a-a116-2eede651f843@pardini.net>Path:
mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376969-linux-kernel-netdev=dewy.ruReferences:
<20261125-rk3576-otp-cpuid-mac-v5-0-b3125c9a5fc8@flipper.net>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376969-linux-kernel-netdev=dewy.ru
From: ricardo@pardini.net (Ricardo Pardini)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v5 0/5] net: Derive stable MAC addresses from a unique
device ID
Date: Fri, 4 Dec 2026 03:18:02 +0100
Organization: Usenet Network
Message-ID: <7fcf8e87-fe69-469a-a116-2eede651f843@pardini.net>
References: <20261125-rk3576-otp-cpuid-mac-v5-0-b3125c9a5fc8@flipper.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="2654262"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:w1JxsAVz3MlVpjBuZAchjWnyLgs= sha256:GRx8aLc9/SlTd8SDULQX1oktgwGnCzq3HKN/K7I03wE=
sha1:ye+q6dxODp5vUnOEgF/H3FjObeY= sha256:z5Ngx2l6C16ckDS2ipPTEMoAlqdUzV7oLWpN+uJQCEw=
Content-Language: en-US
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id BAFF6117AAA; Fri, 4 Dec 2026 05:18:26 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.399
X-Spam-Status: No, score=-3.399 tagged_above=-9999 required=6.31
tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=pardini.net
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id x9GBE3yvhMNI;
Fri, 4 Dec 2026 05:18:24 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-376969-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=pardini.net
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id F2E0A117A7E; Fri, 4 Dec 2026 05:18:13 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id E786623DA8; Fri, 4 Dec 2026 02:18:09 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1796350689;
b=1V+RNWEzhsGye8wrUp5Zt9YX8rboAmVahKx0hd+xjLt1KF4YLAU2KLClfO1vVYw2SLXp
2JJLxxvaMuEE19W1l5hI7r/J/wUJV+AfjCsFOYgcmSzG46th3THq6XS29QTFhVOEd2yzW
d/MhiyulCgH431NPrSUSVdimiP4tlP5MR3+0dII+rNaYH4U/98UjlWMyJGh2eochdarJ4
iuLelYg9YBeruPoFR2VM31BJR5Rc57BAJfw1F4hCYilDJKlKFYApkuICCj6LTILMqfdat
uWd+giFekXnKKvWAQvowrmZmhjKeymh4V3uXSFqsdFSD28y1sUE+tkPtZrUfx4JKLig==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796350689;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:Message-ID:Date:X-Mailing-List:List-Id:
List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
Precedence:MIME-Version:User-Agent:Subject:To:Cc:References:
Content-Language:From:In-Reply-To:Content-Type:
Content-Transfer-Encoding;
bh=rRo+bxhoPfN/3D69ZpgUhDT5DaatId3qIH16kABOoxc=;
b=OogJLoGK/ydCuBZg4buJ2asLI/WmliaKZrsRhLqF3DiPuq1ka3sgN1kfNAwNMVyN7xG5
RgKfHBqc5ht0/fX/xvHE8gZ/DIOyoDDstyhgGxWTXN1sTHZixQfch7yllJDu1ol5t+2g+
/jjluw/3Hae+UcP/1TkrjYg4TaRvFbCmGWJzmvCekBNK0XpXdg4rJTxiQ0ZrfviKsP933
9T0OAXXUXbi2JFvRr0KqDPXrgEQSG6XnbT6U9zNFWEYdvTGfC4XH6Me2C3dnJ+G4q0+cW
qRPOFvcU+yuW+tkzVKDH4yKRpMxfS7Fet86l+2H6PQIVFzIsSbURDymWqa+H+8ZGOpw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=pardini.net header.i=@pardini.net header.a=rsa-sha256 header.s=google header.b=TR0+WV6i;
dmarc=none header.from=pardini.net;
spf=pass smtp.mailfrom=pardini.net;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 004EC606A683;
Fri, 4 Dec 2026 02:18:09 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=pardini.net header.i=@pardini.net header.a=rsa-sha256 header.s=google header.b=TR0+WV6i
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.47
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1796350688;
b=qp1pRcS4fNNGCkKqGUv7qJry7ndwzA3mVwM+sICe/jZp56zZ6GHB5jzSwMLlUV0tyNSo
wOEoitboATU/lRoTkWFade6TIj+HNP4d69bodUnC/UYIAvNSn3UflEot/KSJB4wYQpHl8
6TMKx24C5vNIhz8qKPY2/bf6mApdgmnwJLRim4fGJvsFESJ/L/8ngmBxrmZaaW0NIXyQ1
Ls37CzG2LNU8yw4rJtK+aaPc1bz07Hc0o4/GgzYK70ywT4BurEkSAU0UHm+03F+YMgo4r
N4NQZBcf3Q3fsRaslRFmVZdWZqcDk4/SbuOvqChtf7b7FwbJzhGPLYD19JSwcfou/cA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796350688;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:
Content-Language:From:In-Reply-To:Content-Type:
Content-Transfer-Encoding;
bh=rRo+bxhoPfN/3D69ZpgUhDT5DaatId3qIH16kABOoxc=;
b=gNv05xuT7VG0Gazol/Xfmq2bB10cJcEmFiREn7A9jeQiYmUnlmsPr+ZY1bhhpe/irtL7
Rcs9DR3NBDO0uw9Ig6vV4FJD/m4jN1RLRHPWCBQ+eFnoE+OOxsQ238nMtPbU6DUPd05xF
Cp3NTYytn2u4ctLT7I/Vsft6cgDmoR47FtBneEQNGI2gIEgeLGiz/8jGNYaHFi71dYf1N
IjvNT/hSYqM3Mz3xknGDq9rrZOqGb7i5cK1JFHJF7GUyel6pNAVl3Hd+uEC1veKEv9+jf
237LLaK1b4L2W0sdA1VEq6eZG16YQf+rfBS2zhJyDOY0VgitcCsC24izzSxpuew1Aag==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=none header.from=pardini.net;
spf=pass smtp.mailfrom=pardini.net;
dkim=pass header.d=pardini.net header.i=@pardini.net header.a=rsa-sha256 header.s=google header.b=TR0+WV6i;
arc=none smtp.remote-ip=209.85.208.47
X-Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3EA84606A32F
for <netdev@vger.kernel.org>; Fri, 4 Dec 2026 02:18:07 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3EA84606A32F
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pardini.net
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pardini.net
X-Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-6b547d6c07bso506581a12.1
for <netdev@vger.kernel.org>; Thu, 03 Dec 2026 18:18:06 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=pardini.net; s=google; t=1796350686; x=1796955486; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:in-reply-to:from
:content-language:references:cc:to:subject:user-agent:mime-version
:date:message-id:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=rRo+bxhoPfN/3D69ZpgUhDT5DaatId3qIH16kABOoxc=;
b=TR0+WV6iT5N0u/Xl5lltyBiCEVsKgmA1RGilNM3hzZqhFXFwqLCP5Ald7lIjxP31qu
9Ez1qHgJNKAH39IFgvIPhQyMCN9nsIwdwLciNFYU0lzu9BMNZ7Newx1/wiVZT1dmbezk
0om3CYBsUsv+14U3uyVGmiZBVec1cGTEjkVSYYWinuwwMieT62Zf9/vc8ExKEE7fZLvm
wPmjVmhW8RJFNMf2fR9n1R3ei2lMUANhZS5RxE68abqinhAeMC8jEODYy6HD6PZGmvCH
TTcCR2trHweSfv++rfDymJSc+MFCuiAZF2QTEO0q81dHyPhULP0cq22Y9ldMx+c7D7mh
BLEA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1796350686; x=1796955486;
h=content-transfer-encoding:content-type:in-reply-to:from
:content-language:references:cc:to:subject:user-agent:mime-version
:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=rRo+bxhoPfN/3D69ZpgUhDT5DaatId3qIH16kABOoxc=;
b=G8Z0aRaBEC9kfFpf4OXD1fW85x4XExNzoFTF0lPsq+CA4quSU+IF4S9YkqUbPZr4j6
SO4ik+auIzjv6+Fe/8Zttp3GCQNjCuoTNFtKnan8S6XUOuHL2xycYD+Y/2pcJMhvZyGU
qpqsDIWu1ErcWDLNb/nxEoUndEA/JRkubN8fsv3pUU1vQwiDP53AoRESCrf4GFiagWbH
gJETtI6cPOvQ6G1iF8t9z7Voq1iWzZK3k2lxUP8+Lg+YTdKDS91caxCD3rWUgdte63q9
vCp7z4JJp/i3u3h7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
UVEhzt7yhvm6gL3b13ONay
X-Received: by 2002:a05:6402:eaa:b0:6b7:221c:beb with SMTP id 4fb4d7f45d1cf-6bcbee5892fmr425271a12.0.1796350685740;
Thu, 03 Dec 2026 18:18:05 -0800 (PST)
X-Received: from ?IPV6:2a02:a466:4d7a:0:e97d:7def:c516:347a? (2a02-a466-4d7a-0-e97d-7def-c516-347a.fixed6.kpn.net. [2a02:a466:4d7a:0:e97d:7def:c516:347a])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6bcbbfa1eb9sm351968a12.12.2026.12.03.18.18.03
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Thu, 03 Dec 2026 18:18:04 -0800 (PST)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-User-Agent: Mozilla Thunderbird
X-Cc: Ryan Leung <untilscour@protonmail.com>, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
X-In-Reply-To: <20261125-rk3576-otp-cpuid-mac-v5-0-b3125c9a5fc8@flipper.net>