Lines Matching refs:rb_map
191 struct bpf_ringbuf_map *rb_map; in ringbuf_map_alloc() local
201 rb_map = bpf_map_area_alloc(sizeof(*rb_map), NUMA_NO_NODE); in ringbuf_map_alloc()
202 if (!rb_map) in ringbuf_map_alloc()
205 bpf_map_init_from_attr(&rb_map->map, attr); in ringbuf_map_alloc()
207 rb_map->rb = bpf_ringbuf_alloc(attr->max_entries, rb_map->map.numa_node); in ringbuf_map_alloc()
208 if (!rb_map->rb) { in ringbuf_map_alloc()
209 bpf_map_area_free(rb_map); in ringbuf_map_alloc()
213 return &rb_map->map; in ringbuf_map_alloc()
232 struct bpf_ringbuf_map *rb_map; in ringbuf_map_free() local
234 rb_map = container_of(map, struct bpf_ringbuf_map, map); in ringbuf_map_free()
235 bpf_ringbuf_free(rb_map->rb); in ringbuf_map_free()
236 bpf_map_area_free(rb_map); in ringbuf_map_free()
263 struct bpf_ringbuf_map *rb_map; in ringbuf_map_mmap_kern() local
265 rb_map = container_of(map, struct bpf_ringbuf_map, map); in ringbuf_map_mmap_kern()
275 return remap_vmalloc_range(vma, rb_map->rb, in ringbuf_map_mmap_kern()
281 struct bpf_ringbuf_map *rb_map; in ringbuf_map_mmap_user() local
283 rb_map = container_of(map, struct bpf_ringbuf_map, map); in ringbuf_map_mmap_user()
296 return remap_vmalloc_range(vma, rb_map->rb, vma->vm_pgoff + RINGBUF_PGOFF); in ringbuf_map_mmap_user()
316 struct bpf_ringbuf_map *rb_map; in ringbuf_map_poll_kern() local
318 rb_map = container_of(map, struct bpf_ringbuf_map, map); in ringbuf_map_poll_kern()
319 poll_wait(filp, &rb_map->rb->waitq, pts); in ringbuf_map_poll_kern()
321 if (ringbuf_avail_data_sz(rb_map->rb)) in ringbuf_map_poll_kern()
329 struct bpf_ringbuf_map *rb_map; in ringbuf_map_poll_user() local
331 rb_map = container_of(map, struct bpf_ringbuf_map, map); in ringbuf_map_poll_user()
332 poll_wait(filp, &rb_map->rb->waitq, pts); in ringbuf_map_poll_user()
334 if (ringbuf_avail_data_sz(rb_map->rb) < ringbuf_total_data_sz(rb_map->rb)) in ringbuf_map_poll_user()
472 struct bpf_ringbuf_map *rb_map; in BPF_CALL_3() local
477 rb_map = container_of(map, struct bpf_ringbuf_map, map); in BPF_CALL_3()
478 return (unsigned long)__bpf_ringbuf_reserve(rb_map->rb, size); in BPF_CALL_3()
546 struct bpf_ringbuf_map *rb_map; in BPF_CALL_4() local
552 rb_map = container_of(map, struct bpf_ringbuf_map, map); in BPF_CALL_4()
553 rec = __bpf_ringbuf_reserve(rb_map->rb, size); in BPF_CALL_4()
601 struct bpf_ringbuf_map *rb_map; in BPF_CALL_4() local
616 rb_map = container_of(map, struct bpf_ringbuf_map, map); in BPF_CALL_4()
618 sample = __bpf_ringbuf_reserve(rb_map->rb, size); in BPF_CALL_4()