netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tobias Waldekranz <tobias@waldekranz.com>
To: m-karicheri2@ti.com, ap420073@gmail.com, Arvid.Brodin@xdin.com,
	xiyou.wangcong@gmail.com, george.mccollister@gmail.com,
	marco.wenzel@a-eberle.de
Cc: netdev@vger.kernel.org
Subject: HSR Addressing
Date: Thu, 19 Aug 2021 15:18:04 +0200	[thread overview]
Message-ID: <877dghmv3n.fsf@waldekranz.com> (raw)

Hi netdev,

TL;DR: I am having a hard time squaring the kernel's implementation of
HSR with the spec (IEC 62439-3). Has anyone actually deployed this
successfully? Especially in rings containing RedBoxes.

The spec (5.6) says that:

    For the purpose of Duplicate Discard, a frame shall be identified
    by:

    - its source MAC address;
    - its sequence number.

And yet, the kernel seems to match HSR nodes using a {MAC_A, MAC_B}
tuple on ingress, and conversely sends each replicated HSR tagged frame
with the underlying port's MAC address as the SA (instead of the HSR
interface's ditto) on egress.

In a setup with only "DAN-H" nodes (~end-devices) the kernel can be made
to mostly behave, by manually configuring the MAC address of port A and
B to match that of the HSR interface.

But if you connect a "RedBox" (~HSR-to-80's-Ethernet-bridge) to the
ring, the kernel will associate a station behind that RedBox with a
tuple containing {station's real MAC, RedBox's MAC}, leading to
intermittent periods of (1) no traffic, (2) traffic, or (3) duplicated
traffic. This issue seems to stem from the kernel interpreting the
"RedBox TLV" in the supervision frame as the MAC used by the station to
send the replicated frames in the opposite direction.

It seems to me that...

- On egress, both HSR tagged replicas should be identical - with the
  exception of the PathId field.

- Supervision frames could use either the port MAC or the HSR
  interface's MAC in the Ethernet header, but the payload (TLV type 23)
  should always specify the HSR interface's MAC.

- Nodes should be identified by a single source address, no tuple
  matching. (But we should still record the RedBox MAC for debug
  purposes).

... OTOH, it seems highly unlikely that the implementation is this
broken and much more likely that I am mistaken. :)

Hoping someone can shed some light on this. Thanks!

                 reply	other threads:[~2021-08-19 13:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=877dghmv3n.fsf@waldekranz.com \
    --to=tobias@waldekranz.com \
    --cc=Arvid.Brodin@xdin.com \
    --cc=ap420073@gmail.com \
    --cc=george.mccollister@gmail.com \
    --cc=m-karicheri2@ti.com \
    --cc=marco.wenzel@a-eberle.de \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.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;
as well as URLs for NNTP newsgroup(s).