| 77 | static bool no_send_vec; |
| 78 | |
| 79 | static int probe_zc_support(void) |
| 80 | { |
| 81 | struct io_uring ring; |
| 82 | struct io_uring_probe *p; |
| 83 | int ret; |
| 84 | |
| 85 | has_sendzc = has_sendmsg = false; |
| 86 | |
| 87 | ret = io_uring_queue_init(1, &ring, 0); |
| 88 | if (ret) |
| 89 | return -1; |
| 90 | |
| 91 | p = t_calloc(1, sizeof(*p) + 256 * sizeof(struct io_uring_probe_op)); |
| 92 | if (!p) |
| 93 | return -1; |
| 94 | |
| 95 | ret = io_uring_register_probe(&ring, p, 256); |
| 96 | if (ret) |
| 97 | return -1; |
| 98 | |
| 99 | has_sendzc = p->ops_len > IORING_OP_SEND_ZC; |
| 100 | has_sendmsg = p->ops_len > IORING_OP_SENDMSG_ZC; |
| 101 | has_regvec = p->ops_len > IORING_OP_READV_FIXED; |
| 102 | io_uring_queue_exit(&ring); |
| 103 | free(p); |
| 104 | return 0; |
| 105 | } |
| 106 | |
| 107 | static bool check_cq_empty(struct io_uring *ring) |
| 108 | { |
no test coverage detected