Re: [PATCH net] net: sparx5: make ports inherit the switch base mac address type

From: Simon Horman

Date: Mon Sep 28 2026 - 06:17:41 EST


On Sun, Sep 27, 2026 at 09:50:12PM -0700, Quentin Freimanis wrote:
> When the switch uses a random base MAC address it does not mark each
> port's address as random:
>
> $ dmesg | grep "MAC addr"
> sparx5-switch e00c0000.switch: MAC addr was not set, use random MAC
> $ cat /sys/class/net/eth0/addr_assign_type
> 0
>
> 0 is NET_ADDR_PERM, so userspace thinks this is a stable address. Fix by
> tracking the base MAC address assign type in the sparx5 struct and
> applying it to each port's netdev.
>
> Fixes: f3cad2611a77 ("net: sparx5: add hostmode with phylink support")
> Signed-off-by: Quentin Freimanis <quentin@xxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>