naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone

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

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