Lines Matching refs:hctx_wr

135 	memset(&reqctx->hctx_wr, 0, sizeof(struct chcr_hctx_per_wr));  in chcr_init_hctx_per_wr()
1583 req_ctx->hctx_wr.imm = (transhdr_len + param->bfr_len + in create_hash_wr()
1585 nents = sg_nents_xlen(req_ctx->hctx_wr.srcsg, param->sg_len, in create_hash_wr()
1586 CHCR_SRC_SG_SIZE, req_ctx->hctx_wr.src_ofst); in create_hash_wr()
1588 transhdr_len += req_ctx->hctx_wr.imm ? roundup(param->bfr_len + in create_hash_wr()
1631 req_ctx->hctx_wr.dma_addr = in create_hash_wr()
1635 req_ctx->hctx_wr. dma_addr)) { in create_hash_wr()
1639 req_ctx->hctx_wr.dma_len = param->bfr_len; in create_hash_wr()
1641 req_ctx->hctx_wr.dma_addr = 0; in create_hash_wr()
1645 temp = param->kctx_len + DUMMY_BYTES + (req_ctx->hctx_wr.imm ? in create_hash_wr()
1648 create_wreq(h_ctx(tfm), chcr_req, &req->base, req_ctx->hctx_wr.imm, in create_hash_wr()
1651 req_ctx->hctx_wr.skb = skb; in create_hash_wr()
1720 req_ctx->hctx_wr.srcsg = req->src; in chcr_ahash_update()
1730 req_ctx->hctx_wr.processed += params.sg_len; in chcr_ahash_update()
1788 req_ctx->hctx_wr.isfinal = 1; in chcr_ahash_final()
1798 req_ctx->hctx_wr.result = 1; in chcr_ahash_final()
1801 req_ctx->hctx_wr.srcsg = req->src; in chcr_ahash_final()
1898 req_ctx->hctx_wr.result = 1; in chcr_ahash_finup()
1899 req_ctx->hctx_wr.srcsg = req->src; in chcr_ahash_finup()
1913 req_ctx->hctx_wr.processed += params.sg_len; in chcr_ahash_finup()
1992 req_ctx->hctx_wr.result = 1; in chcr_ahash_digest()
1993 req_ctx->hctx_wr.srcsg = req->src; in chcr_ahash_digest()
2007 req_ctx->hctx_wr.processed += params.sg_len; in chcr_ahash_digest()
2022 struct chcr_hctx_per_wr *hctx_wr = &reqctx->hctx_wr; in chcr_ahash_continue() local
2046 params.sg_len = chcr_hash_ent_in_wr(hctx_wr->srcsg, 0, in chcr_ahash_continue()
2048 hctx_wr->src_ofst); in chcr_ahash_continue()
2049 if ((params.sg_len + hctx_wr->processed) > req->nbytes) in chcr_ahash_continue()
2050 params.sg_len = req->nbytes - hctx_wr->processed; in chcr_ahash_continue()
2051 if (!hctx_wr->result || in chcr_ahash_continue()
2052 ((params.sg_len + hctx_wr->processed) < req->nbytes)) { in chcr_ahash_continue()
2075 hctx_wr->processed += params.sg_len; in chcr_ahash_continue()
2089 struct chcr_hctx_per_wr *hctx_wr = &reqctx->hctx_wr; in chcr_handle_ahash_resp() local
2104 if (hctx_wr->dma_addr) { in chcr_handle_ahash_resp()
2105 dma_unmap_single(&u_ctx->lldi.pdev->dev, hctx_wr->dma_addr, in chcr_handle_ahash_resp()
2106 hctx_wr->dma_len, DMA_TO_DEVICE); in chcr_handle_ahash_resp()
2107 hctx_wr->dma_addr = 0; in chcr_handle_ahash_resp()
2109 if (hctx_wr->isfinal || ((hctx_wr->processed + reqctx->reqlen) == in chcr_handle_ahash_resp()
2111 if (hctx_wr->result == 1) { in chcr_handle_ahash_resp()
2112 hctx_wr->result = 0; in chcr_handle_ahash_resp()
2131 if (hctx_wr->is_sg_map) in chcr_handle_ahash_resp()
2772 if (reqctx->hctx_wr.imm) { in chcr_add_hash_src_ent()
2780 sg_pcopy_to_buffer(reqctx->hctx_wr.srcsg, in chcr_add_hash_src_ent()
2781 sg_nents(reqctx->hctx_wr.srcsg), buf, in chcr_add_hash_src_ent()
2787 reqctx->hctx_wr.dma_addr); in chcr_add_hash_src_ent()
2788 ulptx_walk_add_sg(&ulp_walk, reqctx->hctx_wr.srcsg, in chcr_add_hash_src_ent()
2789 param->sg_len, reqctx->hctx_wr.src_ofst); in chcr_add_hash_src_ent()
2790 reqctx->hctx_wr.srcsg = ulp_walk.last_sg; in chcr_add_hash_src_ent()
2791 reqctx->hctx_wr.src_ofst = ulp_walk.last_sg_len; in chcr_add_hash_src_ent()
2808 req_ctx->hctx_wr.is_sg_map = 1; in chcr_hash_dma_map()
2822 req_ctx->hctx_wr.is_sg_map = 0; in chcr_hash_dma_unmap()