naccyde / rpms / iproute

Forked from rpms/iproute 10 months ago
Clone

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

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