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