public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Lukasz Majewski <lukma@denx.de>
Cc: Tristram.Ha@microchip.com, Eric Dumazet <edumazet@google.com>,
	Andrew Lunn <andrew@lunn.ch>,
	davem@davemloft.net, Woojung Huh <woojung.huh@microchip.com>,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	UNGLinuxDriver@microchip.com,
	Oleksij Rempel <linux@rempel-privat.de>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [[RFC PATCH v4 net-next] 0/2] net: dsa: hsr: Enable HSR HW offloading for KSZ9477
Date: Mon, 11 Sep 2023 19:05:01 +0300	[thread overview]
Message-ID: <20230911160501.5vc4nttz6fnww56h@skbuf> (raw)
In-Reply-To: <20230911165848.0741c03c@wsk>

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

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.

  reply	other threads:[~2023-09-11 16:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 15:27 [[RFC PATCH v4 net-next] 0/2] net: dsa: hsr: Enable HSR HW offloading for KSZ9477 Lukasz Majewski
2023-09-06 15:28 ` [[RFC PATCH v4 net-next] 1/2] net: dsa: Extend ksz9477 TAG setup to support HSR frames duplication Lukasz Majewski
2023-09-06 15:28 ` [[RFC PATCH v4 net-next] 2/2] net: dsa: hsr: Enable in KSZ9477 switch HW HSR offloading Lukasz Majewski
2023-09-11 14:58 ` [[RFC PATCH v4 net-next] 0/2] net: dsa: hsr: Enable HSR HW offloading for KSZ9477 Lukasz Majewski
2023-09-11 16:05   ` Vladimir Oltean [this message]
2023-09-11 17:02     ` Vladimir Oltean
2023-09-11 17:03       ` Vladimir Oltean
2023-10-03 13:34       ` Jakub Kicinski
2023-09-12  8:17     ` Lukasz Majewski
2023-09-12  9:29       ` Vladimir Oltean
2023-09-12 14:03         ` Lukasz Majewski
2023-09-12 14:26           ` Vladimir Oltean
2023-09-12 15:06             ` Lukasz Majewski
2023-09-12 21:55               ` Vladimir Oltean
2023-09-13  8:22                 ` Lukasz Majewski
2023-09-13 10:58                   ` Vladimir Oltean
2023-09-13 12:15                     ` Lukasz Majewski
2023-09-13 13:51                       ` Vladimir Oltean
2023-09-13 18:42                         ` Vladimir Oltean
2023-09-14 21:18                           ` Lukasz Majewski
2023-09-15 14:22                             ` Vladimir Oltean
2023-09-18  9:06                               ` Lukasz Majewski
2023-09-14 20:45                         ` Lukasz Majewski

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=20230911160501.5vc4nttz6fnww56h@skbuf \
    --to=olteanv@gmail.com \
    --cc=Tristram.Ha@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=lukma@denx.de \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=woojung.huh@microchip.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