Skip to contentSkip to conversation

ip: link add vxcan support

PATCH Applied Oliver Hartkopp 2 participants 2 messages Jun 2, 2017 – Jun 5, 2017

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

PATCH 1/1 ip: link add vxcan support

Since commit a8f820a380a2a06 ('can: add Virtual CAN Tunnel driver (vxcan)') for Linux 4.12 a virtual CAN tunnel driver analogue to veth is available in Linux.

This patch adds the ability to create vxcan device pairs.

---
 include/linux/can/vxcan.h | 12 ++++++
 ip/Makefile               |  2 +-
 ip/iplink_vxcan.c         | 99 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 112 insertions(+), 1 deletion(-)
 create mode 100644 include/linux/can/vxcan.h
 create mode 100644 ip/iplink_vxcan.c
include/linux/can/vxcan.h new file +12 -0
new file mode 100644
index 00000000..ffb0b715
@@ -0,0 +1,12 @@
+#ifndef _UAPI_CAN_VXCAN_H
+#define _UAPI_CAN_VXCAN_H
+
+enum {
+	VXCAN_INFO_UNSPEC,
+	VXCAN_INFO_PEER,
+
+	__VXCAN_INFO_MAX
+#define VXCAN_INFO_MAX	(__VXCAN_INFO_MAX - 1)
+};
+
+#endif
ip/Makefile +1 -1
index e08c170a..8424b1f6 100644
@@ -2,7 +2,7 @@ IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \
     rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
     ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o iptoken.o \
     ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o iplink_dummy.o \
-    iplink_ifb.o iplink_nlmon.o iplink_team.o iplink_vcan.o \
+    iplink_ifb.o iplink_nlmon.o iplink_team.o iplink_vcan.o iplink_vxcan.o \
     iplink_vlan.o link_veth.o link_gre.o iplink_can.o iplink_xdp.o \
     iplink_macvlan.o ipl2tp.o link_vti.o link_vti6.o \
     iplink_vxlan.o tcp_metrics.o iplink_ipoib.o ipnetconf.o link_ip6tnl.o \
ip/iplink_vxcan.c new file +99 -0

99 lines not on this page · raw message

Signature · 1 line
2.11.0
#1 lore raw
Quoted 7 lines · On Fri, 2 Jun 2017 19:04:47 +0200 Oliver Hartkopp <[email protected]>…

Since commit a8f820a380a2a06 ('can: add Virtual CAN Tunnel driver (vxcan)') for Linux 4.12 a virtual CAN tunnel driver analogue to veth is available in Linux.

This patch adds the ability to create vxcan device pairs.

Applied, with minor header cleanup so that sanitized headers are used.

include/linux/can/vxcan.h +2 -2
index ffb0b7156f7e..5b29e8a7bc27 100644
@@ -1,5 +1,5 @@
-#ifndef _UAPI_CAN_VXCAN_H
-#define _UAPI_CAN_VXCAN_H
+#ifndef _CAN_VXCAN_H
+#define _CAN_VXCAN_H
 
 enum {
        VXCAN_INFO_UNSPEC,