Subject: Re: [PATCH v1 net-next] net: dsa: Allow only up to two HSR HW offloaded ports for KSZ9477

From: Lukasz Majewski <[email-masked]>
Date: Tue, 18 Jun 2024 17:02:20 +0200

Hi Andrew,

> > For me the:
> > 
> > NL_SET_ERR_MSG_MOD(extack, "Cannot offload more than two ports (in
> > use=0x%x)", dev->hsr_ports);
> > 
> > is fine - as it informs that no more HSR offloading is possible (and
> > allows to SW based RedBox/HSR-SAN operation).  
> 
> Does user space actually get to see it? I would expect the HSR code
> sees the EOPNOTSUPP, does not consider it an fatal error, and return 0
> to user space.
> 
> If userspace does see it, maybe we should make it clearer it is not an
> actually error. 
> 
> "Cannot offload more than two ports, using software bridging"
> 
> so something similar.
> 

Exactly - this is useful information - not error indication.

(The same case is when we do want to set the MAC address already
"taken" by ksz9477 HSR configuration.)

>    Andrew

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: [email-masked]