diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-11-23 03:04:05 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-11-23 03:04:05 -0500 |
commit | 92907cbbef8625bb3998d1eb385fc88f23c97a3f (patch) | |
tree | 15626ff9287e37c3cb81c7286d6db5a7fd77c854 /include/uapi/linux/bpf.h | |
parent | 15fbfccfe92c62ae8d1ecc647c44157ed01ac02e (diff) | |
parent | 1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff) |
Merge tag 'v4.4-rc2' into drm-intel-next-queued
Linux 4.4-rc2
Backmerge to get at
commit 1b0e3a049efe471c399674fd954500ce97438d30
Author: Imre Deak <imre.deak@intel.com>
Date: Thu Nov 5 23:04:11 2015 +0200
drm/i915/skl: disable display side power well support for now
so that we can proplery re-eanble skl power wells in -next.
Conflicts are just adjacent lines changed, except for intel_fbdev.c
where we need to interleave the changs. Nothing nefarious.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'include/uapi/linux/bpf.h')
-rw-r--r-- | include/uapi/linux/bpf.h | 72 |
1 files changed, 35 insertions, 37 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 92a48e2d5461..9ea2d22fa2cb 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h | |||
@@ -63,50 +63,16 @@ struct bpf_insn { | |||
63 | __s32 imm; /* signed immediate constant */ | 63 | __s32 imm; /* signed immediate constant */ |
64 | }; | 64 | }; |
65 | 65 | ||
66 | /* BPF syscall commands */ | 66 | /* BPF syscall commands, see bpf(2) man-page for details. */ |
67 | enum bpf_cmd { | 67 | enum bpf_cmd { |
68 | /* create a map with given type and attributes | ||
69 | * fd = bpf(BPF_MAP_CREATE, union bpf_attr *, u32 size) | ||
70 | * returns fd or negative error | ||
71 | * map is deleted when fd is closed | ||
72 | */ | ||
73 | BPF_MAP_CREATE, | 68 | BPF_MAP_CREATE, |
74 | |||
75 | /* lookup key in a given map | ||
76 | * err = bpf(BPF_MAP_LOOKUP_ELEM, union bpf_attr *attr, u32 size) | ||
77 | * Using attr->map_fd, attr->key, attr->value | ||
78 | * returns zero and stores found elem into value | ||
79 | * or negative error | ||
80 | */ | ||
81 | BPF_MAP_LOOKUP_ELEM, | 69 | BPF_MAP_LOOKUP_ELEM, |
82 | |||
83 | /* create or update key/value pair in a given map | ||
84 | * err = bpf(BPF_MAP_UPDATE_ELEM, union bpf_attr *attr, u32 size) | ||
85 | * Using attr->map_fd, attr->key, attr->value, attr->flags | ||
86 | * returns zero or negative error | ||
87 | */ | ||
88 | BPF_MAP_UPDATE_ELEM, | 70 | BPF_MAP_UPDATE_ELEM, |
89 | |||
90 | /* find and delete elem by key in a given map | ||
91 | * err = bpf(BPF_MAP_DELETE_ELEM, union bpf_attr *attr, u32 size) | ||
92 | * Using attr->map_fd, attr->key | ||
93 | * returns zero or negative error | ||
94 | */ | ||
95 | BPF_MAP_DELETE_ELEM, | 71 | BPF_MAP_DELETE_ELEM, |
96 | |||
97 | /* lookup key in a given map and return next key | ||
98 | * err = bpf(BPF_MAP_GET_NEXT_KEY, union bpf_attr *attr, u32 size) | ||
99 | * Using attr->map_fd, attr->key, attr->next_key | ||
100 | * returns zero and stores next key or negative error | ||
101 | */ | ||
102 | BPF_MAP_GET_NEXT_KEY, | 72 | BPF_MAP_GET_NEXT_KEY, |
103 | |||
104 | /* verify and load eBPF program | ||
105 | * prog_fd = bpf(BPF_PROG_LOAD, union bpf_attr *attr, u32 size) | ||
106 | * Using attr->prog_type, attr->insns, attr->license | ||
107 | * returns fd or negative error | ||
108 | */ | ||
109 | BPF_PROG_LOAD, | 73 | BPF_PROG_LOAD, |
74 | BPF_OBJ_PIN, | ||
75 | BPF_OBJ_GET, | ||
110 | }; | 76 | }; |
111 | 77 | ||
112 | enum bpf_map_type { | 78 | enum bpf_map_type { |
@@ -160,6 +126,11 @@ union bpf_attr { | |||
160 | __aligned_u64 log_buf; /* user supplied buffer */ | 126 | __aligned_u64 log_buf; /* user supplied buffer */ |
161 | __u32 kern_version; /* checked when prog_type=kprobe */ | 127 | __u32 kern_version; /* checked when prog_type=kprobe */ |
162 | }; | 128 | }; |
129 | |||
130 | struct { /* anonymous struct used by BPF_OBJ_* commands */ | ||
131 | __aligned_u64 pathname; | ||
132 | __u32 bpf_fd; | ||
133 | }; | ||
163 | } __attribute__((aligned(8))); | 134 | } __attribute__((aligned(8))); |
164 | 135 | ||
165 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper | 136 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper |
@@ -272,6 +243,32 @@ enum bpf_func_id { | |||
272 | BPF_FUNC_skb_get_tunnel_key, | 243 | BPF_FUNC_skb_get_tunnel_key, |
273 | BPF_FUNC_skb_set_tunnel_key, | 244 | BPF_FUNC_skb_set_tunnel_key, |
274 | BPF_FUNC_perf_event_read, /* u64 bpf_perf_event_read(&map, index) */ | 245 | BPF_FUNC_perf_event_read, /* u64 bpf_perf_event_read(&map, index) */ |
246 | /** | ||
247 | * bpf_redirect(ifindex, flags) - redirect to another netdev | ||
248 | * @ifindex: ifindex of the net device | ||
249 | * @flags: bit 0 - if set, redirect to ingress instead of egress | ||
250 | * other bits - reserved | ||
251 | * Return: TC_ACT_REDIRECT | ||
252 | */ | ||
253 | BPF_FUNC_redirect, | ||
254 | |||
255 | /** | ||
256 | * bpf_get_route_realm(skb) - retrieve a dst's tclassid | ||
257 | * @skb: pointer to skb | ||
258 | * Return: realm if != 0 | ||
259 | */ | ||
260 | BPF_FUNC_get_route_realm, | ||
261 | |||
262 | /** | ||
263 | * bpf_perf_event_output(ctx, map, index, data, size) - output perf raw sample | ||
264 | * @ctx: struct pt_regs* | ||
265 | * @map: pointer to perf_event_array map | ||
266 | * @index: index of event in the map | ||
267 | * @data: data on stack to be output as raw data | ||
268 | * @size: size of data | ||
269 | * Return: 0 on success | ||
270 | */ | ||
271 | BPF_FUNC_perf_event_output, | ||
275 | __BPF_FUNC_MAX_ID, | 272 | __BPF_FUNC_MAX_ID, |
276 | }; | 273 | }; |
277 | 274 | ||
@@ -293,6 +290,7 @@ struct __sk_buff { | |||
293 | __u32 tc_index; | 290 | __u32 tc_index; |
294 | __u32 cb[5]; | 291 | __u32 cb[5]; |
295 | __u32 hash; | 292 | __u32 hash; |
293 | __u32 tc_classid; | ||
296 | }; | 294 | }; |
297 | 295 | ||
298 | struct bpf_tunnel_key { | 296 | struct bpf_tunnel_key { |