Lines Matching refs:sgl
59 struct af_alg_sgl sgl; member
78 struct scatterlist *sgl; in skcipher_free_async_sgls() local
83 af_alg_free_sg(&rsgl->sgl); in skcipher_free_async_sgls()
87 sgl = sreq->tsg; in skcipher_free_async_sgls()
88 n = sg_nents(sgl); in skcipher_free_async_sgls()
89 for_each_sg(sgl, sg, n, i) in skcipher_free_async_sgls()
124 struct skcipher_sg_list *sgl; in skcipher_alloc_sgl() local
127 sgl = list_entry(ctx->tsgl.prev, struct skcipher_sg_list, list); in skcipher_alloc_sgl()
129 sg = sgl->sg; in skcipher_alloc_sgl()
131 if (!sg || sgl->cur >= MAX_SGL_ENTS) { in skcipher_alloc_sgl()
132 sgl = sock_kmalloc(sk, sizeof(*sgl) + in skcipher_alloc_sgl()
133 sizeof(sgl->sg[0]) * (MAX_SGL_ENTS + 1), in skcipher_alloc_sgl()
135 if (!sgl) in skcipher_alloc_sgl()
138 sg_init_table(sgl->sg, MAX_SGL_ENTS + 1); in skcipher_alloc_sgl()
139 sgl->cur = 0; in skcipher_alloc_sgl()
142 sg_chain(sg, MAX_SGL_ENTS + 1, sgl->sg); in skcipher_alloc_sgl()
144 list_add_tail(&sgl->list, &ctx->tsgl); in skcipher_alloc_sgl()
154 struct skcipher_sg_list *sgl; in skcipher_pull_sgl() local
159 sgl = list_first_entry(&ctx->tsgl, struct skcipher_sg_list, in skcipher_pull_sgl()
161 sg = sgl->sg; in skcipher_pull_sgl()
163 for (i = 0; i < sgl->cur; i++) { in skcipher_pull_sgl()
182 list_del(&sgl->list); in skcipher_pull_sgl()
183 sock_kfree_s(sk, sgl, in skcipher_pull_sgl()
184 sizeof(*sgl) + sizeof(sgl->sg[0]) * in skcipher_pull_sgl()
304 struct skcipher_sg_list *sgl; in skcipher_sendmsg() local
351 sgl = list_entry(ctx->tsgl.prev, in skcipher_sendmsg()
353 sg = sgl->sg + sgl->cur - 1; in skcipher_sendmsg()
385 sgl = list_entry(ctx->tsgl.prev, struct skcipher_sg_list, list); in skcipher_sendmsg()
386 sg = sgl->sg; in skcipher_sendmsg()
387 if (sgl->cur) in skcipher_sendmsg()
388 sg_unmark_end(sg + sgl->cur - 1); in skcipher_sendmsg()
390 i = sgl->cur; in skcipher_sendmsg()
411 sgl->cur++; in skcipher_sendmsg()
412 } while (len && sgl->cur < MAX_SGL_ENTS); in skcipher_sendmsg()
415 sg_mark_end(sg + sgl->cur - 1); in skcipher_sendmsg()
437 struct skcipher_sg_list *sgl; in skcipher_sendpage() local
461 sgl = list_entry(ctx->tsgl.prev, struct skcipher_sg_list, list); in skcipher_sendpage()
463 if (sgl->cur) in skcipher_sendpage()
464 sg_unmark_end(sgl->sg + sgl->cur - 1); in skcipher_sendpage()
466 sg_mark_end(sgl->sg + sgl->cur); in skcipher_sendpage()
468 sg_set_page(sgl->sg + sgl->cur, page, size, offset); in skcipher_sendpage()
469 sgl->cur++; in skcipher_sendpage()
484 struct skcipher_sg_list *sgl; in skcipher_all_sg_nents() local
488 list_for_each_entry(sgl, &ctx->tsgl, list) { in skcipher_all_sg_nents()
489 sg = sgl->sg; in skcipher_all_sg_nents()
509 struct skcipher_sg_list *sgl; in skcipher_recvmsg_async() local
551 sgl = list_first_entry(&ctx->tsgl, in skcipher_recvmsg_async()
553 sg = sgl->sg; in skcipher_recvmsg_async()
599 used = af_alg_make_sg(&rsgl->sgl, &msg->msg_iter, used); in skcipher_recvmsg_async()
604 af_alg_link_sg(&last_rsgl->sgl, &rsgl->sgl); in skcipher_recvmsg_async()
615 skcipher_request_set_crypt(req, sreq->tsg, sreq->first_sgl.sgl.sg, in skcipher_recvmsg_async()
646 struct skcipher_sg_list *sgl; in skcipher_recvmsg_sync() local
674 sgl = list_first_entry(&ctx->tsgl, in skcipher_recvmsg_sync()
676 sg = sgl->sg; in skcipher_recvmsg_sync()