Lines Matching refs:sreq
83 static void skcipher_free_async_sgls(struct skcipher_async_req *sreq) in skcipher_free_async_sgls() argument
90 list_for_each_entry_safe(rsgl, tmp, &sreq->list, list) { in skcipher_free_async_sgls()
92 if (rsgl != &sreq->first_sgl) in skcipher_free_async_sgls()
95 sgl = sreq->tsg; in skcipher_free_async_sgls()
100 kfree(sreq->tsg); in skcipher_free_async_sgls()
108 struct skcipher_async_req *sreq = GET_SREQ(req, ctx); in skcipher_async_cb() local
109 struct kiocb *iocb = sreq->iocb; in skcipher_async_cb()
112 skcipher_free_async_sgls(sreq); in skcipher_async_cb()
515 struct skcipher_async_req *sreq; in skcipher_recvmsg_async() local
529 sreq = GET_SREQ(req, ctx); in skcipher_recvmsg_async()
530 sreq->iocb = msg->msg_iocb; in skcipher_recvmsg_async()
531 memset(&sreq->first_sgl, '\0', sizeof(struct skcipher_async_rsgl)); in skcipher_recvmsg_async()
532 INIT_LIST_HEAD(&sreq->list); in skcipher_recvmsg_async()
533 sreq->tsg = kcalloc(tx_nents, sizeof(*sg), GFP_KERNEL); in skcipher_recvmsg_async()
534 if (unlikely(!sreq->tsg)) { in skcipher_recvmsg_async()
538 sg_init_table(sreq->tsg, tx_nents); in skcipher_recvmsg_async()
539 memcpy(sreq->iv, ctx->iv, GET_IV_SIZE(ctx)); in skcipher_recvmsg_async()
576 sg_set_page(&tmp[x], sg_page(&sreq->tsg[x]), in skcipher_recvmsg_async()
577 sreq->tsg[x].length, in skcipher_recvmsg_async()
578 sreq->tsg[x].offset); in skcipher_recvmsg_async()
579 kfree(sreq->tsg); in skcipher_recvmsg_async()
580 sreq->tsg = tmp; in skcipher_recvmsg_async()
586 sg_set_page(sreq->tsg + txbufs++, sg_page(sg), sg->length, in skcipher_recvmsg_async()
589 if (list_empty(&sreq->list)) { in skcipher_recvmsg_async()
590 rsgl = &sreq->first_sgl; in skcipher_recvmsg_async()
591 list_add_tail(&rsgl->list, &sreq->list); in skcipher_recvmsg_async()
598 list_add_tail(&rsgl->list, &sreq->list); in skcipher_recvmsg_async()
615 sg_mark_end(sreq->tsg + txbufs - 1); in skcipher_recvmsg_async()
617 ablkcipher_request_set_crypt(req, sreq->tsg, sreq->first_sgl.sgl.sg, in skcipher_recvmsg_async()
618 len, sreq->iv); in skcipher_recvmsg_async()
627 skcipher_free_async_sgls(sreq); in skcipher_recvmsg_async()