Lines Matching refs:bq
78 static int bq_flush_to_queue(struct xdp_bulk_queue *bq, bool in_napi_ctx);
339 struct xdp_bulk_queue *bq; in __cpu_map_entry_alloc() local
356 bq = per_cpu_ptr(rcpu->bulkq, i); in __cpu_map_entry_alloc()
357 bq->obj = rcpu; in __cpu_map_entry_alloc()
413 struct xdp_bulk_queue *bq = per_cpu_ptr(rcpu->bulkq, cpu); in __cpu_map_entry_free() local
416 bq_flush_to_queue(bq, false); in __cpu_map_entry_free()
602 static int bq_flush_to_queue(struct xdp_bulk_queue *bq, bool in_napi_ctx) in bq_flush_to_queue() argument
604 struct bpf_cpu_map_entry *rcpu = bq->obj; in bq_flush_to_queue()
610 if (unlikely(!bq->count)) in bq_flush_to_queue()
616 for (i = 0; i < bq->count; i++) { in bq_flush_to_queue()
617 struct xdp_frame *xdpf = bq->q[i]; in bq_flush_to_queue()
630 bq->count = 0; in bq_flush_to_queue()
633 __list_del_clearprev(&bq->flush_node); in bq_flush_to_queue()
646 struct xdp_bulk_queue *bq = this_cpu_ptr(rcpu->bulkq); in bq_enqueue() local
648 if (unlikely(bq->count == CPU_MAP_BULK_SIZE)) in bq_enqueue()
649 bq_flush_to_queue(bq, true); in bq_enqueue()
660 bq->q[bq->count++] = xdpf; in bq_enqueue()
662 if (!bq->flush_node.prev) in bq_enqueue()
663 list_add(&bq->flush_node, flush_list); in bq_enqueue()
688 struct xdp_bulk_queue *bq, *tmp; in __cpu_map_flush() local
690 list_for_each_entry_safe(bq, tmp, flush_list, flush_node) { in __cpu_map_flush()
691 bq_flush_to_queue(bq, true); in __cpu_map_flush()
694 wake_up_process(bq->obj->kthread); in __cpu_map_flush()