aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bpf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r--include/linux/bpf.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 988a00797bcd..b457fbe7b70b 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -272,6 +272,13 @@ struct bpf_prog_offload {
272 u32 jited_len; 272 u32 jited_len;
273}; 273};
274 274
275enum bpf_cgroup_storage_type {
276 BPF_CGROUP_STORAGE_SHARED,
277 __BPF_CGROUP_STORAGE_MAX
278};
279
280#define MAX_BPF_CGROUP_STORAGE_TYPE __BPF_CGROUP_STORAGE_MAX
281
275struct bpf_prog_aux { 282struct bpf_prog_aux {
276 atomic_t refcnt; 283 atomic_t refcnt;
277 u32 used_map_cnt; 284 u32 used_map_cnt;
@@ -289,7 +296,7 @@ struct bpf_prog_aux {
289 struct bpf_prog *prog; 296 struct bpf_prog *prog;
290 struct user_struct *user; 297 struct user_struct *user;
291 u64 load_time; /* ns since boottime */ 298 u64 load_time; /* ns since boottime */
292 struct bpf_map *cgroup_storage; 299 struct bpf_map *cgroup_storage[MAX_BPF_CGROUP_STORAGE_TYPE];
293 char name[BPF_OBJ_NAME_LEN]; 300 char name[BPF_OBJ_NAME_LEN];
294#ifdef CONFIG_SECURITY 301#ifdef CONFIG_SECURITY
295 void *security; 302 void *security;
@@ -358,7 +365,7 @@ int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr,
358 */ 365 */
359struct bpf_prog_array_item { 366struct bpf_prog_array_item {
360 struct bpf_prog *prog; 367 struct bpf_prog *prog;
361 struct bpf_cgroup_storage *cgroup_storage; 368 struct bpf_cgroup_storage *cgroup_storage[MAX_BPF_CGROUP_STORAGE_TYPE];
362}; 369};
363 370
364struct bpf_prog_array { 371struct bpf_prog_array {