naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone

Blame SOURCES/0016-Update-kernel-headers-and-import-mptcp.h.patch

07a51b
From 93f77d1e57c84093b91bc9227929cfb4a24534e9 Mon Sep 17 00:00:00 2001
07a51b
From: Andrea Claudi <aclaudi@redhat.com>
07a51b
Date: Thu, 4 Jun 2020 19:25:47 +0200
07a51b
Subject: [PATCH] Update kernel headers and import mptcp.h
07a51b
07a51b
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1812207
07a51b
Upstream Status: iproute2.git commit 02ade5a8ea1c2
07a51b
Conflicts: on bpf uapi due to missing commit b5a77cf70116f ("uapi: update bpf.h")
07a51b
           and on if_bridge uapi due to several unrelated missing changes.
07a51b
07a51b
commit 02ade5a8ea1c23201a99d8cdf7e02a6ba90d7718
07a51b
Author: David Ahern <dsahern@gmail.com>
07a51b
Date:   Wed Apr 29 16:41:39 2020 +0000
07a51b
07a51b
    Update kernel headers and import mptcp.h
07a51b
07a51b
    Update kernel headers to commit
07a51b
        790ab249b55d ("net: ethernet: fec: Prevent MII event after MII_SPEED write")
07a51b
07a51b
    and import mptcp.h
07a51b
07a51b
    Signed-off-by: David Ahern <dsahern@gmail.com>
07a51b
---
07a51b
 include/uapi/linux/if.h        |  1 +
07a51b
 include/uapi/linux/if_bridge.h |  1 +
07a51b
 include/uapi/linux/if_ether.h  |  1 +
07a51b
 include/uapi/linux/if_link.h   |  1 +
07a51b
 include/uapi/linux/mptcp.h     | 89 ++++++++++++++++++++++++++++++++++
07a51b
 5 files changed, 93 insertions(+)
07a51b
 create mode 100644 include/uapi/linux/mptcp.h
07a51b
07a51b
diff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h
07a51b
index 626da393123b6..9a3bc23d0235e 100644
07a51b
--- a/include/uapi/linux/if.h
07a51b
+++ b/include/uapi/linux/if.h
07a51b
@@ -175,6 +175,7 @@ enum {
07a51b
 enum {
07a51b
 	IF_LINK_MODE_DEFAULT,
07a51b
 	IF_LINK_MODE_DORMANT,	/* limit upward transition to dormant */
07a51b
+	IF_LINK_MODE_TESTING,	/* limit upward transition to testing */
07a51b
 };
07a51b
 
07a51b
 /*
07a51b
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h
07a51b
index 31fc51bdedb3c..53ba8385b022e 100644
07a51b
--- a/include/uapi/linux/if_bridge.h
07a51b
+++ b/include/uapi/linux/if_bridge.h
07a51b
@@ -120,6 +120,7 @@ enum {
07a51b
 	IFLA_BRIDGE_MODE,
07a51b
 	IFLA_BRIDGE_VLAN_INFO,
07a51b
 	IFLA_BRIDGE_VLAN_TUNNEL_INFO,
07a51b
+	IFLA_BRIDGE_MRP,
07a51b
 	__IFLA_BRIDGE_MAX,
07a51b
 };
07a51b
 #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
07a51b
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
07a51b
index 728c42dfd59c1..1a0c7dfe8e38e 100644
07a51b
--- a/include/uapi/linux/if_ether.h
07a51b
+++ b/include/uapi/linux/if_ether.h
07a51b
@@ -92,6 +92,7 @@
07a51b
 #define ETH_P_PREAUTH	0x88C7		/* 802.11 Preauthentication */
07a51b
 #define ETH_P_TIPC	0x88CA		/* TIPC 			*/
07a51b
 #define ETH_P_LLDP	0x88CC		/* Link Layer Discovery Protocol */
07a51b
+#define ETH_P_MRP	0x88E3		/* Media Redundancy Protocol	*/
07a51b
 #define ETH_P_MACSEC	0x88E5		/* 802.1ae MACsec */
07a51b
 #define ETH_P_8021AH	0x88E7          /* 802.1ah Backbone Service Tag */
07a51b
 #define ETH_P_MVRP	0x88F5          /* 802.1Q MVRP                  */
07a51b
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
07a51b
index d36919fb4024a..4da0768d7a5a3 100644
07a51b
--- a/include/uapi/linux/if_link.h
07a51b
+++ b/include/uapi/linux/if_link.h
07a51b
@@ -338,6 +338,7 @@ enum {
07a51b
 	IFLA_BRPORT_NEIGH_SUPPRESS,
07a51b
 	IFLA_BRPORT_ISOLATED,
07a51b
 	IFLA_BRPORT_BACKUP_PORT,
07a51b
+	IFLA_BRPORT_MRP_RING_OPEN,
07a51b
 	__IFLA_BRPORT_MAX
07a51b
 };
07a51b
 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
07a51b
diff --git a/include/uapi/linux/mptcp.h b/include/uapi/linux/mptcp.h
07a51b
new file mode 100644
07a51b
index 0000000000000..009b8f0b0e8be
07a51b
--- /dev/null
07a51b
+++ b/include/uapi/linux/mptcp.h
07a51b
@@ -0,0 +1,89 @@
07a51b
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
07a51b
+#ifndef _MPTCP_H
07a51b
+#define _MPTCP_H
07a51b
+
07a51b
+#include <linux/const.h>
07a51b
+#include <linux/types.h>
07a51b
+
07a51b
+#define MPTCP_SUBFLOW_FLAG_MCAP_REM		_BITUL(0)
07a51b
+#define MPTCP_SUBFLOW_FLAG_MCAP_LOC		_BITUL(1)
07a51b
+#define MPTCP_SUBFLOW_FLAG_JOIN_REM		_BITUL(2)
07a51b
+#define MPTCP_SUBFLOW_FLAG_JOIN_LOC		_BITUL(3)
07a51b
+#define MPTCP_SUBFLOW_FLAG_BKUP_REM		_BITUL(4)
07a51b
+#define MPTCP_SUBFLOW_FLAG_BKUP_LOC		_BITUL(5)
07a51b
+#define MPTCP_SUBFLOW_FLAG_FULLY_ESTABLISHED	_BITUL(6)
07a51b
+#define MPTCP_SUBFLOW_FLAG_CONNECTED		_BITUL(7)
07a51b
+#define MPTCP_SUBFLOW_FLAG_MAPVALID		_BITUL(8)
07a51b
+
07a51b
+enum {
07a51b
+	MPTCP_SUBFLOW_ATTR_UNSPEC,
07a51b
+	MPTCP_SUBFLOW_ATTR_TOKEN_REM,
07a51b
+	MPTCP_SUBFLOW_ATTR_TOKEN_LOC,
07a51b
+	MPTCP_SUBFLOW_ATTR_RELWRITE_SEQ,
07a51b
+	MPTCP_SUBFLOW_ATTR_MAP_SEQ,
07a51b
+	MPTCP_SUBFLOW_ATTR_MAP_SFSEQ,
07a51b
+	MPTCP_SUBFLOW_ATTR_SSN_OFFSET,
07a51b
+	MPTCP_SUBFLOW_ATTR_MAP_DATALEN,
07a51b
+	MPTCP_SUBFLOW_ATTR_FLAGS,
07a51b
+	MPTCP_SUBFLOW_ATTR_ID_REM,
07a51b
+	MPTCP_SUBFLOW_ATTR_ID_LOC,
07a51b
+	MPTCP_SUBFLOW_ATTR_PAD,
07a51b
+	__MPTCP_SUBFLOW_ATTR_MAX
07a51b
+};
07a51b
+
07a51b
+#define MPTCP_SUBFLOW_ATTR_MAX (__MPTCP_SUBFLOW_ATTR_MAX - 1)
07a51b
+
07a51b
+/* netlink interface */
07a51b
+#define MPTCP_PM_NAME		"mptcp_pm"
07a51b
+#define MPTCP_PM_CMD_GRP_NAME	"mptcp_pm_cmds"
07a51b
+#define MPTCP_PM_VER		0x1
07a51b
+
07a51b
+/*
07a51b
+ * ATTR types defined for MPTCP
07a51b
+ */
07a51b
+enum {
07a51b
+	MPTCP_PM_ATTR_UNSPEC,
07a51b
+
07a51b
+	MPTCP_PM_ATTR_ADDR,				/* nested address */
07a51b
+	MPTCP_PM_ATTR_RCV_ADD_ADDRS,			/* u32 */
07a51b
+	MPTCP_PM_ATTR_SUBFLOWS,				/* u32 */
07a51b
+
07a51b
+	__MPTCP_PM_ATTR_MAX
07a51b
+};
07a51b
+
07a51b
+#define MPTCP_PM_ATTR_MAX (__MPTCP_PM_ATTR_MAX - 1)
07a51b
+
07a51b
+enum {
07a51b
+	MPTCP_PM_ADDR_ATTR_UNSPEC,
07a51b
+
07a51b
+	MPTCP_PM_ADDR_ATTR_FAMILY,			/* u16 */
07a51b
+	MPTCP_PM_ADDR_ATTR_ID,				/* u8 */
07a51b
+	MPTCP_PM_ADDR_ATTR_ADDR4,			/* struct in_addr */
07a51b
+	MPTCP_PM_ADDR_ATTR_ADDR6,			/* struct in6_addr */
07a51b
+	MPTCP_PM_ADDR_ATTR_PORT,			/* u16 */
07a51b
+	MPTCP_PM_ADDR_ATTR_FLAGS,			/* u32 */
07a51b
+	MPTCP_PM_ADDR_ATTR_IF_IDX,			/* s32 */
07a51b
+
07a51b
+	__MPTCP_PM_ADDR_ATTR_MAX
07a51b
+};
07a51b
+
07a51b
+#define MPTCP_PM_ADDR_ATTR_MAX (__MPTCP_PM_ADDR_ATTR_MAX - 1)
07a51b
+
07a51b
+#define MPTCP_PM_ADDR_FLAG_SIGNAL			(1 << 0)
07a51b
+#define MPTCP_PM_ADDR_FLAG_SUBFLOW			(1 << 1)
07a51b
+#define MPTCP_PM_ADDR_FLAG_BACKUP			(1 << 2)
07a51b
+
07a51b
+enum {
07a51b
+	MPTCP_PM_CMD_UNSPEC,
07a51b
+
07a51b
+	MPTCP_PM_CMD_ADD_ADDR,
07a51b
+	MPTCP_PM_CMD_DEL_ADDR,
07a51b
+	MPTCP_PM_CMD_GET_ADDR,
07a51b
+	MPTCP_PM_CMD_FLUSH_ADDRS,
07a51b
+	MPTCP_PM_CMD_SET_LIMITS,
07a51b
+	MPTCP_PM_CMD_GET_LIMITS,
07a51b
+
07a51b
+	__MPTCP_PM_CMD_AFTER_LAST
07a51b
+};
07a51b
+
07a51b
+#endif /* _MPTCP_H */
07a51b
-- 
07a51b
2.26.2
07a51b