[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aXucj8L-cBUVIYHX@thinkpad>
Date: Thu, 29 Jan 2026 18:44:47 +0100
From: Felix Maurer <fmaurer@...hat.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, horms@...nel.org,
jkarrenpalo@...il.com, tglx@...utronix.de, mingo@...nel.org,
allison.henderson@...cle.com, petrm@...dia.com, antonio@...nvpn.net
Subject: Re: [PATCH net-next v2 1/9] selftests: hsr: Add ping test for PRP
On Thu, Jan 29, 2026 at 04:21:49PM +0100, Sebastian Andrzej Siewior wrote:
> On 2026-01-29 14:31:30 [+0100], Felix Maurer wrote:
> > On Thu, Jan 29, 2026 at 12:05:00PM +0100, Sebastian Andrzej Siewior wrote:
> > > On 2026-01-22 15:56:56 [+0100], Felix Maurer wrote:
> > > > diff --git a/tools/testing/selftests/net/hsr/prp_ping.sh b/tools/testing/selftests/net/hsr/prp_ping.sh
> > > > new file mode 100755
> > > > index 000000000000..fd2ba9f05d4c
> > > > --- /dev/null
> > > > +++ b/tools/testing/selftests/net/hsr/prp_ping.sh
> > > …
> > > > + # MAC addresses will be copied from LAN A interface
> > > > + ip -net "$node1" link set address 00:11:22:00:00:01 dev vethA
> > > > + ip -net "$node2" link set address 00:11:22:00:00:02 dev vethA
> > >
> > > so I somehow started this (I think) but while browsing the spec it
> > > somehow says that the same MAC address should be used on both ports.
> > > Could it be?
> > > It says that the two frames are identical except for the LAN field and
> > > checksum. Also the duplication is defined on src-MAC + seq nr.
> > > Having this requires to merge the two MACs for a node and we do this but
> > > could this be a left over from an older version of the spec or a
> > > behaviour that was not meant happen?
> >
> > Yes, for PRP it is required that both ports, A and B, of a node send
> > with the same MAC. For us that means that the two ports need to be
> > configured with the same MAC address. This used to be a common source of
> > configuration errors. Therefore, b65999e7238e ("net: hsr: sync hw addr
> > of slave2 according to slave1 hw addr on PRP") made it so that we are
> > now copying the MAC from port A to port B.
> >
> > Therefore, I'm only setting the MAC of vethA on each node in the test.
> > Even this is not strictly necessary but it turns out that debugging is a
> > lot simpler, when it is obvious addresses belong to which node.
>
> Looking at the hsr tests, those have two different macs… It should be
> the same. It works because it merges the nodes and lookup works for
> both…
Hm, I am not sure? For PRP, it's an explicit requirement to use the same
MAC addresses for both ports. For HSR, I think the standard is less
clear about the MAC addresses. And at least our code seems to assume
that there could be different MACs on the two interfaces of a node? But
yes, the node merging addresses this.
I'll take another look at this topic tomorrow.
Thanks,
Felix
Powered by blists - more mailing lists