1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* 3 * Copyright (c) 2019-2020 Linux Test Project 4 */ 5 6 #ifndef LTP_BPF_COMMON_H 7 #define LTP_BPF_COMMON_H 8 9 #define BPF_MEMLOCK_ADD (2*1024*1024) 10 11 void rlimit_bump_memlock(void); 12 int bpf_map_create(union bpf_attr *attr); 13 void bpf_init_prog_attr(union bpf_attr *attr, const struct bpf_insn *prog, 14 size_t prog_size, char *log_buf, size_t log_size); 15 int bpf_load_prog(union bpf_attr *attr, const char *log); 16 17 #endif 18