naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

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

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