Skip to contentSkip to conversation

net/hsr: Add support for IEC 62439-3 High-availability Seamless Redundancy

RFC In review Arvid Brodin 1 participant 1 message Jul 4, 2012

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

RFC v2 2/2 net/hsr: Add support for IEC 62439-3 High-availability Seamless Redundancy

The iproute patch.

Syntax:

# ip link add name hsr0 type hsr eth0 eth1
# ip link del dev hsr0
ip/Makefile +1 -1
diff -Nurp iproute2-2.6.35-orig/ip/Makefile iproute2-2.6.35-hsr/ip/Makefile
@@ -3,7 +3,7 @@ IPOBJ=ip.o ipaddress.o ipaddrlabel.o ipr
     ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o \
     ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o \
     iplink_vlan.o link_veth.o link_gre.o iplink_can.o \
-    iplink_macvlan.o
+    iplink_macvlan.o iplink_hsr.o
 
 RTMONOBJ=rtmon.o
 
ip/iplink_hsr.c +101 -0

101 lines not on this page · raw message

ip/iplink.c +1 -1
@@ -433,6 +433,6 @@ static int iplink_modify(int cmd, unsign
 
 		lu = get_link_kind(type);
-		if (lu && argc) {
+		if (lu) {
 			struct rtattr * data = NLMSG_TAIL(&req.n);
 			addattr_l(&req.n, sizeof(req), IFLA_INFO_DATA, NULL, 0);
 
include/linux/if_link.h +11 -0
@@ -347,4 +347,15 @@ struct ifla_port_vsi {
 	__u8 pad[3];
 };
 
+/* HSR section */
+
+enum {
+	IFLA_HSR_UNSPEC,
+	IFLA_HSR_SLAVE1,
+	IFLA_HSR_SLAVE2,
+	__IFLA_HSR_MAX,
+};
+
+#define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1)
+
 #endif /* _LINUX_IF_LINK_H */
Signature · 2 lines
Arvid Brodin | Consultant (Linux)
XDIN AB | Jan Stenbecks Torg 17 | SE-164 40 Kista | Sweden | xdin.com