Skip to contentSkip to conversation

ip: Add HSR support

PATCH In review Arvid Brodin 3 participants 3 messages Nov 8, 2013 – Nov 25, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ip: Add HSR support

This patch adds basic support for High-Availability Seamless Redundancy (HSR) network devices.

---

 include/linux/if_link.h |  14 ++++++
 ip/Makefile             |   2 +-
 ip/iplink_hsr.c         | 127 ++++++++++++++++++++++++++++++++++++++++++++++++
 man/man8/ip-link.8.in   |   1 +
 4 files changed, 143 insertions(+), 1 deletion(-)
 create mode 100644 ip/iplink_hsr.c
include/linux/if_link.h +14 -0
index ee4f2ba..1f429f1 100644
@@ -468,4 +468,18 @@ enum {
 
 #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
 
+/* HSR section */
+
+enum {
+	IFLA_HSR_UNSPEC,
+	IFLA_HSR_SLAVE1,
+	IFLA_HSR_SLAVE2,
+	IFLA_HSR_MULTICAST_SPEC,	/* Last byte of supervision addr */
+	IFLA_HSR_SUPERVISION_ADDR,	/* Supervision frame multicast addr */
+	IFLA_HSR_SEQ_NR,
+	__IFLA_HSR_MAX,
+};
+
+#define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1)
+
 #endif /* _LINUX_IF_LINK_H */
ip/Makefile +1 -1
index f10d22f..9dad492 100644
@@ -5,7 +5,7 @@ IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \
     iplink_vlan.o link_veth.o link_gre.o iplink_can.o \
     iplink_macvlan.o iplink_macvtap.o ipl2tp.o link_vti.o \
     iplink_vxlan.o tcp_metrics.o iplink_ipoib.o ipnetconf.o link_ip6tnl.o \
-    link_iptnl.o link_gre6.o
+    link_iptnl.o link_gre6.o iplink_hsr.o
 
 RTMONOBJ=rtmon.o
 
ip/iplink_hsr.c new file +127 -0

127 lines not on this page · raw message

man/man8/ip-link.8.in +1 -0
index 8b68c78..7f7f882 100644
@@ -53,6 +53,7 @@ ip-link \- network device configuration
 .BR bridge " | "
 .BR can " | "
 .BR dummy " | "
+.BR hsr " | "
 .BR ifb " | "
 .BR ipoib " |"
 .BR macvlan  " | "
Signature · 6 lines
1.8.1.5


-- 
Arvid Brodin | Consultant (Linux)
XDIN AB | Knarrarnäsgatan 7 | SE-164 40 Kista | Sweden | xdin.com
#1 lore raw
Quoted 4 lines · On Fri, 8 Nov 2013 20:34:36 +0100 Arvid Brodin <[email protected]> wrote:

This patch adds basic support for High-Availability Seamless Redundancy (HSR) network devices.

Will not apply to current iproute source. The header files have been updated to be from current upstream (linus), and the IFLA_HSR doesn't match.

Please fix, and resubmit. Note, for iproute2 the header files are updated perodically by using headers from kernel source (sanitized).

usr/include/linux/if_link.h

/* HSR section */

enum {
        IFLA_HSR_UNSPEC,
        IFLA_HSR_SLAVE1,
        IFLA_HSR_SLAVE2,
        IFLA_HSR_MULTICAST_SPEC,
        __IFLA_HSR_MAX,
};

#define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1)

#2 lore raw
Quoted 10 lines · Stephen Hemminger
Quoted 4 lines · On Fri, 8 Nov 2013 20:34:36 +0100 Arvid Brodin <[email protected]> wrote:

This patch adds basic support for High-Availability Seamless Redundancy (HSR) network devices.

Will not apply to current iproute source. The header files have been updated to be from current upstream (linus), and the IFLA_HSR doesn't match.

So, what's the least annoying (for everyone) way of getting the updated header file into the kernel _and_ iproute?

I guess the iproute patch should be against net-next-for-3.13? (The HSR kernel patch was picked up into 3.13-rc1.)

And the updated kernel patch (with the .fill_info routine implemented and the updated header file), where do I send that?

--
Arvid Brodin | Consultant (Linux)
ALTEN | Knarrarnäsgatan 7 | SE-164 40 Kista | Sweden [email protected] | www.alten.se/en/

________________________________
Xdin is changing its name. From 25 November 2013 we will be known as Alten. Read more at www.alten.se