mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Quentin Freimanis <quentin@q-lab.dev>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Steen Hegelund <Steen.Hegelund@microchip.com>,
	Daniel Machon <daniel.machon@microchip.com>,
	UNGLinuxDriver@microchip.com,
	Lars Povlsen <lars.povlsen@microchip.com>,
	Bjarni Jonasson <bjarni.jonasson@microchip.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: sparx5: make ports inherit the switch base mac address type
Date: Wed, 30 Sep 2026 01:00:42 -0700	[thread overview]
Message-ID: <2fe4a450-f176-463b-9799-5a03f6448c38@q-lab.dev> (raw)
In-Reply-To: <20260929185936.687250f9@kernel.org>

Hi Jakub,

On 9/29/26 6:59 PM, Jakub Kicinski wrote:
> On Sun, 27 Sep 2026 21:50:12 -0700 Quentin Freimanis wrote:
>> 0 is NET_ADDR_PERM, so userspace thinks this is a stable address.
> 
> Could you please explain the end-user impact of this?
> Unclear to me from the commit msg if this is something that broke
> your deployment / scripts or maybe you simply noticed it from code
> inspection / LLM scan.
> 
> No need to repost, just explain, I'll add it when applying.
> 

With a random MAC reported as NET_ADDR_PERM, systemd's 
MACAddressPolicy=persistent [1] leaves it unchanged, so a DHCP client 
gets a new IP address every boot and a static reservation can't be used. 
Reporting it as NET_ADDR_RANDOM makes systemd replace it with a stable 
address derived from the interface name and machine-id.

(this is my use case, and how I found the bug)

>> Fix by tracking the base MAC address assign type in the sparx5 struct
>> and applying it to each port's netdev.
> 
> Generally no need to repeat what an average reader can easily grok
> from the diff.

Ack.

- Quentin

[1] 
https://www.freedesktop.org/software/systemd/man/latest/systemd.link.html#MACAddressPolicy=

      reply	other threads:[~2026-09-30  8:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28  4:50 Quentin Freimanis
2026-09-28 10:11 ` Simon Horman
2026-09-28 11:20 ` Daniel Machon
2026-09-30  1:59 ` Jakub Kicinski
2026-09-30  8:00   ` Quentin Freimanis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2fe4a450-f176-463b-9799-5a03f6448c38@q-lab.dev \
    --to=quentin@q-lab.dev \
    --cc=Steen.Hegelund@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bjarni.jonasson@microchip.com \
    --cc=daniel.machon@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=lars.povlsen@microchip.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®