diff mbox series

[RFC,net-next,10/12] Documentation: networking: dsa: add paragraph for the HSR/PRP offload

Message ID 20210221213355.1241450-11-olteanv@gmail.com
State Superseded
Headers show
Series Documentation updates for switchdev and DSA | expand

Commit Message

Vladimir Oltean Feb. 21, 2021, 9:33 p.m. UTC
From: Vladimir Oltean <vladimir.oltean@nxp.com>

Add a short summary of the methods that a driver writer must implement
for offloading a HSR/PRP network interface.

Cc: George McCollister <george.mccollister@gmail.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 Documentation/networking/dsa/dsa.rst | 32 ++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Comments

Andrew Lunn Feb. 25, 2021, 1:42 a.m. UTC | #1
> +IEC 62439-3 (HSR/PRP)

> +---------------------

> +

> +The Parallel Redundancy Protocol (PRP) is a network redundancy protocol which

> +works by duplicating and sequence numbering packets through two independent L2

> +networks (which are unaware of the PRP tail tags carried in the packets), and

> +eliminating the duplicates at the receiver. The High-availability Seamless

> +Redundancy (HSR) protocol is similar in concept, except all nodes that carry

> +the redundant traffic are aware of the fact that it is HSR-tagged (because HSR

> +uses a header with an EtherType of 0x892f) and are physically connected in a

> +ring topology. Both HSR and PRP use supervision frames for monitoring the


I don't know HSR/PRP terms. Should it be supervisory instead of
supervision?

> +health of the network and for discovering the other nodes.


Either "discovering other nodes" or "discovery of other nodes".

> +

> +In Linux, both HSR and PRP are implemented in the hsr driver, which

> +instantiates a virtual, stackable network interface with two member ports.

> +The driver only implements the basic roles of DANH (Doubly Attached Node

> +implementing HSR) and DANP (Doubly Attached Node implementing PRP); the roles

> +of RedBox and QuadBox aren't (therefore, bridging a hsr network interface with


In colloquial English, you can get away with just 'aren't'. But in
Queens English, you should follow it with something, in this case
'supported'.

	Andrew
George McCollister Feb. 25, 2021, 1:33 p.m. UTC | #2
On Wed, Feb 24, 2021 at 7:42 PM Andrew Lunn <andrew@lunn.ch> wrote:
>

> > +IEC 62439-3 (HSR/PRP)

> > +---------------------

> > +

> > +The Parallel Redundancy Protocol (PRP) is a network redundancy protocol which

> > +works by duplicating and sequence numbering packets through two independent L2

> > +networks (which are unaware of the PRP tail tags carried in the packets), and

> > +eliminating the duplicates at the receiver. The High-availability Seamless

> > +Redundancy (HSR) protocol is similar in concept, except all nodes that carry

> > +the redundant traffic are aware of the fact that it is HSR-tagged (because HSR

> > +uses a header with an EtherType of 0x892f) and are physically connected in a

> > +ring topology. Both HSR and PRP use supervision frames for monitoring the

>

> I don't know HSR/PRP terms. Should it be supervisory instead of

> supervision?


IEC 62439-3 refers to them primarily as supervision frames however
supervisory frames also appears once in the document.

>

> > +health of the network and for discovering the other nodes.

>

> Either "discovering other nodes" or "discovery of other nodes".

>

> > +

> > +In Linux, both HSR and PRP are implemented in the hsr driver, which

> > +instantiates a virtual, stackable network interface with two member ports.

> > +The driver only implements the basic roles of DANH (Doubly Attached Node

> > +implementing HSR) and DANP (Doubly Attached Node implementing PRP); the roles

> > +of RedBox and QuadBox aren't (therefore, bridging a hsr network interface with

>

> In colloquial English, you can get away with just 'aren't'. But in

> Queens English, you should follow it with something, in this case

> 'supported'.

>

>         Andrew
diff mbox series

Patch

diff --git a/Documentation/networking/dsa/dsa.rst b/Documentation/networking/dsa/dsa.rst
index bf82f2aed29a..277045346f3a 100644
--- a/Documentation/networking/dsa/dsa.rst
+++ b/Documentation/networking/dsa/dsa.rst
@@ -760,6 +760,38 @@  to work properly. The operations are detailed below.
   which MRP PDUs should be trapped to software and which should be autonomously
   forwarded.
 
+IEC 62439-3 (HSR/PRP)
+---------------------
+
+The Parallel Redundancy Protocol (PRP) is a network redundancy protocol which
+works by duplicating and sequence numbering packets through two independent L2
+networks (which are unaware of the PRP tail tags carried in the packets), and
+eliminating the duplicates at the receiver. The High-availability Seamless
+Redundancy (HSR) protocol is similar in concept, except all nodes that carry
+the redundant traffic are aware of the fact that it is HSR-tagged (because HSR
+uses a header with an EtherType of 0x892f) and are physically connected in a
+ring topology. Both HSR and PRP use supervision frames for monitoring the
+health of the network and for discovering the other nodes.
+
+In Linux, both HSR and PRP are implemented in the hsr driver, which
+instantiates a virtual, stackable network interface with two member ports.
+The driver only implements the basic roles of DANH (Doubly Attached Node
+implementing HSR) and DANP (Doubly Attached Node implementing PRP); the roles
+of RedBox and QuadBox aren't (therefore, bridging a hsr network interface with
+a physical switch port is not supported).
+
+A driver which is able of offloading certain functions of a DANP or DANH should
+declare the corresponding netdev features as indicated by the documentation at
+``Documentation/networking/netdev-features.rst``. Additionally, the following
+methods must be implemented:
+
+- ``port_hsr_join``: function invoked when a given switch port is added to a
+  DANP/DANH. The driver may return ``-EOPNOTSUPP`` and in this case, DSA will
+  fall back to a software implementation where all traffic from this port is
+  sent to the CPU.
+- ``port_hsr_leave``: function invoked when a given switch port leaves a
+  DANP/DANH and returns to normal operation as a standalone port.
+
 TODO
 ====