lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200506163033.3843-2-m-karicheri2@ti.com>
Date:   Wed, 6 May 2020 12:30:21 -0400
From:   Murali Karicheri <m-karicheri2@...com>
To:     <davem@...emloft.net>, <kuba@...nel.org>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-api@...r.kernel.org>,
        <nsekhar@...com>, <grygorii.strashko@...com>
Subject: [net-next RFC PATCH 01/13] net: hsr: Re-use Kconfig option to support PRP

PRP, Parallel Redundancy Protocol is another redundancy
protocol defined by IEC62439-3 similar to HSR. PRP uses
a RCT, Redundancy Control Trailer appended to the end
of a Ethernet frame to implement redundancy. There are
many similarities between these protocols so that existing
code for HSR can be enhanced to support PRP. So as
a first step, rename the existing CONFIG_HSR to
CONFIG_HSR_PRP to introduce PRP.

Signed-off-by: Murali Karicheri <m-karicheri2@...com>
---
 net/Makefile     |  2 +-
 net/hsr/Kconfig  | 38 +++++++++++++++++++++++---------------
 net/hsr/Makefile |  2 +-
 3 files changed, 25 insertions(+), 17 deletions(-)

diff --git a/net/Makefile b/net/Makefile
index 07ea48160874..4f1c6a44f2c3 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -77,7 +77,7 @@ obj-$(CONFIG_OPENVSWITCH)	+= openvswitch/
 obj-$(CONFIG_VSOCKETS)	+= vmw_vsock/
 obj-$(CONFIG_MPLS)		+= mpls/
 obj-$(CONFIG_NET_NSH)		+= nsh/
-obj-$(CONFIG_HSR)		+= hsr/
+obj-$(CONFIG_HSR_PRP)		+= hsr/
 ifneq ($(CONFIG_NET_SWITCHDEV),)
 obj-y				+= switchdev/
 endif
diff --git a/net/hsr/Kconfig b/net/hsr/Kconfig
index 9c58f8763997..220befd8e2c3 100644
--- a/net/hsr/Kconfig
+++ b/net/hsr/Kconfig
@@ -1,27 +1,35 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
-# IEC 62439-3 High-availability Seamless Redundancy
+# IEC 62439-3 High-availability Seamless Redundancy (HSR) /
+# IEC 62439-4 Parallel Redundancy Protocol (PRP)
 #
-
-config HSR
-	tristate "High-availability Seamless Redundancy (HSR)"
+config HSR_PRP
+	tristate "IEC 62439 HSR/PRP Support"
 	---help---
+	  This enables IEC 62439 defined High-availability Seamless
+	  Redundancy (HSR) and Parallel Redundancy Protocol (PRP).
 	  If you say Y here, then your Linux box will be able to act as a
-	  DANH ("Doubly attached node implementing HSR"). For this to work,
-	  your Linux box needs (at least) two physical Ethernet interfaces,
-	  and it must be connected as a node in a ring network together with
-	  other HSR capable nodes.
+	  DANH ("Doubly attached node implementing HSR") or DANP ("Doubly
+	  attached node implementing PRP"). For this to work, your Linux
+	  box needs (at least) two physical Ethernet interfaces.
+
+	  For DANH, it must be connected as a node in a ring network together
+	  with other HSR capable nodes. All Ethernet frames sent over the hsr
+	  device will be sent in both directions on the ring (over both slave
+	  ports), giving a redundant, instant fail-over network. Each HSR node
+	  in the ring acts like a bridge for HSR frames, but filters frames
+	  that have been forwarded earlier.
 
-	  All Ethernet frames sent over the hsr device will be sent in both
-	  directions on the ring (over both slave ports), giving a redundant,
-	  instant fail-over network. Each HSR node in the ring acts like a
-	  bridge for HSR frames, but filters frames that have been forwarded
-	  earlier.
+	  For DANP, it must be connected as a node connecting to two
+	  separate networks over the two slave interfaces. Like HSR, Ethernet
+	  frames sent over the prp device will be sent to both networks giving
+	  a redundant, instant fail-over network.
 
 	  This code is a "best effort" to comply with the HSR standard as
 	  described in IEC 62439-3:2010 (HSRv0) and IEC 62439-3:2012 (HSRv1),
-	  but no compliancy tests have been made. Use iproute2 to select
-	  the version you desire.
+	  and PRP standard described in IEC 62439-4:2012 (PRP), but no
+	  compliancy tests have been made. Use iproute2 to select the protocol
+	  you would like to use.
 
 	  You need to perform any and all necessary tests yourself before
 	  relying on this code in a safety critical system!
diff --git a/net/hsr/Makefile b/net/hsr/Makefile
index 75df90d3b416..fd207c1a0854 100644
--- a/net/hsr/Makefile
+++ b/net/hsr/Makefile
@@ -3,7 +3,7 @@
 # Makefile for HSR
 #
 
-obj-$(CONFIG_HSR)	+= hsr.o
+obj-$(CONFIG_HSR_PRP)	+= hsr.o
 
 hsr-y			:= hsr_main.o hsr_framereg.o hsr_device.o \
 			   hsr_netlink.o hsr_slave.o hsr_forward.o
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ