public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Felix Maurer <fmaurer@redhat.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	jkarrenpalo@gmail.com, tglx@linutronix.de, mingo@kernel.org,
	allison.henderson@oracle.com, petrm@nvidia.com,
	antonio@openvpn.net
Subject: Re: [PATCH net-next v2 1/9] selftests: hsr: Add ping test for PRP
Date: Mon, 2 Feb 2026 12:51:12 +0100	[thread overview]
Message-ID: <aYCPsDZeJvCrJYRH@thinkpad> (raw)
In-Reply-To: <aXucj8L-cBUVIYHX@thinkpad>

On Thu, Jan 29, 2026 at 06:44:47PM +0100, Felix Maurer wrote:
> 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'm still not 100% certain, but I agree that the standard reads more
like the MAC addresses should be the same for the two HSR ports. At the
moment, the kernel and the test assumes that they can/should be
different. Therefore, I think we should fix this across the board in
another patchset if we agree that's the right thing to do.

Thanks,
   Felix


  reply	other threads:[~2026-02-02 11:51 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-22 14:56 [PATCH net-next v2 0/9] hsr: Implement more robust duplicate discard algorithm Felix Maurer
2026-01-22 14:56 ` [PATCH net-next v2 1/9] selftests: hsr: Add ping test for PRP Felix Maurer
2026-01-29 11:05   ` Sebastian Andrzej Siewior
2026-01-29 13:31     ` Felix Maurer
2026-01-29 15:21       ` Sebastian Andrzej Siewior
2026-01-29 17:44         ` Felix Maurer
2026-02-02 11:51           ` Felix Maurer [this message]
2026-02-02 15:55             ` Sebastian Andrzej Siewior
2026-02-03 10:12               ` Felix Maurer
2026-02-03 11:55                 ` Sebastian Andrzej Siewior
2026-02-03 12:23                   ` Felix Maurer
2026-02-03 13:47                     ` Sebastian Andrzej Siewior
2026-02-03 15:07                       ` Felix Maurer
2026-01-22 14:56 ` [PATCH net-next v2 2/9] selftests: hsr: Check duplicates on HSR with VLAN Felix Maurer
2026-01-22 14:56 ` [PATCH net-next v2 3/9] selftests: hsr: Add tests for faulty links Felix Maurer
2026-01-22 14:56 ` [PATCH net-next v2 4/9] hsr: Implement more robust duplicate discard for PRP Felix Maurer
2026-01-28 16:38   ` Simon Horman
2026-01-28 18:37     ` Felix Maurer
2026-02-02 16:57       ` Sebastian Andrzej Siewior
2026-02-03 10:23         ` Felix Maurer
2026-02-03 11:57           ` Sebastian Andrzej Siewior
2026-02-03 12:42             ` Felix Maurer
2026-02-03 13:49               ` Sebastian Andrzej Siewior
2026-02-03 15:11                 ` Felix Maurer
2026-01-29 13:29   ` Sebastian Andrzej Siewior
2026-01-29 15:30     ` Felix Maurer
2026-02-02  8:47   ` Steffen Lindner
2026-01-22 14:57 ` [PATCH net-next v2 5/9] selftests: hsr: Add tests for more link faults with PRP Felix Maurer
2026-01-29 13:32   ` Sebastian Andrzej Siewior
2026-02-02 11:30     ` Felix Maurer
2026-02-02 16:45       ` Sebastian Andrzej Siewior
2026-02-03 12:09         ` Felix Maurer
2026-02-03 14:49           ` Sebastian Andrzej Siewior
2026-02-03 15:32             ` Felix Maurer
2026-01-22 14:57 ` [PATCH net-next v2 6/9] hsr: Implement more robust duplicate discard for HSR Felix Maurer
2026-01-29 14:43   ` Sebastian Andrzej Siewior
2026-01-29 16:17     ` Felix Maurer
2026-01-29 18:01       ` Felix Maurer
2026-01-30 10:34         ` Felix Maurer
2026-02-02 17:53           ` Sebastian Andrzej Siewior
2026-02-03 11:49             ` Felix Maurer
2026-02-03 12:08               ` Sebastian Andrzej Siewior
2026-02-02 17:11       ` Sebastian Andrzej Siewior
2026-02-03 11:08         ` Felix Maurer
2026-02-03 12:09           ` Sebastian Andrzej Siewior
2026-01-22 14:57 ` [PATCH net-next v2 7/9] selftests: hsr: Add more link fault tests " Felix Maurer
2026-01-22 14:57 ` [PATCH net-next v2 8/9] hsr: Update PRP duplicate discard KUnit test for new algorithm Felix Maurer
2026-01-29 15:12   ` Sebastian Andrzej Siewior
2026-01-29 16:19     ` Felix Maurer
2026-01-22 14:57 ` [PATCH net-next v2 9/9] MAINTAINERS: Assign hsr selftests to HSR Felix Maurer
2026-01-22 17:24 ` [PATCH net-next v2 0/9] hsr: Implement more robust duplicate discard algorithm Sebastian Andrzej Siewior
2026-01-23  1:35 ` Jakub Kicinski
2026-01-26  9:28   ` Felix Maurer
2026-01-29 15:29     ` Sebastian Andrzej Siewior
2026-01-29 16:29       ` Felix Maurer

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=aYCPsDZeJvCrJYRH@thinkpad \
    --to=fmaurer@redhat.com \
    --cc=allison.henderson@oracle.com \
    --cc=antonio@openvpn.net \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jkarrenpalo@gmail.com \
    --cc=kuba@kernel.org \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=tglx@linutronix.de \
    /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