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