naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone

Blame SOURCES/0066-uapi-update-headers-to-4.20-rc1.patch

8def76
From 3caa0fed6aa58a8f7a05486f98572878a8ad5b30 Mon Sep 17 00:00:00 2001
8def76
From: Andrea Claudi <aclaudi@redhat.com>
8def76
Date: Thu, 13 Jun 2019 14:37:57 +0200
8def76
Subject: [PATCH] uapi: update headers to 4.20-rc1
8def76
8def76
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1716361
8def76
Upstream Status: iproute2.git commit 39776a8665f2d
8def76
8def76
commit 39776a8665f2db1255ebed1f7cc992f69437bc36
8def76
Author: Stephen Hemminger <stephen@networkplumber.org>
8def76
Date:   Mon Nov 5 08:37:41 2018 -0800
8def76
8def76
    uapi: update headers to 4.20-rc1
8def76
8def76
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
8def76
---
8def76
 include/uapi/linux/bpf.h     | 142 ++++++++++++++++++++++++++++++++++-
8def76
 include/uapi/linux/elf-em.h  |   1 +
8def76
 include/uapi/linux/if_link.h |   1 +
8def76
 include/uapi/linux/magic.h   |   1 +
8def76
 include/uapi/linux/netlink.h |   1 +
8def76
 include/uapi/linux/sctp.h    |   1 +
8def76
 6 files changed, 145 insertions(+), 2 deletions(-)
8def76
8def76
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
8def76
index abb7f7748c2de..2bbe33db8aefa 100644
8def76
--- a/include/uapi/linux/bpf.h
8def76
+++ b/include/uapi/linux/bpf.h
8def76
@@ -103,6 +103,7 @@ enum bpf_cmd {
8def76
 	BPF_BTF_LOAD,
8def76
 	BPF_BTF_GET_FD_BY_ID,
8def76
 	BPF_TASK_FD_QUERY,
8def76
+	BPF_MAP_LOOKUP_AND_DELETE_ELEM,
8def76
 };
8def76
 
8def76
 enum bpf_map_type {
8def76
@@ -127,6 +128,9 @@ enum bpf_map_type {
8def76
 	BPF_MAP_TYPE_SOCKHASH,
8def76
 	BPF_MAP_TYPE_CGROUP_STORAGE,
8def76
 	BPF_MAP_TYPE_REUSEPORT_SOCKARRAY,
8def76
+	BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE,
8def76
+	BPF_MAP_TYPE_QUEUE,
8def76
+	BPF_MAP_TYPE_STACK,
8def76
 };
8def76
 
8def76
 enum bpf_prog_type {
8def76
@@ -461,6 +465,28 @@ union bpf_attr {
8def76
  * 	Return
8def76
  * 		0 on success, or a negative error in case of failure.
8def76
  *
8def76
+ * int bpf_map_push_elem(struct bpf_map *map, const void *value, u64 flags)
8def76
+ * 	Description
8def76
+ * 		Push an element *value* in *map*. *flags* is one of:
8def76
+ *
8def76
+ * 		**BPF_EXIST**
8def76
+ * 		If the queue/stack is full, the oldest element is removed to
8def76
+ * 		make room for this.
8def76
+ * 	Return
8def76
+ * 		0 on success, or a negative error in case of failure.
8def76
+ *
8def76
+ * int bpf_map_pop_elem(struct bpf_map *map, void *value)
8def76
+ * 	Description
8def76
+ * 		Pop an element from *map*.
8def76
+ * Return
8def76
+ * 		0 on success, or a negative error in case of failure.
8def76
+ *
8def76
+ * int bpf_map_peek_elem(struct bpf_map *map, void *value)
8def76
+ * 	Description
8def76
+ * 		Get an element from *map* without removing it.
8def76
+ * Return
8def76
+ * 		0 on success, or a negative error in case of failure.
8def76
+ *
8def76
  * int bpf_probe_read(void *dst, u32 size, const void *src)
8def76
  * 	Description
8def76
  * 		For tracing programs, safely attempt to read *size* bytes from
8def76
@@ -1432,7 +1458,7 @@ union bpf_attr {
8def76
  * 	Return
8def76
  * 		0 on success, or a negative error in case of failure.
8def76
  *
8def76
- * int bpf_skb_adjust_room(struct sk_buff *skb, u32 len_diff, u32 mode, u64 flags)
8def76
+ * int bpf_skb_adjust_room(struct sk_buff *skb, s32 len_diff, u32 mode, u64 flags)
8def76
  * 	Description
8def76
  * 		Grow or shrink the room for data in the packet associated to
8def76
  * 		*skb* by *len_diff*, and according to the selected *mode*.
8def76
@@ -2143,6 +2169,94 @@ union bpf_attr {
8def76
  *		request in the skb.
8def76
  *	Return
8def76
  *		0 on success, or a negative error in case of failure.
8def76
+ *
8def76
+ * struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags)
8def76
+ *	Description
8def76
+ *		Look for TCP socket matching *tuple*, optionally in a child
8def76
+ *		network namespace *netns*. The return value must be checked,
8def76
+ *		and if non-NULL, released via **bpf_sk_release**\ ().
8def76
+ *
8def76
+ *		The *ctx* should point to the context of the program, such as
8def76
+ *		the skb or socket (depending on the hook in use). This is used
8def76
+ *		to determine the base network namespace for the lookup.
8def76
+ *
8def76
+ *		*tuple_size* must be one of:
8def76
+ *
8def76
+ *		**sizeof**\ (*tuple*\ **->ipv4**)
8def76
+ *			Look for an IPv4 socket.
8def76
+ *		**sizeof**\ (*tuple*\ **->ipv6**)
8def76
+ *			Look for an IPv6 socket.
8def76
+ *
8def76
+ *		If the *netns* is zero, then the socket lookup table in the
8def76
+ *		netns associated with the *ctx* will be used. For the TC hooks,
8def76
+ *		this in the netns of the device in the skb. For socket hooks,
8def76
+ *		this in the netns of the socket. If *netns* is non-zero, then
8def76
+ *		it specifies the ID of the netns relative to the netns
8def76
+ *		associated with the *ctx*.
8def76
+ *
8def76
+ *		All values for *flags* are reserved for future usage, and must
8def76
+ *		be left at zero.
8def76
+ *
8def76
+ *		This helper is available only if the kernel was compiled with
8def76
+ *		**CONFIG_NET** configuration option.
8def76
+ *	Return
8def76
+ *		Pointer to *struct bpf_sock*, or NULL in case of failure.
8def76
+ *
8def76
+ * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags)
8def76
+ *	Description
8def76
+ *		Look for UDP socket matching *tuple*, optionally in a child
8def76
+ *		network namespace *netns*. The return value must be checked,
8def76
+ *		and if non-NULL, released via **bpf_sk_release**\ ().
8def76
+ *
8def76
+ *		The *ctx* should point to the context of the program, such as
8def76
+ *		the skb or socket (depending on the hook in use). This is used
8def76
+ *		to determine the base network namespace for the lookup.
8def76
+ *
8def76
+ *		*tuple_size* must be one of:
8def76
+ *
8def76
+ *		**sizeof**\ (*tuple*\ **->ipv4**)
8def76
+ *			Look for an IPv4 socket.
8def76
+ *		**sizeof**\ (*tuple*\ **->ipv6**)
8def76
+ *			Look for an IPv6 socket.
8def76
+ *
8def76
+ *		If the *netns* is zero, then the socket lookup table in the
8def76
+ *		netns associated with the *ctx* will be used. For the TC hooks,
8def76
+ *		this in the netns of the device in the skb. For socket hooks,
8def76
+ *		this in the netns of the socket. If *netns* is non-zero, then
8def76
+ *		it specifies the ID of the netns relative to the netns
8def76
+ *		associated with the *ctx*.
8def76
+ *
8def76
+ *		All values for *flags* are reserved for future usage, and must
8def76
+ *		be left at zero.
8def76
+ *
8def76
+ *		This helper is available only if the kernel was compiled with
8def76
+ *		**CONFIG_NET** configuration option.
8def76
+ *	Return
8def76
+ *		Pointer to *struct bpf_sock*, or NULL in case of failure.
8def76
+ *
8def76
+ * int bpf_sk_release(struct bpf_sock *sk)
8def76
+ *	Description
8def76
+ *		Release the reference held by *sock*. *sock* must be a non-NULL
8def76
+ *		pointer that was returned from bpf_sk_lookup_xxx\ ().
8def76
+ *	Return
8def76
+ *		0 on success, or a negative error in case of failure.
8def76
+ *
8def76
+ * int bpf_msg_push_data(struct sk_buff *skb, u32 start, u32 len, u64 flags)
8def76
+ *	Description
8def76
+ *		For socket policies, insert *len* bytes into msg at offset
8def76
+ *		*start*.
8def76
+ *
8def76
+ *		If a program of type **BPF_PROG_TYPE_SK_MSG** is run on a
8def76
+ *		*msg* it may want to insert metadata or options into the msg.
8def76
+ *		This can later be read and used by any of the lower layer BPF
8def76
+ *		hooks.
8def76
+ *
8def76
+ *		This helper may fail if under memory pressure (a malloc
8def76
+ *		fails) in these cases BPF programs will get an appropriate
8def76
+ *		error and BPF programs will need to handle them.
8def76
+ *
8def76
+ *	Return
8def76
+ *		0 on success, or a negative error in case of failure.
8def76
  */
8def76
 #define __BPF_FUNC_MAPPER(FN)		\
8def76
 	FN(unspec),			\
8def76
@@ -2228,7 +2342,14 @@ union bpf_attr {
8def76
 	FN(get_current_cgroup_id),	\
8def76
 	FN(get_local_storage),		\
8def76
 	FN(sk_select_reuseport),	\
8def76
-	FN(skb_ancestor_cgroup_id),
8def76
+	FN(skb_ancestor_cgroup_id),	\
8def76
+	FN(sk_lookup_tcp),		\
8def76
+	FN(sk_lookup_udp),		\
8def76
+	FN(sk_release),			\
8def76
+	FN(map_push_elem),		\
8def76
+	FN(map_pop_elem),		\
8def76
+	FN(map_peek_elem),		\
8def76
+	FN(msg_push_data),
8def76
 
8def76
 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
8def76
  * function eBPF program intends to call
8def76
@@ -2398,6 +2519,23 @@ struct bpf_sock {
8def76
 				 */
8def76
 };
8def76
 
8def76
+struct bpf_sock_tuple {
8def76
+	union {
8def76
+		struct {
8def76
+			__be32 saddr;
8def76
+			__be32 daddr;
8def76
+			__be16 sport;
8def76
+			__be16 dport;
8def76
+		} ipv4;
8def76
+		struct {
8def76
+			__be32 saddr[4];
8def76
+			__be32 daddr[4];
8def76
+			__be16 sport;
8def76
+			__be16 dport;
8def76
+		} ipv6;
8def76
+	};
8def76
+};
8def76
+
8def76
 #define XDP_PACKET_HEADROOM 256
8def76
 
8def76
 /* User return codes for XDP prog type.
8def76
diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h
8def76
index 31aa101783351..93722e60204c6 100644
8def76
--- a/include/uapi/linux/elf-em.h
8def76
+++ b/include/uapi/linux/elf-em.h
8def76
@@ -41,6 +41,7 @@
8def76
 #define EM_TILEPRO	188	/* Tilera TILEPro */
8def76
 #define EM_MICROBLAZE	189	/* Xilinx MicroBlaze */
8def76
 #define EM_TILEGX	191	/* Tilera TILE-Gx */
8def76
+#define EM_RISCV	243	/* RISC-V */
8def76
 #define EM_BPF		247	/* Linux BPF - in-kernel virtual machine */
8def76
 #define EM_FRV		0x5441	/* Fujitsu FR-V */
8def76
 
8def76
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
8def76
index 9c254603ebdad..52e95197e0790 100644
8def76
--- a/include/uapi/linux/if_link.h
8def76
+++ b/include/uapi/linux/if_link.h
8def76
@@ -285,6 +285,7 @@ enum {
8def76
 	IFLA_BR_MCAST_STATS_ENABLED,
8def76
 	IFLA_BR_MCAST_IGMP_VERSION,
8def76
 	IFLA_BR_MCAST_MLD_VERSION,
8def76
+	IFLA_BR_VLAN_STATS_PER_PORT,
8def76
 	__IFLA_BR_MAX,
8def76
 };
8def76
 
8def76
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
8def76
index 1a6fee974116a..96c24478d8ced 100644
8def76
--- a/include/uapi/linux/magic.h
8def76
+++ b/include/uapi/linux/magic.h
8def76
@@ -29,6 +29,7 @@
8def76
 #define HPFS_SUPER_MAGIC	0xf995e849
8def76
 #define ISOFS_SUPER_MAGIC	0x9660
8def76
 #define JFFS2_SUPER_MAGIC	0x72b6
8def76
+#define XFS_SUPER_MAGIC		0x58465342	/* "XFSB" */
8def76
 #define PSTOREFS_MAGIC		0x6165676C
8def76
 #define EFIVARFS_MAGIC		0xde5e81e4
8def76
 #define HOSTFS_SUPER_MAGIC	0x00c0ffee
8def76
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
8def76
index 0b2c29bd081fa..2966171b9b95c 100644
8def76
--- a/include/uapi/linux/netlink.h
8def76
+++ b/include/uapi/linux/netlink.h
8def76
@@ -153,6 +153,7 @@ enum nlmsgerr_attrs {
8def76
 #define NETLINK_LIST_MEMBERSHIPS	9
8def76
 #define NETLINK_CAP_ACK			10
8def76
 #define NETLINK_EXT_ACK			11
8def76
+#define NETLINK_DUMP_STRICT_CHK		12
8def76
 
8def76
 struct nl_pktinfo {
8def76
 	__u32	group;
8def76
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
8def76
index dd164d7f4f41a..626480b68fb59 100644
8def76
--- a/include/uapi/linux/sctp.h
8def76
+++ b/include/uapi/linux/sctp.h
8def76
@@ -301,6 +301,7 @@ enum sctp_sinfo_flags {
8def76
 	SCTP_SACK_IMMEDIATELY	= (1 << 3), /* SACK should be sent without delay. */
8def76
 	/* 2 bits here have been used by SCTP_PR_SCTP_MASK */
8def76
 	SCTP_SENDALL		= (1 << 6),
8def76
+	SCTP_PR_SCTP_ALL	= (1 << 7),
8def76
 	SCTP_NOTIFICATION	= MSG_NOTIFICATION, /* Next message is not user msg but notification. */
8def76
 	SCTP_EOF		= MSG_FIN,  /* Initiate graceful shutdown process. */
8def76
 };
8def76
-- 
8def76
2.20.1
8def76