Lines Matching refs:sgl
59 struct af_alg_sgl sgl; member
86 struct scatterlist *sgl; in skcipher_free_async_sgls() local
91 af_alg_free_sg(&rsgl->sgl); in skcipher_free_async_sgls()
95 sgl = sreq->tsg; in skcipher_free_async_sgls()
96 n = sg_nents(sgl); in skcipher_free_async_sgls()
97 for_each_sg(sgl, sg, n, i) in skcipher_free_async_sgls()
135 struct skcipher_sg_list *sgl; in skcipher_alloc_sgl() local
138 sgl = list_entry(ctx->tsgl.prev, struct skcipher_sg_list, list); in skcipher_alloc_sgl()
140 sg = sgl->sg; in skcipher_alloc_sgl()
142 if (!sg || sgl->cur >= MAX_SGL_ENTS) { in skcipher_alloc_sgl()
143 sgl = sock_kmalloc(sk, sizeof(*sgl) + in skcipher_alloc_sgl()
144 sizeof(sgl->sg[0]) * (MAX_SGL_ENTS + 1), in skcipher_alloc_sgl()
146 if (!sgl) in skcipher_alloc_sgl()
149 sg_init_table(sgl->sg, MAX_SGL_ENTS + 1); in skcipher_alloc_sgl()
150 sgl->cur = 0; in skcipher_alloc_sgl()
153 scatterwalk_sg_chain(sg, MAX_SGL_ENTS + 1, sgl->sg); in skcipher_alloc_sgl()
155 list_add_tail(&sgl->list, &ctx->tsgl); in skcipher_alloc_sgl()
165 struct skcipher_sg_list *sgl; in skcipher_pull_sgl() local
170 sgl = list_first_entry(&ctx->tsgl, struct skcipher_sg_list, in skcipher_pull_sgl()
172 sg = sgl->sg; in skcipher_pull_sgl()
174 for (i = 0; i < sgl->cur; i++) { in skcipher_pull_sgl()
193 list_del(&sgl->list); in skcipher_pull_sgl()
194 sock_kfree_s(sk, sgl, in skcipher_pull_sgl()
195 sizeof(*sgl) + sizeof(sgl->sg[0]) * in skcipher_pull_sgl()
312 struct skcipher_sg_list *sgl; in skcipher_sendmsg() local
359 sgl = list_entry(ctx->tsgl.prev, in skcipher_sendmsg()
361 sg = sgl->sg + sgl->cur - 1; in skcipher_sendmsg()
393 sgl = list_entry(ctx->tsgl.prev, struct skcipher_sg_list, list); in skcipher_sendmsg()
394 sg = sgl->sg; in skcipher_sendmsg()
395 if (sgl->cur) in skcipher_sendmsg()
396 sg_unmark_end(sg + sgl->cur - 1); in skcipher_sendmsg()
398 i = sgl->cur; in skcipher_sendmsg()
419 sgl->cur++; in skcipher_sendmsg()
420 } while (len && sgl->cur < MAX_SGL_ENTS); in skcipher_sendmsg()
423 sg_mark_end(sg + sgl->cur - 1); in skcipher_sendmsg()
445 struct skcipher_sg_list *sgl; in skcipher_sendpage() local
469 sgl = list_entry(ctx->tsgl.prev, struct skcipher_sg_list, list); in skcipher_sendpage()
471 if (sgl->cur) in skcipher_sendpage()
472 sg_unmark_end(sgl->sg + sgl->cur - 1); in skcipher_sendpage()
474 sg_mark_end(sgl->sg + sgl->cur); in skcipher_sendpage()
476 sg_set_page(sgl->sg + sgl->cur, page, size, offset); in skcipher_sendpage()
477 sgl->cur++; in skcipher_sendpage()
492 struct skcipher_sg_list *sgl; in skcipher_all_sg_nents() local
496 list_for_each_entry(sgl, &ctx->tsgl, list) { in skcipher_all_sg_nents()
497 sg = sgl->sg; in skcipher_all_sg_nents()
513 struct skcipher_sg_list *sgl; in skcipher_recvmsg_async() local
553 sgl = list_first_entry(&ctx->tsgl, in skcipher_recvmsg_async()
555 sg = sgl->sg; in skcipher_recvmsg_async()
601 used = af_alg_make_sg(&rsgl->sgl, &msg->msg_iter, used); in skcipher_recvmsg_async()
606 af_alg_link_sg(&last_rsgl->sgl, &rsgl->sgl); in skcipher_recvmsg_async()
617 ablkcipher_request_set_crypt(req, sreq->tsg, sreq->first_sgl.sgl.sg, in skcipher_recvmsg_async()
643 struct skcipher_sg_list *sgl; in skcipher_recvmsg_sync() local
651 sgl = list_first_entry(&ctx->tsgl, in skcipher_recvmsg_sync()
653 sg = sgl->sg; in skcipher_recvmsg_sync()