[PATCH v2 0/2] Allow generating MAC addresses from machine ID

Uwe Kleine-König uwe at kleine-koenig.org
Wed Nov 15 01:02:39 PST 2023


Hello,

this series contains two patches by Ahmad that he send earlier starting
with Message-Id: <20230911155927.3786335-1-a.fatoum at pengutronix.de>.

Patch #1 was already applied back then as 9831b2e5fed8 ("common:
machine_id: support deriving app specific UUIDs").

Changes since (implicit) v1:

 - fix compilation with MACHINE_ID=n (Sascha)
 - fix typo in NET_ETHADDR_FROM_MACHINE_ID helptext (Thorsten)
 - rename of_populate_ethaddr -> populate_ethaddr as it's not about of any more (Sascha)

On Tue, Sep 12, 2023 at 12:49:03PM +0200, Sascha Hauer wrote:
> On Mon, Sep 11, 2023 at 05:59:27PM +0200, Ahmad Fatoum wrote:
> > @@ -566,11 +568,18 @@ static int of_populate_ethaddr(void)
> >
> >             ret = of_get_mac_addr_nvmem(edev->parent->of_node,
> >                                         edev->ethaddr);
> > +           if (ret && IS_ENABLED(CONFIG_NET_ETHADDR_FROM_MACHINE_ID)) {
>
> This check doesn't seem to be needed, generate_ether_addr() already
> returns -ENOSYS when this option is not enabled.

I kept this check, Ahmad already argued that is should be kept. (I only
swapped the checks to have the static one first which is IMHO more
natural.)

Best regards
Uwe

Ahmad Fatoum (2):
  common: machine_id: support deriving app specific UUIDs
  net: add generic MAC address derivation from machine ID

 common/machine_id.c  | 84 ++++++++++++++++++++++++++++++++++++++++++--
 include/linux/uuid.h |  8 +++++
 include/machine_id.h | 11 ++++++
 include/net.h        |  2 ++
 net/Kconfig          | 17 +++++++++
 net/eth.c            | 15 ++++++--
 net/net.c            | 49 ++++++++++++++++++++++++--
 7 files changed, 179 insertions(+), 7 deletions(-)

base-commit: bc5e49335067d0c6c6e97c082a0368fe9d86b725
-- 
2.42.0.586.gbc5204569f7d.dirty




More information about the barebox mailing list