Lines Matching refs:flags
97 const gfp_t flags = GFP_KERNEL_ACCOUNT | __GFP_RETRY_MAYFAIL | in bpf_ringbuf_area_alloc() local
130 page = alloc_pages_node(numa_node, flags, 0); in bpf_ringbuf_area_alloc()
245 u64 flags) in ringbuf_map_update_elem() argument
393 unsigned long cons_pos, prod_pos, new_prod_pos, flags; in __bpf_ringbuf_reserve() local
407 if (!spin_trylock_irqsave(&rb->spinlock, flags)) in __bpf_ringbuf_reserve()
410 spin_lock_irqsave(&rb->spinlock, flags); in __bpf_ringbuf_reserve()
420 spin_unlock_irqrestore(&rb->spinlock, flags); in __bpf_ringbuf_reserve()
432 spin_unlock_irqrestore(&rb->spinlock, flags); in __bpf_ringbuf_reserve()
437 BPF_CALL_3(bpf_ringbuf_reserve, struct bpf_map *, map, u64, size, u64, flags) in BPF_CALL_3() argument
441 if (unlikely(flags)) in BPF_CALL_3()
456 static void bpf_ringbuf_commit(void *sample, u64 flags, bool discard) in bpf_ringbuf_commit() argument
478 if (flags & BPF_RB_FORCE_WAKEUP) in bpf_ringbuf_commit()
480 else if (cons_pos == rec_pos && !(flags & BPF_RB_NO_WAKEUP)) in bpf_ringbuf_commit()
484 BPF_CALL_2(bpf_ringbuf_submit, void *, sample, u64, flags) in BPF_CALL_2() argument
486 bpf_ringbuf_commit(sample, flags, false /* discard */); in BPF_CALL_2()
497 BPF_CALL_2(bpf_ringbuf_discard, void *, sample, u64, flags) in BPF_CALL_2() argument
499 bpf_ringbuf_commit(sample, flags, true /* discard */); in BPF_CALL_2()
511 u64, flags) in BPF_CALL_4() argument
516 if (unlikely(flags & ~(BPF_RB_NO_WAKEUP | BPF_RB_FORCE_WAKEUP))) in BPF_CALL_4()
525 bpf_ringbuf_commit(rec, flags, false /* discard */); in BPF_CALL_4()
538 BPF_CALL_2(bpf_ringbuf_query, struct bpf_map *, map, u64, flags) in BPF_CALL_2() argument
544 switch (flags) { in BPF_CALL_2()
565 BPF_CALL_4(bpf_ringbuf_reserve_dynptr, struct bpf_map *, map, u32, size, u64, flags, in BPF_CALL_4() argument
572 if (unlikely(flags)) { in BPF_CALL_4()
605 BPF_CALL_2(bpf_ringbuf_submit_dynptr, struct bpf_dynptr_kern *, ptr, u64, flags) in BPF_CALL_2() argument
610 bpf_ringbuf_commit(ptr->data, flags, false /* discard */); in BPF_CALL_2()
624 BPF_CALL_2(bpf_ringbuf_discard_dynptr, struct bpf_dynptr_kern *, ptr, u64, flags) in BPF_CALL_2() argument
629 bpf_ringbuf_commit(ptr->data, flags, true /* discard */); in BPF_CALL_2()
646 u32 hdr_len, sample_len, total_len, flags, *hdr; in __bpf_user_ringbuf_peek() local
662 flags = hdr_len & (BPF_RINGBUF_BUSY_BIT | BPF_RINGBUF_DISCARD_BIT); in __bpf_user_ringbuf_peek()
663 sample_len = hdr_len & ~flags; in __bpf_user_ringbuf_peek()
679 if (flags & BPF_RINGBUF_DISCARD_BIT) { in __bpf_user_ringbuf_peek()
689 if (flags & BPF_RINGBUF_BUSY_BIT) in __bpf_user_ringbuf_peek()
698 static void __bpf_user_ringbuf_sample_release(struct bpf_ringbuf *rb, size_t size, u64 flags) in __bpf_user_ringbuf_sample_release() argument
713 void *, callback_fn, void *, callback_ctx, u64, flags) in BPF_CALL_4() argument
721 if (unlikely(flags & ~wakeup_flags)) in BPF_CALL_4()
751 __bpf_user_ringbuf_sample_release(rb, size, flags); in BPF_CALL_4()
762 if (flags & BPF_RB_FORCE_WAKEUP) in BPF_CALL_4()
764 else if (!(flags & BPF_RB_NO_WAKEUP) && samples > 0) in BPF_CALL_4()