| 1 | |
| 2 | #ifndef IOU_OP_DEF_H
|
| 3 | #define IOU_OP_DEF_H
|
| 4 |
|
| 5 | struct io_uring_bpf_ctx;
|
| 6 |
|
| 7 | struct io_issue_def {
|
| 8 |
|
| 9 | unsigned needs_file : 1;
|
| 10 |
|
| 11 | unsigned plug : 1;
|
| 12 |
|
| 13 | unsigned ioprio : 1;
|
| 14 |
|
| 15 | unsigned iopoll : 1;
|
| 16 |
|
| 17 | unsigned buffer_select : 1;
|
| 18 |
|
| 19 | unsigned hash_reg_file : 1;
|
| 20 |
|
| 21 | unsigned unbound_nonreg_file : 1;
|
| 22 |
|
| 23 | unsigned pollin : 1;
|
| 24 | unsigned pollout : 1;
|
| 25 | unsigned poll_exclusive : 1;
|
| 26 |
|
| 27 | unsigned audit_skip : 1;
|
| 28 |
|
| 29 | unsigned vectored : 1;
|
| 30 |
|
| 31 | unsigned is_128 : 1;
|
| 32 |
|
| 33 |
|
| 34 | unsigned short async_size;
|
| 35 |
|
| 36 |
|
| 37 | unsigned short filter_pdu_size;
|
| 38 |
|
| 39 | int (*issue)(struct io_kiocb *, unsigned int);
|
| 40 | int (*prep)(struct io_kiocb *, const struct io_uring_sqe *);
|
| 41 | void (*filter_populate)(struct io_uring_bpf_ctx *, struct io_kiocb *);
|
| 42 | };
|
| 43 |
|
| 44 | struct io_cold_def {
|
| 45 | const char *name;
|
| 46 |
|
| 47 | void (*sqe_copy)(struct io_kiocb *);
|
| 48 | void (*cleanup)(struct io_kiocb *);
|
| 49 | void (*fail)(struct io_kiocb *);
|
| 50 | };
|
| 51 |
|
| 52 | extern const struct io_issue_def io_issue_defs[];
|
| 53 | extern const struct io_cold_def io_cold_defs[];
|
| 54 |
|
| 55 | bool io_uring_op_supported(u8 opcode);
|
| 56 |
|
| 57 | void io_uring_optable_init(void);
|
| 58 | #endif
|