naccyde / rpms / iproute

Forked from rpms/iproute 7 months ago
Clone

Blame SOURCES/0002-Update-kernel-headers.patch

26f871
From 1b8a3c04bf8d115e2d427d41a437be03ecf34ce8 Mon Sep 17 00:00:00 2001
26f871
Message-Id: <1b8a3c04bf8d115e2d427d41a437be03ecf34ce8.1611877215.git.aclaudi@redhat.com>
26f871
In-Reply-To: <cb7ce51cc1abd7b98370b903ec96205ebfe48661.1611877215.git.aclaudi@redhat.com>
26f871
References: <cb7ce51cc1abd7b98370b903ec96205ebfe48661.1611877215.git.aclaudi@redhat.com>
07a51b
From: Andrea Claudi <aclaudi@redhat.com>
26f871
Date: Fri, 29 Jan 2021 00:34:34 +0100
07a51b
Subject: [PATCH] Update kernel headers
07a51b
26f871
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1885770
26f871
Upstream Status: unknown commit 34be2d26
26f871
Conflicts: on include/uapi/linux/bpf.h, due to missing commits:
26f871
  - c8eb4b52c1b1 ("Update kernel headers")
26f871
  - f481515c89fa ("Update kernel headers")
07a51b
26f871
commit 34be2d2619e29836605a7d1669d642f892fc725e
07a51b
Author: David Ahern <dsahern@gmail.com>
26f871
Date:   Wed Oct 7 00:01:26 2020 -0600
07a51b
07a51b
    Update kernel headers
07a51b
07a51b
    Update kernel headers to commit:
26f871
        9faebeb2d800 ("Merge branch 'ethtool-allow-dumping-policies-to-user-space'")
07a51b
07a51b
    Signed-off-by: David Ahern <dsahern@gmail.com>
07a51b
---
26f871
 include/uapi/linux/bpf.h            | 64 +++++++++++++++++++++++++----
26f871
 include/uapi/linux/devlink.h        |  5 +++
26f871
 include/uapi/linux/genetlink.h      | 11 +++++
26f871
 include/uapi/linux/l2tp.h           |  1 +
26f871
 include/uapi/linux/netlink.h        |  2 +
26f871
 include/uapi/linux/tc_act/tc_mpls.h |  1 +
26f871
 include/uapi/linux/tc_act/tc_vlan.h |  4 ++
26f871
 7 files changed, 79 insertions(+), 9 deletions(-)
07a51b
07a51b
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
26f871
index b21cc6af..36e5bc2d 100644
07a51b
--- a/include/uapi/linux/bpf.h
07a51b
+++ b/include/uapi/linux/bpf.h
26f871
@@ -404,6 +404,9 @@ enum {
26f871
 
26f871
 /* Enable memory-mapping BPF map */
26f871
 	BPF_F_MMAPABLE		= (1U << 10),
26f871
+
26f871
+/* Share perf_event among processes */
26f871
+	BPF_F_PRESERVE_ELEMS	= (1U << 11),
26f871
 };
26f871
 
26f871
 /* Flags for BPF_PROG_QUERY. */
26f871
@@ -414,6 +417,11 @@ enum {
07a51b
  */
26f871
 #define BPF_F_QUERY_EFFECTIVE	(1U << 0)
26f871
 
26f871
+/* Flags for BPF_PROG_TEST_RUN */
26f871
+
26f871
+/* If set, run the test on the cpu specified by bpf_attr.test.cpu */
26f871
+#define BPF_F_TEST_RUN_ON_CPU	(1U << 0)
26f871
+
26f871
 /* type for BPF_ENABLE_STATS */
26f871
 enum bpf_stats_type {
26f871
 	/* enabled run_time_ns and run_cnt */
26f871
@@ -556,6 +564,8 @@ union bpf_attr {
26f871
 						 */
26f871
 		__aligned_u64	ctx_in;
26f871
 		__aligned_u64	ctx_out;
26f871
+		__u32		flags;
26f871
+		__u32		cpu;
26f871
 	} test;
26f871
 
26f871
 	struct { /* anonymous struct used by BPF_*_GET_*_ID */
26f871
@@ -622,8 +632,13 @@ union bpf_attr {
26f871
 		};
26f871
 		__u32		attach_type;	/* attach type */
26f871
 		__u32		flags;		/* extra flags */
26f871
-		__aligned_u64	iter_info;	/* extra bpf_iter_link_info */
26f871
-		__u32		iter_info_len;	/* iter_info length */
26f871
+		union {
26f871
+			__u32		target_btf_id;	/* btf_id of target to attach to */
26f871
+			struct {
26f871
+				__aligned_u64	iter_info;	/* extra bpf_iter_link_info */
26f871
+				__u32		iter_info_len;	/* iter_info length */
26f871
+			};
26f871
+		};
26f871
 	} link_create;
26f871
 
26f871
 	struct { /* struct used by BPF_LINK_UPDATE command */
26f871
@@ -2496,7 +2511,7 @@ union bpf_attr {
26f871
  *		result is from *reuse*\ **->socks**\ [] using the hash of the
26f871
  *		tuple.
26f871
  *
26f871
- * long bpf_sk_release(struct bpf_sock *sock)
26f871
+ * long bpf_sk_release(void *sock)
26f871
  *	Description
26f871
  *		Release the reference held by *sock*. *sock* must be a
26f871
  *		non-**NULL** pointer that was returned from
26f871
@@ -2676,7 +2691,7 @@ union bpf_attr {
26f871
  *		result is from *reuse*\ **->socks**\ [] using the hash of the
26f871
  *		tuple.
26f871
  *
26f871
- * long bpf_tcp_check_syncookie(struct bpf_sock *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
26f871
+ * long bpf_tcp_check_syncookie(void *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
26f871
  * 	Description
26f871
  * 		Check whether *iph* and *th* contain a valid SYN cookie ACK for
26f871
  * 		the listening socket in *sk*.
26f871
@@ -2842,6 +2857,7 @@ union bpf_attr {
26f871
  *		0 on success.
26f871
  *
26f871
  *		**-ENOENT** if the bpf-local-storage cannot be found.
26f871
+ *		**-EINVAL** if sk is not a fullsock (e.g. a request_sock).
26f871
  *
26f871
  * long bpf_send_signal(u32 sig)
26f871
  *	Description
26f871
@@ -2858,7 +2874,7 @@ union bpf_attr {
26f871
  *
26f871
  *		**-EAGAIN** if bpf program can try again.
26f871
  *
26f871
- * s64 bpf_tcp_gen_syncookie(struct bpf_sock *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
26f871
+ * s64 bpf_tcp_gen_syncookie(void *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
26f871
  *	Description
26f871
  *		Try to issue a SYN cookie for the packet with corresponding
26f871
  *		IP/TCP headers, *iph* and *th*, on the listening socket in *sk*.
26f871
@@ -3087,7 +3103,7 @@ union bpf_attr {
26f871
  * 	Return
26f871
  * 		The id is returned or 0 in case the id could not be retrieved.
26f871
  *
26f871
- * long bpf_sk_assign(struct sk_buff *skb, struct bpf_sock *sk, u64 flags)
26f871
+ * long bpf_sk_assign(struct sk_buff *skb, void *sk, u64 flags)
26f871
  *	Description
26f871
  *		Helper is overloaded depending on BPF program type. This
26f871
  *		description applies to **BPF_PROG_TYPE_SCHED_CLS** and
26f871
@@ -3215,11 +3231,11 @@ union bpf_attr {
26f871
  *
26f871
  *		**-EOVERFLOW** if an overflow happened: The same object will be tried again.
26f871
  *
26f871
- * u64 bpf_sk_cgroup_id(struct bpf_sock *sk)
26f871
+ * u64 bpf_sk_cgroup_id(void *sk)
26f871
  *	Description
26f871
  *		Return the cgroup v2 id of the socket *sk*.
26f871
  *
26f871
- *		*sk* must be a non-**NULL** pointer to a full socket, e.g. one
26f871
+ *		*sk* must be a non-**NULL** pointer to a socket, e.g. one
26f871
  *		returned from **bpf_sk_lookup_xxx**\ (),
26f871
  *		**bpf_sk_fullsock**\ (), etc. The format of returned id is
26f871
  *		same as in **bpf_skb_cgroup_id**\ ().
26f871
@@ -3229,7 +3245,7 @@ union bpf_attr {
26f871
  *	Return
26f871
  *		The id is returned or 0 in case the id could not be retrieved.
26f871
  *
26f871
- * u64 bpf_sk_ancestor_cgroup_id(struct bpf_sock *sk, int ancestor_level)
26f871
+ * u64 bpf_sk_ancestor_cgroup_id(void *sk, int ancestor_level)
26f871
  *	Description
26f871
  *		Return id of cgroup v2 that is ancestor of cgroup associated
26f871
  *		with the *sk* at the *ancestor_level*.  The root cgroup is at
26f871
@@ -4447,4 +4463,34 @@ struct bpf_sk_lookup {
26f871
 	__u32 local_port;	/* Host byte order */
07a51b
 };
07a51b
 
26f871
+/*
26f871
+ * struct btf_ptr is used for typed pointer representation; the
26f871
+ * type id is used to render the pointer data as the appropriate type
26f871
+ * via the bpf_snprintf_btf() helper described above.  A flags field -
26f871
+ * potentially to specify additional details about the BTF pointer
26f871
+ * (rather than its mode of display) - is included for future use.
26f871
+ * Display flags - BTF_F_* - are passed to bpf_snprintf_btf separately.
26f871
+ */
26f871
+struct btf_ptr {
26f871
+	void *ptr;
26f871
+	__u32 type_id;
26f871
+	__u32 flags;		/* BTF ptr flags; unused at present. */
26f871
+};
26f871
+
26f871
+/*
26f871
+ * Flags to control bpf_snprintf_btf() behaviour.
26f871
+ *     - BTF_F_COMPACT: no formatting around type information
26f871
+ *     - BTF_F_NONAME: no struct/union member names/types
26f871
+ *     - BTF_F_PTR_RAW: show raw (unobfuscated) pointer values;
26f871
+ *       equivalent to %px.
26f871
+ *     - BTF_F_ZERO: show zero-valued struct/union members; they
26f871
+ *       are not displayed by default
26f871
+ */
26f871
+enum {
26f871
+	BTF_F_COMPACT	=	(1ULL << 0),
26f871
+	BTF_F_NONAME	=	(1ULL << 1),
26f871
+	BTF_F_PTR_RAW	=	(1ULL << 2),
26f871
+	BTF_F_ZERO	=	(1ULL << 3),
26f871
+};
26f871
+
26f871
 #endif /* __LINUX_BPF_H__ */
26f871
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
26f871
index b7f23faa..e5586fa0 100644
26f871
--- a/include/uapi/linux/devlink.h
26f871
+++ b/include/uapi/linux/devlink.h
26f871
@@ -13,6 +13,8 @@
26f871
 #ifndef _LINUX_DEVLINK_H_
26f871
 #define _LINUX_DEVLINK_H_
26f871
 
26f871
+#include <linux/const.h>
07a51b
+
26f871
 #define DEVLINK_GENL_NAME "devlink"
26f871
 #define DEVLINK_GENL_VERSION 0x1
26f871
 #define DEVLINK_GENL_MCGRP_CONFIG_NAME "config"
26f871
@@ -193,6 +195,9 @@ enum devlink_port_flavour {
26f871
 				      * port that faces the PCI VF.
26f871
 				      */
26f871
 	DEVLINK_PORT_FLAVOUR_VIRTUAL, /* Any virtual port facing the user. */
26f871
+	DEVLINK_PORT_FLAVOUR_UNUSED, /* Port which exists in the switch, but
26f871
+				      * is not used in any way.
26f871
+				      */
26f871
 };
26f871
 
26f871
 enum devlink_param_cmode {
26f871
diff --git a/include/uapi/linux/genetlink.h b/include/uapi/linux/genetlink.h
26f871
index 7c6c390c..9fa720ee 100644
26f871
--- a/include/uapi/linux/genetlink.h
26f871
+++ b/include/uapi/linux/genetlink.h
26f871
@@ -64,6 +64,8 @@ enum {
26f871
 	CTRL_ATTR_OPS,
26f871
 	CTRL_ATTR_MCAST_GROUPS,
26f871
 	CTRL_ATTR_POLICY,
26f871
+	CTRL_ATTR_OP_POLICY,
26f871
+	CTRL_ATTR_OP,
26f871
 	__CTRL_ATTR_MAX,
26f871
 };
26f871
 
26f871
@@ -85,6 +87,15 @@ enum {
26f871
 	__CTRL_ATTR_MCAST_GRP_MAX,
07a51b
 };
07a51b
 
26f871
+enum {
26f871
+	CTRL_ATTR_POLICY_UNSPEC,
26f871
+	CTRL_ATTR_POLICY_DO,
26f871
+	CTRL_ATTR_POLICY_DUMP,
26f871
+
26f871
+	__CTRL_ATTR_POLICY_DUMP_MAX,
26f871
+	CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 1
07a51b
+};
07a51b
+
26f871
 #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
26f871
 
26f871
 
26f871
diff --git a/include/uapi/linux/l2tp.h b/include/uapi/linux/l2tp.h
26f871
index 131c3a26..abc0fc81 100644
26f871
--- a/include/uapi/linux/l2tp.h
26f871
+++ b/include/uapi/linux/l2tp.h
26f871
@@ -144,6 +144,7 @@ enum {
26f871
 	L2TP_ATTR_RX_OOS_PACKETS,	/* u64 */
26f871
 	L2TP_ATTR_RX_ERRORS,		/* u64 */
26f871
 	L2TP_ATTR_STATS_PAD,
26f871
+	L2TP_ATTR_RX_COOKIE_DISCARDS,	/* u64 */
26f871
 	__L2TP_ATTR_STATS_MAX,
26f871
 };
26f871
 
26f871
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
26f871
index 695c88e3..f7749205 100644
26f871
--- a/include/uapi/linux/netlink.h
26f871
+++ b/include/uapi/linux/netlink.h
26f871
@@ -327,6 +327,7 @@ enum netlink_attribute_type {
26f871
  *	the index, if limited inside the nesting (U32)
26f871
  * @NL_POLICY_TYPE_ATTR_BITFIELD32_MASK: valid mask for the
26f871
  *	bitfield32 type (U32)
26f871
+ * @NL_POLICY_TYPE_ATTR_MASK: mask of valid bits for unsigned integers (U64)
26f871
  * @NL_POLICY_TYPE_ATTR_PAD: pad attribute for 64-bit alignment
26f871
  */
26f871
 enum netlink_policy_type_attr {
26f871
@@ -342,6 +343,7 @@ enum netlink_policy_type_attr {
26f871
 	NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE,
26f871
 	NL_POLICY_TYPE_ATTR_BITFIELD32_MASK,
26f871
 	NL_POLICY_TYPE_ATTR_PAD,
26f871
+	NL_POLICY_TYPE_ATTR_MASK,
26f871
 
26f871
 	/* keep last */
26f871
 	__NL_POLICY_TYPE_ATTR_MAX,
26f871
diff --git a/include/uapi/linux/tc_act/tc_mpls.h b/include/uapi/linux/tc_act/tc_mpls.h
26f871
index 9360e952..9e4e8f52 100644
26f871
--- a/include/uapi/linux/tc_act/tc_mpls.h
26f871
+++ b/include/uapi/linux/tc_act/tc_mpls.h
26f871
@@ -10,6 +10,7 @@
26f871
 #define TCA_MPLS_ACT_PUSH	2
26f871
 #define TCA_MPLS_ACT_MODIFY	3
26f871
 #define TCA_MPLS_ACT_DEC_TTL	4
26f871
+#define TCA_MPLS_ACT_MAC_PUSH	5
26f871
 
26f871
 struct tc_mpls {
26f871
 	tc_gen;		/* generic TC action fields. */
26f871
diff --git a/include/uapi/linux/tc_act/tc_vlan.h b/include/uapi/linux/tc_act/tc_vlan.h
26f871
index 168995b5..5b306fe8 100644
26f871
--- a/include/uapi/linux/tc_act/tc_vlan.h
26f871
+++ b/include/uapi/linux/tc_act/tc_vlan.h
26f871
@@ -16,6 +16,8 @@
26f871
 #define TCA_VLAN_ACT_POP	1
26f871
 #define TCA_VLAN_ACT_PUSH	2
26f871
 #define TCA_VLAN_ACT_MODIFY	3
26f871
+#define TCA_VLAN_ACT_POP_ETH	4
26f871
+#define TCA_VLAN_ACT_PUSH_ETH	5
26f871
 
26f871
 struct tc_vlan {
26f871
 	tc_gen;
26f871
@@ -30,6 +32,8 @@ enum {
26f871
 	TCA_VLAN_PUSH_VLAN_PROTOCOL,
26f871
 	TCA_VLAN_PAD,
26f871
 	TCA_VLAN_PUSH_VLAN_PRIORITY,
26f871
+	TCA_VLAN_PUSH_ETH_DST,
26f871
+	TCA_VLAN_PUSH_ETH_SRC,
26f871
 	__TCA_VLAN_MAX,
26f871
 };
26f871
 #define TCA_VLAN_MAX (__TCA_VLAN_MAX - 1)
07a51b
-- 
26f871
2.29.2
07a51b