Subject: Re: [PATCH net-next] net/hsr: add interlink to fill_info output

From: Jakub Kicinski <[email-masked]>
Date: Fri, 17 Oct 2025 15:17:33 -0700

On Fri, 17 Oct 2025 12:17:21 +0200 Fernando Fernandez Mancera wrote:
> On 10/17/25 12:57 AM, Jakub Kicinski wrote:
> > On Wed, 15 Oct 2025 12:10:02 +0200 Jan Vaclav wrote:  
> >> Currently, it is possible to configure the interlink port, but no
> >> way to read it back from userspace.
> >> 
> >> Add it to the output of hsr_fill_info(), so it can be read from
> >> userspace, for example:
> >> 
> >> $ ip -d link show hsr0 12: hsr0: <BROADCAST,MULTICAST> mtu ... ... 
> >> hsr slave1 veth0 slave2 veth1 interlink veth2 ...  
> > 
> > Not entirely cleat at a glance how this driver deals with the slaves
> > or interlink being in a different netns, but I guess that's a pre-
> > existing problem..
> >   
> 
> FTR, I just did a quick round of testing and it handles it correctly. 
> When moving a port to a different netns it notifies NETDEV_UNREGISTER - 
> net/hsr/hsr_main.c handles the notification removing the port from the 
> list. If the port list is empty, removes the hsr link.
> 
> All good or at least as I would expect.

Did you try to make the slave/interlink be in a different namespace
when HSR interface is created? It should be possible with the right
combination of NEWLINK attributes, and that's the config I was
particularly concerned about..