diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2018-06-02 17:06:40 -0400 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-06-03 10:46:56 -0400 |
commit | 6b6a192595a9f04b2196620ee7b6027e567789ac (patch) | |
tree | 55cf3e8620dfbb837e60d1b772c477d6d01dd7eb /tools | |
parent | bc23105ca0abdeed98366af01c700c2c3aff5cd5 (diff) |
bpf: sync bpf uapi header with tools
Pull in recent changes from include/uapi/linux/bpf.h.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/include/uapi/linux/bpf.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 64ac0f7a689e..f0b6608b1f1c 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h | |||
@@ -2054,6 +2054,22 @@ union bpf_attr { | |||
2054 | * | 2054 | * |
2055 | * Return | 2055 | * Return |
2056 | * 0 | 2056 | * 0 |
2057 | * | ||
2058 | * uint64_t bpf_skb_cgroup_id(struct sk_buff *skb) | ||
2059 | * Description | ||
2060 | * Return the cgroup v2 id of the socket associated with the *skb*. | ||
2061 | * This is roughly similar to the **bpf_get_cgroup_classid**\ () | ||
2062 | * helper for cgroup v1 by providing a tag resp. identifier that | ||
2063 | * can be matched on or used for map lookups e.g. to implement | ||
2064 | * policy. The cgroup v2 id of a given path in the hierarchy is | ||
2065 | * exposed in user space through the f_handle API in order to get | ||
2066 | * to the same 64-bit id. | ||
2067 | * | ||
2068 | * This helper can be used on TC egress path, but not on ingress, | ||
2069 | * and is available only if the kernel was compiled with the | ||
2070 | * **CONFIG_SOCK_CGROUP_DATA** configuration option. | ||
2071 | * Return | ||
2072 | * The id is returned or 0 in case the id could not be retrieved. | ||
2057 | */ | 2073 | */ |
2058 | #define __BPF_FUNC_MAPPER(FN) \ | 2074 | #define __BPF_FUNC_MAPPER(FN) \ |
2059 | FN(unspec), \ | 2075 | FN(unspec), \ |
@@ -2134,7 +2150,8 @@ union bpf_attr { | |||
2134 | FN(lwt_seg6_adjust_srh), \ | 2150 | FN(lwt_seg6_adjust_srh), \ |
2135 | FN(lwt_seg6_action), \ | 2151 | FN(lwt_seg6_action), \ |
2136 | FN(rc_repeat), \ | 2152 | FN(rc_repeat), \ |
2137 | FN(rc_keydown), | 2153 | FN(rc_keydown), \ |
2154 | FN(skb_cgroup_id), | ||
2138 | 2155 | ||
2139 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper | 2156 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper |
2140 | * function eBPF program intends to call | 2157 | * function eBPF program intends to call |
@@ -2251,7 +2268,7 @@ struct bpf_tunnel_key { | |||
2251 | }; | 2268 | }; |
2252 | __u8 tunnel_tos; | 2269 | __u8 tunnel_tos; |
2253 | __u8 tunnel_ttl; | 2270 | __u8 tunnel_ttl; |
2254 | __u16 tunnel_ext; | 2271 | __u16 tunnel_ext; /* Padding, future use. */ |
2255 | __u32 tunnel_label; | 2272 | __u32 tunnel_label; |
2256 | }; | 2273 | }; |
2257 | 2274 | ||
@@ -2262,6 +2279,7 @@ struct bpf_xfrm_state { | |||
2262 | __u32 reqid; | 2279 | __u32 reqid; |
2263 | __u32 spi; /* Stored in network byte order */ | 2280 | __u32 spi; /* Stored in network byte order */ |
2264 | __u16 family; | 2281 | __u16 family; |
2282 | __u16 ext; /* Padding, future use. */ | ||
2265 | union { | 2283 | union { |
2266 | __u32 remote_ipv4; /* Stored in network byte order */ | 2284 | __u32 remote_ipv4; /* Stored in network byte order */ |
2267 | __u32 remote_ipv6[4]; /* Stored in network byte order */ | 2285 | __u32 remote_ipv6[4]; /* Stored in network byte order */ |