[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230912101748.0ca4eec8@wsk>
Date: Tue, 12 Sep 2023 10:17:48 +0200
From: Lukasz Majewski <lukma@...x.de>
To: Vladimir Oltean <olteanv@...il.com>
Cc: Tristram.Ha@...rochip.com, Eric Dumazet <edumazet@...gle.com>, Andrew
Lunn <andrew@...n.ch>, davem@...emloft.net, Woojung Huh
<woojung.huh@...rochip.com>, Oleksij Rempel <o.rempel@...gutronix.de>,
Florian Fainelli <f.fainelli@...il.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, UNGLinuxDriver@...rochip.com, Oleksij
Rempel <linux@...pel-privat.de>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [[RFC PATCH v4 net-next] 0/2] net: dsa: hsr: Enable HSR HW
offloading for KSZ9477
Hi Vladimir,
> On Mon, Sep 11, 2023 at 04:58:48PM +0200, Lukasz Majewski wrote:
> > Dear Community,
> >
> > Are there any comments regarding this new revision of the HSR
> > support for KSZ9477 switch?
> >
> > Best regards,
> >
> > Lukasz Majewski
>
> Yeah, the integration with the DSA master's MAC address is not quite
> what I was expecting to see.
>
> See, both the DSA master's MAC address, as well as the HSR device's
> MAC address, can be changed at runtime with:
>
> ip link set eth0 address AA:BB:CC:DD:EE:FF # DSA master
> ip link set lan1 address AA:BB:CC:DD:EE:FF # indirectly changes the
> HSR's address too
IMHO, somebody who will use HSR will not fiddle with mac addresses of
LAN1 and ETH0. It will be setup by savvy user once at boot up.
>
> which is problematic because the hardware does not get updated in that
> case, but the address change is not refused either.
>
> Actually, the reason why I haven't yet said anything is because it
> made me realize that there is a pre-existing bug in net/dsa/slave.c
> where we have this pattern:
>
> if (!ether_addr_equal(dev->dev_addr, master->dev_addr))
> dev_uc_add(master, dev->dev_addr);
>
> but there is no replay of the dev_uc_add() call when the
> master->dev_addr changes. This really results in RX packet loss, as I
> have tested. I don't know what is the best way to solve it.
>
> Anyway, programming the MAC address of the DSA master or of the HSR
> device to hardware seems to require tracking the NETDEV_CHANGEADDR and
> NETDEV_PRE_CHANGEADDR events, even if only to reject those changes.
Please correct me if I'm wrong, but the above issue (with lack of sync
of mac address change in DSA master and its ports) seems to be
affecting HSR support in a minimal way (when considering the above).
If I may ask - what is your suggestion to have the HSR join feature
merged for KSZ9477 SoC ?
Will the above problem block the HSR offloading support mainlining,
even when the self mac address filtering is one of four HW based
features for this SoC?
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: lukma@...x.de
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists