1 // SPDX-License-Identifier: GPL-2.0 2 #ifndef IOU_BPF_OPS_H 3 #define IOU_BPF_OPS_H 4 5 #include <linux/io_uring_types.h> 6 7 enum { 8 IOU_REGION_MEM, 9 IOU_REGION_CQ, 10 IOU_REGION_SQ, 11 }; 12 13 struct io_uring_bpf_ops { 14 int (*loop_step)(struct io_ring_ctx *ctx, struct iou_loop_params *lp); 15 16 __u32 ring_fd; 17 void *priv; 18 }; 19 20 #ifdef CONFIG_IO_URING_BPF_OPS 21 void io_unregister_bpf_ops(struct io_ring_ctx *ctx); 22 #else io_unregister_bpf_ops(struct io_ring_ctx * ctx)23static inline void io_unregister_bpf_ops(struct io_ring_ctx *ctx) 24 { 25 } 26 #endif 27 28 #endif /* IOU_BPF_OPS_H */ 29