| /linux-6.15/io_uring/ |
| H A D | fs.c | 55 if (sqe->buf_index || sqe->splice_fd_in) in io_renameat_prep() 60 ren->old_dfd = READ_ONCE(sqe->fd); in io_renameat_prep() 63 ren->new_dfd = READ_ONCE(sqe->len); in io_renameat_prep() 109 if (sqe->off || sqe->len || sqe->buf_index || sqe->splice_fd_in) in io_unlinkat_prep() 114 un->dfd = READ_ONCE(sqe->fd); in io_unlinkat_prep() 159 if (sqe->off || sqe->rw_flags || sqe->buf_index || sqe->splice_fd_in) in io_mkdirat_prep() 164 mkd->dfd = READ_ONCE(sqe->fd); in io_mkdirat_prep() 165 mkd->mode = READ_ONCE(sqe->len); in io_mkdirat_prep() 203 if (sqe->len || sqe->rw_flags || sqe->buf_index || sqe->splice_fd_in) in io_symlinkat_prep() 208 sl->new_dfd = READ_ONCE(sqe->fd); in io_symlinkat_prep() [all …]
|
| H A D | sync.c | 29 if (unlikely(sqe->addr || sqe->buf_index || sqe->splice_fd_in)) in io_sfr_prep() 32 sync->off = READ_ONCE(sqe->off); in io_sfr_prep() 33 sync->len = READ_ONCE(sqe->len); in io_sfr_prep() 57 if (unlikely(sqe->addr || sqe->buf_index || sqe->splice_fd_in)) in io_fsync_prep() 60 sync->flags = READ_ONCE(sqe->fsync_flags); in io_fsync_prep() 64 sync->off = READ_ONCE(sqe->off); in io_fsync_prep() 65 sync->len = READ_ONCE(sqe->len); in io_fsync_prep() 89 if (sqe->buf_index || sqe->rw_flags || sqe->splice_fd_in) in io_fallocate_prep() 92 sync->off = READ_ONCE(sqe->off); in io_fallocate_prep() 93 sync->len = READ_ONCE(sqe->addr); in io_fallocate_prep() [all …]
|
| H A D | openclose.c | 56 if (unlikely(sqe->buf_index)) in __io_openat_prep() 65 open->dfd = READ_ONCE(sqe->fd); in __io_openat_prep() 88 u64 mode = READ_ONCE(sqe->len); in io_openat_prep() 89 u64 flags = READ_ONCE(sqe->open_flags); in io_openat_prep() 92 return __io_openat_prep(req, sqe); in io_openat_prep() 103 len = READ_ONCE(sqe->len); in io_openat2_prep() 111 return __io_openat_prep(req, sqe); in io_openat2_prep() 211 if (sqe->off || sqe->addr || sqe->len || sqe->rw_flags || sqe->buf_index) in io_close_prep() 216 close->fd = READ_ONCE(sqe->fd); in io_close_prep() 268 if (sqe->off || sqe->addr || sqe->len || sqe->buf_index || in io_install_fixed_fd_prep() [all …]
|
| H A D | epoll.c | 29 int io_epoll_ctl_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) in io_epoll_ctl_prep() argument 33 if (sqe->buf_index || sqe->splice_fd_in) in io_epoll_ctl_prep() 36 epoll->epfd = READ_ONCE(sqe->fd); in io_epoll_ctl_prep() 37 epoll->op = READ_ONCE(sqe->len); in io_epoll_ctl_prep() 38 epoll->fd = READ_ONCE(sqe->off); in io_epoll_ctl_prep() 43 ev = u64_to_user_ptr(READ_ONCE(sqe->addr)); in io_epoll_ctl_prep() 67 int io_epoll_wait_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) in io_epoll_wait_prep() argument 71 if (sqe->off || sqe->rw_flags || sqe->buf_index || sqe->splice_fd_in) in io_epoll_wait_prep() 74 iew->maxevents = READ_ONCE(sqe->len); in io_epoll_wait_prep() 75 iew->events = u64_to_user_ptr(READ_ONCE(sqe->addr)); in io_epoll_wait_prep()
|
| H A D | advise.c | 31 int io_madvise_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) in io_madvise_prep() argument 36 if (sqe->buf_index || sqe->splice_fd_in) in io_madvise_prep() 39 ma->addr = READ_ONCE(sqe->addr); in io_madvise_prep() 40 ma->len = READ_ONCE(sqe->off); in io_madvise_prep() 42 ma->len = READ_ONCE(sqe->len); in io_madvise_prep() 43 ma->advice = READ_ONCE(sqe->fadvise_advice); in io_madvise_prep() 83 if (sqe->buf_index || sqe->splice_fd_in) in io_fadvise_prep() 86 fa->offset = READ_ONCE(sqe->off); in io_fadvise_prep() 87 fa->len = READ_ONCE(sqe->addr); in io_fadvise_prep() 89 fa->len = READ_ONCE(sqe->len); in io_fadvise_prep() [all …]
|
| H A D | xattr.c | 45 const struct io_uring_sqe *sqe) in __io_getxattr_prep() argument 53 name = u64_to_user_ptr(READ_ONCE(sqe->addr)); in __io_getxattr_prep() 55 ix->ctx.size = READ_ONCE(sqe->len); in __io_getxattr_prep() 56 ix->ctx.flags = READ_ONCE(sqe->xattr_flags); in __io_getxattr_prep() 78 return __io_getxattr_prep(req, sqe); in io_fgetxattr_prep() 90 ret = __io_getxattr_prep(req, sqe); in io_getxattr_prep() 129 const struct io_uring_sqe *sqe) in __io_setxattr_prep() argument 139 ix->ctx.size = READ_ONCE(sqe->len); in __io_setxattr_prep() 140 ix->ctx.flags = READ_ONCE(sqe->xattr_flags); in __io_setxattr_prep() 166 ret = __io_setxattr_prep(req, sqe); in io_setxattr_prep() [all …]
|
| H A D | truncate.c | 23 int io_ftruncate_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) in io_ftruncate_prep() argument 27 if (sqe->rw_flags || sqe->addr || sqe->len || sqe->buf_index || in io_ftruncate_prep() 28 sqe->splice_fd_in || sqe->addr3) in io_ftruncate_prep() 31 ft->len = READ_ONCE(sqe->off); in io_ftruncate_prep()
|
| H A D | rw.h | 33 int io_prep_read_fixed(struct io_kiocb *req, const struct io_uring_sqe *sqe); 34 int io_prep_write_fixed(struct io_kiocb *req, const struct io_uring_sqe *sqe); 35 int io_prep_readv_fixed(struct io_kiocb *req, const struct io_uring_sqe *sqe); 36 int io_prep_writev_fixed(struct io_kiocb *req, const struct io_uring_sqe *sqe); 37 int io_prep_readv(struct io_kiocb *req, const struct io_uring_sqe *sqe); 38 int io_prep_writev(struct io_kiocb *req, const struct io_uring_sqe *sqe); 39 int io_prep_read(struct io_kiocb *req, const struct io_uring_sqe *sqe); 40 int io_prep_write(struct io_kiocb *req, const struct io_uring_sqe *sqe); 48 int io_read_mshot_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
| H A D | net.h | 27 int io_shutdown_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); 31 int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); 36 int io_recvmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); 42 int io_accept_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); 45 int io_socket_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); 48 int io_connect_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); 53 int io_send_zc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); 56 int io_bind_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); 59 int io_listen_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
| H A D | uring_cmd.c | 46 ioucmd->sqe = NULL; in io_req_uring_cleanup() 209 ioucmd->sqe = ac->sqes; in io_uring_cmd_prep_setup() 217 if (sqe->__pad1) in io_uring_cmd_prep() 315 const struct io_uring_sqe *sqe = cmd->sqe; in io_uring_cmd_getsockopt() local 320 level = READ_ONCE(sqe->level); in io_uring_cmd_getsockopt() 325 optname = READ_ONCE(sqe->optname); in io_uring_cmd_getsockopt() 326 optlen = READ_ONCE(sqe->optlen); in io_uring_cmd_getsockopt() 342 const struct io_uring_sqe *sqe = cmd->sqe; in io_uring_cmd_setsockopt() local 349 optname = READ_ONCE(sqe->optname); in io_uring_cmd_setsockopt() 350 optlen = READ_ONCE(sqe->optlen); in io_uring_cmd_setsockopt() [all …]
|
| H A D | splice.c | 28 const struct io_uring_sqe *sqe) in __io_splice_prep() argument 33 sp->len = READ_ONCE(sqe->len); in __io_splice_prep() 34 sp->flags = READ_ONCE(sqe->splice_flags); in __io_splice_prep() 37 sp->splice_fd_in = READ_ONCE(sqe->splice_fd_in); in __io_splice_prep() 43 int io_tee_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) in io_tee_prep() argument 45 if (READ_ONCE(sqe->splice_off_in) || READ_ONCE(sqe->off)) in io_tee_prep() 47 return __io_splice_prep(req, sqe); in io_tee_prep() 109 int io_splice_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) in io_splice_prep() argument 113 sp->off_in = READ_ONCE(sqe->splice_off_in); in io_splice_prep() 114 sp->off_out = READ_ONCE(sqe->off); in io_splice_prep() [all …]
|
| H A D | futex.c | 126 int io_futex_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) in io_futex_prep() argument 131 if (unlikely(sqe->len || sqe->futex_flags || sqe->buf_index || in io_futex_prep() 132 sqe->file_index)) in io_futex_prep() 135 iof->uaddr = u64_to_user_ptr(READ_ONCE(sqe->addr)); in io_futex_prep() 136 iof->futex_val = READ_ONCE(sqe->addr2); in io_futex_prep() 137 iof->futex_mask = READ_ONCE(sqe->addr3); in io_futex_prep() 138 flags = READ_ONCE(sqe->fd); in io_futex_prep() 176 if (unlikely(sqe->fd || sqe->buf_index || sqe->file_index || in io_futexv_prep() 177 sqe->addr2 || sqe->futex_flags || sqe->addr3)) in io_futexv_prep() 180 iof->uaddr = u64_to_user_ptr(READ_ONCE(sqe->addr)); in io_futexv_prep() [all …]
|
| H A D | statx.c | 23 int io_statx_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) in io_statx_prep() argument 28 if (sqe->buf_index || sqe->splice_fd_in) in io_statx_prep() 33 sx->dfd = READ_ONCE(sqe->fd); in io_statx_prep() 34 sx->mask = READ_ONCE(sqe->len); in io_statx_prep() 35 path = u64_to_user_ptr(READ_ONCE(sqe->addr)); in io_statx_prep() 36 sx->buffer = u64_to_user_ptr(READ_ONCE(sqe->addr2)); in io_statx_prep() 37 sx->flags = READ_ONCE(sqe->statx_flags); in io_statx_prep()
|
| H A D | net.c | 109 if (unlikely(sqe->off || sqe->addr || sqe->rw_flags || in io_shutdown_prep() 110 sqe->buf_index || sqe->splice_fd_in)) in io_shutdown_prep() 430 if (unlikely(sqe->addr2 || sqe->file_index)) in io_sendmsg_prep() 764 if (unlikely(sqe->file_index || sqe->addr2)) in io_recvmsg_prep() 1200 if (unlikely(sqe->file_index || sqe->addr2 || sqe->addr || in io_recvzc_prep() 1334 if (unlikely(sqe->addr2 || sqe->file_index)) in io_send_zc_prep() 1572 if (sqe->len || sqe->buf_index) in io_accept_prep() 1667 if (sqe->addr || sqe->rw_flags || sqe->buf_index) in io_socket_prep() 1722 if (sqe->len || sqe->buf_index || sqe->rw_flags || sqe->splice_fd_in) in io_connect_prep() 1790 if (sqe->len || sqe->buf_index || sqe->rw_flags || sqe->splice_fd_in) in io_bind_prep() [all …]
|
| /linux-6.15/tools/testing/selftests/ublk/ |
| H A D | file_backed.c | 19 struct io_uring_sqe *sqe[1]; in loop_queue_flush_io() local 21 ublk_queue_alloc_sqes(q, sqe, 1); in loop_queue_flush_io() 34 struct io_uring_sqe *sqe[3]; in loop_queue_tgt_rw_io() local 37 ublk_queue_alloc_sqes(q, sqe, 1); in loop_queue_tgt_rw_io() 38 if (!sqe[0]) in loop_queue_tgt_rw_io() 41 io_uring_prep_rw(op, sqe[0], 1 /*fds[1]*/, in loop_queue_tgt_rw_io() 51 ublk_queue_alloc_sqes(q, sqe, 3); in loop_queue_tgt_rw_io() 55 sqe[0]->user_data = build_user_data(tag, in loop_queue_tgt_rw_io() 56 ublk_cmd_op_nr(sqe[0]->cmd_op), 0, 1); in loop_queue_tgt_rw_io() 61 sqe[1]->buf_index = tag; in loop_queue_tgt_rw_io() [all …]
|
| H A D | null.c | 49 struct io_uring_sqe *sqe[3]; in null_queue_zc_io() local 51 ublk_queue_alloc_sqes(q, sqe, 3); in null_queue_zc_io() 53 io_uring_prep_buf_register(sqe[0], 0, tag, q->q_id, tag); in null_queue_zc_io() 54 sqe[0]->user_data = build_user_data(tag, in null_queue_zc_io() 55 ublk_cmd_op_nr(sqe[0]->cmd_op), 0, 1); in null_queue_zc_io() 58 io_uring_prep_nop(sqe[1]); in null_queue_zc_io() 59 sqe[1]->buf_index = tag; in null_queue_zc_io() 60 sqe[1]->flags |= IOSQE_FIXED_FILE | IOSQE_IO_HARDLINK; in null_queue_zc_io() 62 sqe[1]->len = iod->nr_sectors << 9; /* injected result */ in null_queue_zc_io() 63 sqe[1]->user_data = build_user_data(tag, ublk_op, 0, 1); in null_queue_zc_io() [all …]
|
| H A D | kublk.h | 289 struct ublksrv_io_cmd *cmd = (struct ublksrv_io_cmd *)sqe->cmd; in io_uring_prep_buf_register() 291 io_uring_prep_read(sqe, dev_fd, 0, 0, 0); in io_uring_prep_buf_register() 292 sqe->opcode = IORING_OP_URING_CMD; in io_uring_prep_buf_register() 293 sqe->flags |= IOSQE_FIXED_FILE; in io_uring_prep_buf_register() 294 sqe->cmd_op = UBLK_U_IO_REGISTER_IO_BUF; in io_uring_prep_buf_register() 306 io_uring_prep_read(sqe, dev_fd, 0, 0, 0); in io_uring_prep_buf_unregister() 307 sqe->opcode = IORING_OP_URING_CMD; in io_uring_prep_buf_unregister() 308 sqe->flags |= IOSQE_FIXED_FILE; in io_uring_prep_buf_unregister() 309 sqe->cmd_op = UBLK_U_IO_UNREGISTER_IO_BUF; in io_uring_prep_buf_unregister() 318 return (void *)&sqe->cmd; in ublk_get_sqe_cmd() [all …]
|
| H A D | stripe.c | 131 struct io_uring_sqe *sqe[NR_STRIPE]; in stripe_queue_tgt_rw_io() local 139 ublk_queue_alloc_sqes(q, sqe, s->nr + extra); in stripe_queue_tgt_rw_io() 144 sqe[0]->user_data = build_user_data(tag, in stripe_queue_tgt_rw_io() 145 ublk_cmd_op_nr(sqe[0]->cmd_op), 0, 1); in stripe_queue_tgt_rw_io() 151 io_uring_prep_rw(op, sqe[i], in stripe_queue_tgt_rw_io() 157 sqe[i]->buf_index = tag; in stripe_queue_tgt_rw_io() 158 io_uring_sqe_set_flags(sqe[i], in stripe_queue_tgt_rw_io() 167 struct io_uring_sqe *unreg = sqe[s->nr + 1]; in stripe_queue_tgt_rw_io() 180 struct io_uring_sqe *sqe[NR_STRIPE]; in handle_flush() local 183 ublk_queue_alloc_sqes(q, sqe, conf->nr_files); in handle_flush() [all …]
|
| /linux-6.15/drivers/crypto/hisilicon/zip/ |
| H A D | zip_crypto.c | 170 sqe->dw9 = val; in hisi_zip_fill_buf_type() 179 sqe->dw9 = val; in hisi_zip_fill_req_type() 184 sqe->dw26 = req->req_id; in hisi_zip_fill_tag() 193 sqe->dw7 = val; in hisi_zip_fill_sqe_type() 203 ops->fill_addr(sqe, req); in hisi_zip_fill_sqe() 204 ops->fill_buf_size(sqe, req); in hisi_zip_fill_sqe() 207 ops->fill_tag(sqe, req); in hisi_zip_fill_sqe() 269 return sqe->dw26; in hisi_zip_get_tag() 279 return sqe->produced; in hisi_zip_get_dstlen() 290 u32 tag = ops->get_tag(sqe); in hisi_zip_acomp_cb() [all …]
|
| /linux-6.15/drivers/infiniband/sw/siw/ |
| H A D | siw_qp.c | 251 wqe->sqe.flags = 0; in siw_qp_mpa_rts() 252 wqe->sqe.num_sge = 1; in siw_qp_mpa_rts() 260 wqe->sqe.rkey = 1; in siw_qp_mpa_rts() 261 wqe->sqe.raddr = 0; in siw_qp_mpa_rts() 842 rreq->id = sqe->id; in siw_read_to_orq() 854 struct siw_sqe *sqe; in siw_activate_tx_from_sq() local 859 if (!sqe) in siw_activate_tx_from_sq() 866 memcpy(&wqe->sqe, sqe, sizeof(*sqe)); in siw_activate_tx_from_sq() 882 wqe->sqe.sge[0].laddr = (uintptr_t)&wqe->sqe.sge[1]; in siw_activate_tx_from_sq() 974 wqe->sqe.flags = 0; in siw_activate_tx() [all …]
|
| H A D | siw_qp_tx.c | 52 struct siw_sge *sge = &wqe->sqe.sge[0]; in siw_try_1seg() 62 memcpy(paddr, &wqe->sqe.sge[1], bytes); in siw_try_1seg() 137 cpu_to_be64(wqe->sqe.sge[0].laddr); in siw_qp_prepare_tx() 244 cpu_to_be64(wqe->sqe.raddr); in siw_qp_prepare_tx() 644 sge = &wqe->sqe.sge[c_tx->sge_idx]; in siw_tx_hdt() 800 wqe->sqe.num_sge = 1; in siw_qp_sq_proc_tx() 828 wqe->sqe.sge[0].laddr = in siw_qp_sq_proc_tx() 829 (u64)(uintptr_t)&wqe->sqe.sge[1]; in siw_qp_sq_proc_tx() 851 wqe->sqe.id); in siw_qp_sq_proc_tx() 958 mem->stag = sqe->rkey; in siw_fastreg_mr() [all …]
|
| H A D | siw_verbs.c | 655 void *kbuf = &sqe->sge[1]; in siw_copy_inline_sgl() 659 sqe->sge[0].lkey = 0; in siw_copy_inline_sgl() 690 struct siw_sqe sqe = {}; in siw_sq_flush_wr() local 697 sqe.opcode = SIW_OP_READ; in siw_sq_flush_wr() 722 sqe.id = wr->wr_id; in siw_sq_flush_wr() 829 if (sqe->flags) { in siw_post_send() 839 sqe->id = wr->wr_id; in siw_post_send() 865 sqe->num_sge = 1; in siw_post_send() 894 sqe->num_sge = 1; in siw_post_send() 914 sqe->num_sge = 1; in siw_post_send() [all …]
|
| /linux-6.15/include/net/libeth/ |
| H A D | tx.h | 96 static inline void libeth_tx_complete(struct libeth_sqe *sqe, in libeth_tx_complete() argument 99 switch (sqe->type) { in libeth_tx_complete() 105 dma_unmap_page(cp->dev, dma_unmap_addr(sqe, dma), in libeth_tx_complete() 106 dma_unmap_len(sqe, len), DMA_TO_DEVICE); in libeth_tx_complete() 112 switch (sqe->type) { in libeth_tx_complete() 114 cp->ss->packets += sqe->packets; in libeth_tx_complete() 115 cp->ss->bytes += sqe->bytes; in libeth_tx_complete() 117 napi_consume_skb(sqe->skb, cp->napi); in libeth_tx_complete() 120 kfree(sqe->raw); in libeth_tx_complete() 126 sqe->type = LIBETH_SQE_EMPTY; in libeth_tx_complete()
|
| /linux-6.15/tools/include/io_uring/ |
| H A D | mini_liburing.h | 236 memset(sqe, 0, sizeof(*sqe)); in io_uring_prep_cmd() 238 sqe->fd = sockfd; in io_uring_prep_cmd() 239 sqe->cmd_op = op; in io_uring_prep_cmd() 241 sqe->level = level; in io_uring_prep_cmd() 242 sqe->optname = optname; in io_uring_prep_cmd() 244 sqe->optlen = optlen; in io_uring_prep_cmd() 261 memset(sqe, 0, sizeof(*sqe)); in io_uring_prep_send() 263 sqe->fd = sockfd; in io_uring_prep_send() 265 sqe->len = len; in io_uring_prep_send() 266 sqe->msg_flags = (__u32)flags; in io_uring_prep_send() [all …]
|
| /linux-6.15/tools/testing/selftests/drivers/net/hw/ |
| H A D | iou-zcrx.c | 183 struct io_uring_sqe *sqe; in add_accept() local 185 sqe = io_uring_get_sqe(ring); in add_accept() 188 sqe->user_data = 1; in add_accept() 193 struct io_uring_sqe *sqe; in add_recvzc() local 195 sqe = io_uring_get_sqe(ring); in add_recvzc() 198 sqe->ioprio |= IORING_RECV_MULTISHOT; in add_recvzc() 199 sqe->user_data = 2; in add_recvzc() 204 struct io_uring_sqe *sqe; in add_recvzc_oneshot() local 206 sqe = io_uring_get_sqe(ring); in add_recvzc_oneshot() 210 sqe->user_data = 2; in add_recvzc_oneshot() [all …]
|