Lines Matching refs:dreq

103 	struct dmover_request *dreq;  in swdmover_thread()  local
111 dreq = TAILQ_FIRST(&dmb->dmb_pendreqs); in swdmover_thread()
112 if (dreq == NULL) { in swdmover_thread()
118 dmover_backend_remque(dmb, dreq); in swdmover_thread()
119 dreq->dreq_flags |= DMOVER_REQ_RUNNING; in swdmover_thread()
124 sdf = dreq->dreq_assignment->das_algdesc->dad_data; in swdmover_thread()
125 (*sdf->sdf_process)(dreq); in swdmover_thread()
138 swdmover_func_zero_process(struct dmover_request *dreq) in swdmover_func_zero_process() argument
141 switch (dreq->dreq_outbuf_type) { in swdmover_func_zero_process()
143 memset(dreq->dreq_outbuf.dmbuf_linear.l_addr, 0, in swdmover_func_zero_process()
144 dreq->dreq_outbuf.dmbuf_linear.l_len); in swdmover_func_zero_process()
149 struct uio *uio = dreq->dreq_outbuf.dmbuf_uio; in swdmover_func_zero_process()
156 dreq->dreq_error = EINVAL; in swdmover_func_zero_process()
157 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_zero_process()
173 dreq->dreq_error = error; in swdmover_func_zero_process()
174 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_zero_process()
184 dreq->dreq_error = EINVAL; in swdmover_func_zero_process()
185 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_zero_process()
189 dmover_done(dreq); in swdmover_func_zero_process()
198 swdmover_func_fill8_process(struct dmover_request *dreq) in swdmover_func_fill8_process() argument
201 switch (dreq->dreq_outbuf_type) { in swdmover_func_fill8_process()
203 memset(dreq->dreq_outbuf.dmbuf_linear.l_addr, in swdmover_func_fill8_process()
204 dreq->dreq_immediate[0], in swdmover_func_fill8_process()
205 dreq->dreq_outbuf.dmbuf_linear.l_len); in swdmover_func_fill8_process()
210 struct uio *uio = dreq->dreq_outbuf.dmbuf_uio; in swdmover_func_fill8_process()
217 dreq->dreq_error = EINVAL; in swdmover_func_fill8_process()
218 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_fill8_process()
226 memset(cp, dreq->dreq_immediate[0], buflen); in swdmover_func_fill8_process()
234 dreq->dreq_error = error; in swdmover_func_fill8_process()
235 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_fill8_process()
245 dreq->dreq_error = EINVAL; in swdmover_func_fill8_process()
246 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_fill8_process()
250 dmover_done(dreq); in swdmover_func_fill8_process()
267 swdmover_func_xor_process(struct dmover_request *dreq) in swdmover_func_xor_process() argument
269 #define INBUF_L(x) dreq->dreq_inbuf[(x)].dmbuf_linear in swdmover_func_xor_process()
270 #define OUTBUF_L dreq->dreq_outbuf.dmbuf_linear in swdmover_func_xor_process()
274 int i, ninputs = dreq->dreq_assignment->das_algdesc->dad_ninputs; in swdmover_func_xor_process()
278 if (dreq->dreq_inbuf_type != dreq->dreq_outbuf_type) { in swdmover_func_xor_process()
280 dreq->dreq_error = EINVAL; in swdmover_func_xor_process()
281 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_xor_process()
286 switch (dreq->dreq_outbuf_type) { in swdmover_func_xor_process()
295 dreq->dreq_error = EINVAL; in swdmover_func_xor_process()
296 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_xor_process()
332 struct uio *uio_out = dreq->dreq_outbuf.dmbuf_uio; in swdmover_func_xor_process()
333 struct uio *uio_in = dreq->dreq_inbuf[0].dmbuf_uio; in swdmover_func_xor_process()
343 dreq->dreq_error = EINVAL; in swdmover_func_xor_process()
344 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_xor_process()
366 dreq->dreq_error = error; in swdmover_func_xor_process()
367 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_xor_process()
372 uio = dreq->dreq_inbuf[i].dmbuf_uio; in swdmover_func_xor_process()
382 dreq->dreq_error = error; in swdmover_func_xor_process()
383 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_xor_process()
393 dreq->dreq_error = EINVAL; in swdmover_func_xor_process()
394 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_xor_process()
399 dmover_done(dreq); in swdmover_func_xor_process()
408 swdmover_func_copy_process(struct dmover_request *dreq) in swdmover_func_copy_process() argument
412 if (dreq->dreq_inbuf_type != dreq->dreq_outbuf_type) { in swdmover_func_copy_process()
414 dreq->dreq_error = EINVAL; in swdmover_func_copy_process()
415 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_copy_process()
420 switch (dreq->dreq_outbuf_type) { in swdmover_func_copy_process()
422 if (dreq->dreq_outbuf.dmbuf_linear.l_len != in swdmover_func_copy_process()
423 dreq->dreq_inbuf[0].dmbuf_linear.l_len) { in swdmover_func_copy_process()
425 dreq->dreq_error = EINVAL; in swdmover_func_copy_process()
426 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_copy_process()
430 memcpy(dreq->dreq_outbuf.dmbuf_linear.l_addr, in swdmover_func_copy_process()
431 dreq->dreq_inbuf[0].dmbuf_linear.l_addr, in swdmover_func_copy_process()
432 dreq->dreq_outbuf.dmbuf_linear.l_len); in swdmover_func_copy_process()
437 struct uio *uio_out = dreq->dreq_outbuf.dmbuf_uio; in swdmover_func_copy_process()
438 struct uio *uio_in = dreq->dreq_inbuf[0].dmbuf_uio; in swdmover_func_copy_process()
447 dreq->dreq_error = EINVAL; in swdmover_func_copy_process()
448 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_copy_process()
465 dreq->dreq_error = error; in swdmover_func_copy_process()
466 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_copy_process()
476 dreq->dreq_error = EINVAL; in swdmover_func_copy_process()
477 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_copy_process()
482 dmover_done(dreq); in swdmover_func_copy_process()
569 swdmover_func_iscsi_crc32c_process(struct dmover_request *dreq) in swdmover_func_iscsi_crc32c_process() argument
574 if (dreq->dreq_outbuf_type != DMOVER_BUF_NONE) { in swdmover_func_iscsi_crc32c_process()
576 dreq->dreq_error = EINVAL; in swdmover_func_iscsi_crc32c_process()
577 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_iscsi_crc32c_process()
582 memcpy(&result, dreq->dreq_immediate, sizeof(result)); in swdmover_func_iscsi_crc32c_process()
584 switch (dreq->dreq_inbuf_type) { in swdmover_func_iscsi_crc32c_process()
586 result = iscsi_crc32c(dreq->dreq_inbuf[0].dmbuf_linear.l_addr, in swdmover_func_iscsi_crc32c_process()
587 dreq->dreq_inbuf[0].dmbuf_linear.l_len, result); in swdmover_func_iscsi_crc32c_process()
592 struct uio *uio_in = dreq->dreq_inbuf[0].dmbuf_uio; in swdmover_func_iscsi_crc32c_process()
599 dreq->dreq_error = EINVAL; in swdmover_func_iscsi_crc32c_process()
600 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_iscsi_crc32c_process()
615 dreq->dreq_error = error; in swdmover_func_iscsi_crc32c_process()
616 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_iscsi_crc32c_process()
627 dreq->dreq_error = EINVAL; in swdmover_func_iscsi_crc32c_process()
628 dreq->dreq_flags |= DMOVER_REQ_ERROR; in swdmover_func_iscsi_crc32c_process()
633 memcpy(dreq->dreq_immediate, &result, sizeof(result)); in swdmover_func_iscsi_crc32c_process()
635 dmover_done(dreq); in swdmover_func_iscsi_crc32c_process()