Lines Matching refs:req_ctx
1569 struct chcr_ahash_req_ctx *req_ctx = ahash_request_ctx(req); in create_hash_wr() local
1583 unsigned int rx_channel_id = req_ctx->rxqidx / ctx->rxq_perchan; in create_hash_wr()
1587 req_ctx->hctx_wr.imm = (transhdr_len + param->bfr_len + in create_hash_wr()
1589 nents = sg_nents_xlen(req_ctx->hctx_wr.srcsg, param->sg_len, in create_hash_wr()
1590 CHCR_SRC_SG_SIZE, req_ctx->hctx_wr.src_ofst); in create_hash_wr()
1592 transhdr_len += req_ctx->hctx_wr.imm ? roundup(param->bfr_len + in create_hash_wr()
1617 memcpy(chcr_req->key_ctx.key, req_ctx->partial_hash, in create_hash_wr()
1635 req_ctx->hctx_wr.dma_addr = in create_hash_wr()
1636 dma_map_single(&u_ctx->lldi.pdev->dev, req_ctx->reqbfr, in create_hash_wr()
1639 req_ctx->hctx_wr. dma_addr)) { in create_hash_wr()
1643 req_ctx->hctx_wr.dma_len = param->bfr_len; in create_hash_wr()
1645 req_ctx->hctx_wr.dma_addr = 0; in create_hash_wr()
1649 temp = param->kctx_len + DUMMY_BYTES + (req_ctx->hctx_wr.imm ? in create_hash_wr()
1652 create_wreq(h_ctx(tfm), chcr_req, &req->base, req_ctx->hctx_wr.imm, in create_hash_wr()
1655 req_ctx->hctx_wr.skb = skb; in create_hash_wr()
1664 struct chcr_ahash_req_ctx *req_ctx = ahash_request_ctx(req); in chcr_ahash_update() local
1677 req_ctx->txqidx = cpu % ctx->ntxq; in chcr_ahash_update()
1678 req_ctx->rxqidx = cpu % ctx->nrxq; in chcr_ahash_update()
1683 if (nbytes + req_ctx->reqlen >= bs) { in chcr_ahash_update()
1684 remainder = (nbytes + req_ctx->reqlen) % bs; in chcr_ahash_update()
1685 nbytes = nbytes + req_ctx->reqlen - remainder; in chcr_ahash_update()
1687 sg_pcopy_to_buffer(req->src, sg_nents(req->src), req_ctx->reqbfr in chcr_ahash_update()
1688 + req_ctx->reqlen, nbytes, 0); in chcr_ahash_update()
1689 req_ctx->reqlen += nbytes; in chcr_ahash_update()
1699 req_ctx->txqidx) && in chcr_ahash_update()
1705 chcr_init_hctx_per_wr(req_ctx); in chcr_ahash_update()
1713 params.sg_len = chcr_hash_ent_in_wr(req->src, !!req_ctx->reqlen, in chcr_ahash_update()
1717 params.sg_len = rounddown(params.sg_len + req_ctx->reqlen, bs) - in chcr_ahash_update()
1718 req_ctx->reqlen; in chcr_ahash_update()
1722 params.bfr_len = req_ctx->reqlen; in chcr_ahash_update()
1724 req_ctx->hctx_wr.srcsg = req->src; in chcr_ahash_update()
1727 req_ctx->data_len += params.sg_len + params.bfr_len; in chcr_ahash_update()
1734 req_ctx->hctx_wr.processed += params.sg_len; in chcr_ahash_update()
1737 swap(req_ctx->reqbfr, req_ctx->skbfr); in chcr_ahash_update()
1739 req_ctx->reqbfr, remainder, req->nbytes - in chcr_ahash_update()
1742 req_ctx->reqlen = remainder; in chcr_ahash_update()
1744 set_wr_txq(skb, CPL_PRIORITY_DATA, req_ctx->txqidx); in chcr_ahash_update()
1766 struct chcr_ahash_req_ctx *req_ctx = ahash_request_ctx(req); in chcr_ahash_final() local
1778 req_ctx->txqidx = cpu % ctx->ntxq; in chcr_ahash_final()
1779 req_ctx->rxqidx = cpu % ctx->nrxq; in chcr_ahash_final()
1786 chcr_init_hctx_per_wr(req_ctx); in chcr_ahash_final()
1792 req_ctx->hctx_wr.isfinal = 1; in chcr_ahash_final()
1802 req_ctx->hctx_wr.result = 1; in chcr_ahash_final()
1803 params.bfr_len = req_ctx->reqlen; in chcr_ahash_final()
1804 req_ctx->data_len += params.bfr_len + params.sg_len; in chcr_ahash_final()
1805 req_ctx->hctx_wr.srcsg = req->src; in chcr_ahash_final()
1806 if (req_ctx->reqlen == 0) { in chcr_ahash_final()
1807 create_last_hash_block(req_ctx->reqbfr, bs, req_ctx->data_len); in chcr_ahash_final()
1814 params.scmd1 = req_ctx->data_len; in chcr_ahash_final()
1824 req_ctx->reqlen = 0; in chcr_ahash_final()
1826 set_wr_txq(skb, CPL_PRIORITY_DATA, req_ctx->txqidx); in chcr_ahash_final()
1836 struct chcr_ahash_req_ctx *req_ctx = ahash_request_ctx(req); in chcr_ahash_finup() local
1848 req_ctx->txqidx = cpu % ctx->ntxq; in chcr_ahash_finup()
1849 req_ctx->rxqidx = cpu % ctx->nrxq; in chcr_ahash_finup()
1858 req_ctx->txqidx) && in chcr_ahash_finup()
1863 chcr_init_hctx_per_wr(req_ctx); in chcr_ahash_finup()
1879 params.sg_len = chcr_hash_ent_in_wr(req->src, !!req_ctx->reqlen, in chcr_ahash_finup()
1888 params.sg_len = rounddown(params.sg_len + req_ctx->reqlen, bs) in chcr_ahash_finup()
1889 - req_ctx->reqlen; in chcr_ahash_finup()
1897 params.scmd1 = req_ctx->data_len + req_ctx->reqlen + in chcr_ahash_finup()
1900 params.bfr_len = req_ctx->reqlen; in chcr_ahash_finup()
1901 req_ctx->data_len += params.bfr_len + params.sg_len; in chcr_ahash_finup()
1902 req_ctx->hctx_wr.result = 1; in chcr_ahash_finup()
1903 req_ctx->hctx_wr.srcsg = req->src; in chcr_ahash_finup()
1904 if ((req_ctx->reqlen + req->nbytes) == 0) { in chcr_ahash_finup()
1905 create_last_hash_block(req_ctx->reqbfr, bs, req_ctx->data_len); in chcr_ahash_finup()
1916 req_ctx->reqlen = 0; in chcr_ahash_finup()
1917 req_ctx->hctx_wr.processed += params.sg_len; in chcr_ahash_finup()
1919 set_wr_txq(skb, CPL_PRIORITY_DATA, req_ctx->txqidx); in chcr_ahash_finup()
1931 struct chcr_ahash_req_ctx *req_ctx = ahash_request_ctx(req); in chcr_ahash_digest() local
1943 req_ctx->txqidx = cpu % ctx->ntxq; in chcr_ahash_digest()
1944 req_ctx->rxqidx = cpu % ctx->nrxq; in chcr_ahash_digest()
1954 req_ctx->txqidx) && in chcr_ahash_digest()
1960 chcr_init_hctx_per_wr(req_ctx); in chcr_ahash_digest()
1975 params.sg_len = chcr_hash_ent_in_wr(req->src, !!req_ctx->reqlen, in chcr_ahash_digest()
1992 params.scmd1 = req->nbytes + req_ctx->data_len; in chcr_ahash_digest()
1996 req_ctx->hctx_wr.result = 1; in chcr_ahash_digest()
1997 req_ctx->hctx_wr.srcsg = req->src; in chcr_ahash_digest()
1998 req_ctx->data_len += params.bfr_len + params.sg_len; in chcr_ahash_digest()
2001 create_last_hash_block(req_ctx->reqbfr, bs, req_ctx->data_len); in chcr_ahash_digest()
2011 req_ctx->hctx_wr.processed += params.sg_len; in chcr_ahash_digest()
2013 set_wr_txq(skb, CPL_PRIORITY_DATA, req_ctx->txqidx); in chcr_ahash_digest()
2172 struct chcr_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in chcr_ahash_export() local
2175 state->reqlen = req_ctx->reqlen; in chcr_ahash_export()
2176 state->data_len = req_ctx->data_len; in chcr_ahash_export()
2177 memcpy(state->bfr1, req_ctx->reqbfr, req_ctx->reqlen); in chcr_ahash_export()
2178 memcpy(state->partial_hash, req_ctx->partial_hash, in chcr_ahash_export()
2186 struct chcr_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in chcr_ahash_import() local
2189 req_ctx->reqlen = state->reqlen; in chcr_ahash_import()
2190 req_ctx->data_len = state->data_len; in chcr_ahash_import()
2191 req_ctx->reqbfr = req_ctx->bfr1; in chcr_ahash_import()
2192 req_ctx->skbfr = req_ctx->bfr2; in chcr_ahash_import()
2193 memcpy(req_ctx->bfr1, state->bfr1, CHCR_HASH_MAX_BLOCK_SIZE_128); in chcr_ahash_import()
2194 memcpy(req_ctx->partial_hash, state->partial_hash, in chcr_ahash_import()
2196 chcr_init_hctx_per_wr(req_ctx); in chcr_ahash_import()
2299 struct chcr_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in chcr_sha_init() local
2303 req_ctx->data_len = 0; in chcr_sha_init()
2304 req_ctx->reqlen = 0; in chcr_sha_init()
2305 req_ctx->reqbfr = req_ctx->bfr1; in chcr_sha_init()
2306 req_ctx->skbfr = req_ctx->bfr2; in chcr_sha_init()
2307 copy_hash_init_values(req_ctx->partial_hash, digestsize); in chcr_sha_init()
2321 struct chcr_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in chcr_hmac_init() local
2328 req_ctx->data_len = bs; in chcr_hmac_init()
2331 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
2334 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
2337 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
2809 struct chcr_ahash_req_ctx *req_ctx = ahash_request_ctx(req); in chcr_hash_dma_map() local
2818 req_ctx->hctx_wr.is_sg_map = 1; in chcr_hash_dma_map()
2825 struct chcr_ahash_req_ctx *req_ctx = ahash_request_ctx(req); in chcr_hash_dma_unmap() local
2832 req_ctx->hctx_wr.is_sg_map = 0; in chcr_hash_dma_unmap()