Home
last modified time | relevance | path

Searched refs:mmap_sz (Results 1 – 6 of 6) sorted by relevance

/openbmc/linux/tools/lib/bpf/
H A Dringbuf.c80 __u64 mmap_sz; in ring_buffer__add() local
132 mmap_sz = rb->page_size + 2 * (__u64)info.max_entries; in ring_buffer__add()
133 if (mmap_sz != (__u64)(size_t)mmap_sz) { in ring_buffer__add()
137 tmp = mmap(NULL, (size_t)mmap_sz, PROT_READ, MAP_SHARED, map_fd, rb->page_size); in ring_buffer__add()
355 __u64 mmap_sz; in user_ringbuf_map() local
392 mmap_sz = rb->page_size + 2 * (__u64)info.max_entries; in user_ringbuf_map()
393 if (mmap_sz != (__u64)(size_t)mmap_sz) { in user_ringbuf_map()
397 tmp = mmap(NULL, (size_t)mmap_sz, PROT_READ | PROT_WRITE, MAP_SHARED, in user_ringbuf_map()
H A Dskel_internal.h133 static inline void *skel_prep_map_data(const void *val, size_t mmap_sz, size_t val_sz) in skel_prep_map_data() argument
144 static inline void *skel_finalize_map_data(__u64 *init_val, size_t mmap_sz, int flags, int fd) in skel_finalize_map_data() argument
184 static inline void *skel_prep_map_data(const void *val, size_t mmap_sz, size_t val_sz) in skel_prep_map_data() argument
188 addr = mmap(NULL, mmap_sz, PROT_READ | PROT_WRITE, in skel_prep_map_data()
196 static inline void *skel_finalize_map_data(__u64 *init_val, size_t mmap_sz, int flags, int fd) in skel_finalize_map_data() argument
200 addr = mmap((void *) (long) *init_val, mmap_sz, flags, MAP_SHARED | MAP_FIXED, fd, 0); in skel_finalize_map_data()
H A Dlibbpf.c1641 size_t mmap_sz; in bpf_object__init_internal_map() local
1676 mmap_sz = bpf_map_mmap_sz(map->def.value_size, map->def.max_entries); in bpf_object__init_internal_map()
1677 map->mmaped = mmap(NULL, mmap_sz, PROT_READ | PROT_WRITE, in bpf_object__init_internal_map()
8411 size_t mmap_sz; in bpf_map__destroy() local
8413 mmap_sz = bpf_map_mmap_sz(map->def.value_size, map->def.max_entries); in bpf_map__destroy()
8414 munmap(map->mmaped, mmap_sz); in bpf_map__destroy()
13122 size_t mmap_sz = bpf_map_mmap_sz(map->def.value_size, map->def.max_entries); in bpf_object__load_skeleton() local
13149 *mmaped = mmap(map->mmaped, mmap_sz, prot, MAP_SHARED | MAP_FIXED, map_fd, 0); in bpf_object__load_skeleton()
/openbmc/linux/tools/bpf/bpftool/
H A Dgen.c909 size_t map_cnt = 0, prog_cnt = 0, file_sz, mmap_sz; in do_skeleton() local
959 mmap_sz = roundup(file_sz, sysconf(_SC_PAGE_SIZE)); in do_skeleton()
965 obj_data = mmap(NULL, mmap_sz, PROT_READ, MAP_PRIVATE, fd, 0); in do_skeleton()
1264 munmap(obj_data, mmap_sz); in do_skeleton()
1281 size_t i, len, file_sz, map_cnt = 0, prog_cnt = 0, mmap_sz, var_cnt = 0, var_idx = 0; in do_subskeleton() local
1338 mmap_sz = roundup(file_sz, sysconf(_SC_PAGE_SIZE)); in do_subskeleton()
1344 obj_data = mmap(NULL, mmap_sz, PROT_READ, MAP_PRIVATE, fd, 0); in do_subskeleton()
1569 munmap(obj_data, mmap_sz); in do_subskeleton()
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/
H A Dcore_reloc.c999 const size_t mmap_sz = roundup_page(sizeof(struct data)); in run_core_reloc_tests() local
1083 mmap_data = mmap(NULL, mmap_sz, PROT_READ | PROT_WRITE, in run_core_reloc_tests()
1136 CHECK_FAIL(munmap(mmap_data, mmap_sz)); in run_core_reloc_tests()
/openbmc/linux/tools/testing/selftests/bpf/
H A Dxskxceiver.c2044 size_t mmap_sz = 2 * DEFAULT_UMEM_BUFFERS * XSK_UMEM__DEFAULT_FRAME_SIZE; in hugepages_present() local
2047 bufs = mmap(NULL, mmap_sz, PROT_READ | PROT_WRITE, in hugepages_present()
2052 mmap_sz = ceil_u64(mmap_sz, HUGEPAGE_SIZE) * HUGEPAGE_SIZE; in hugepages_present()
2053 munmap(bufs, mmap_sz); in hugepages_present()