Lines Matching refs:req_info

146 	struct otx_cpt_req_info *req_info;  in output_iv_copyback()  local
159 req_info = &rctx->cpt_req; in output_iv_copyback()
163 if (req_info->is_enc) { in output_iv_copyback()
171 memcpy(sreq->iv, req_info->iv_out, ivsize); in output_iv_copyback()
172 kfree(req_info->iv_out); in output_iv_copyback()
195 static inline void update_input_data(struct otx_cpt_req_info *req_info, in update_input_data() argument
199 req_info->req.dlen += nbytes; in update_input_data()
205 req_info->in[*argcnt].vptr = (void *)ptr; in update_input_data()
206 req_info->in[*argcnt].size = len; in update_input_data()
213 static inline void update_output_data(struct otx_cpt_req_info *req_info, in update_output_data() argument
217 req_info->rlen += nbytes; in update_output_data()
223 req_info->out[*argcnt].vptr = (void *) (ptr + offset); in update_output_data()
224 req_info->out[*argcnt].size = len; in update_output_data()
237 struct otx_cpt_req_info *req_info = &rctx->cpt_req; in create_ctx_hdr() local
247 req_info->ctrl.s.dma_mode = OTX_CPT_DMA_GATHER_SCATTER; in create_ctx_hdr()
248 req_info->ctrl.s.se_req = OTX_CPT_SE_CORE_REQ; in create_ctx_hdr()
250 req_info->req.opcode.s.major = OTX_CPT_MAJOR_OP_FC | in create_ctx_hdr()
253 req_info->req.opcode.s.minor = 2; in create_ctx_hdr()
255 req_info->req.opcode.s.minor = 3; in create_ctx_hdr()
259 req_info->iv_out = kmalloc(ivsize, flags); in create_ctx_hdr()
260 if (!req_info->iv_out) in create_ctx_hdr()
263 scatterwalk_map_and_copy(req_info->iv_out, req->src, in create_ctx_hdr()
268 req_info->req.param1 = req->cryptlen; in create_ctx_hdr()
270 req_info->req.param2 = 0; in create_ctx_hdr()
289 req_info->in[*argcnt].vptr = (u8 *)&rctx->ctrl_word; in create_ctx_hdr()
290 req_info->in[*argcnt].size = CONTROL_WORD_LEN; in create_ctx_hdr()
291 req_info->req.dlen += CONTROL_WORD_LEN; in create_ctx_hdr()
294 req_info->in[*argcnt].vptr = (u8 *)fctx; in create_ctx_hdr()
295 req_info->in[*argcnt].size = sizeof(struct otx_cpt_fc_ctx); in create_ctx_hdr()
296 req_info->req.dlen += sizeof(struct otx_cpt_fc_ctx); in create_ctx_hdr()
307 struct otx_cpt_req_info *req_info = &rctx->cpt_req; in create_input_list() local
315 update_input_data(req_info, req->src, req->cryptlen, &argcnt); in create_input_list()
316 req_info->incnt = argcnt; in create_input_list()
325 struct otx_cpt_req_info *req_info = &rctx->cpt_req; in create_output_list() local
336 update_output_data(req_info, req->dst, 0, req->cryptlen, &argcnt); in create_output_list()
337 req_info->outcnt = argcnt; in create_output_list()
344 struct otx_cpt_req_info *req_info = &rctx->cpt_req; in cpt_enc_dec() local
366 req_info->callback = (void *)otx_cpt_skcipher_callback; in cpt_enc_dec()
367 req_info->areq = &req->base; in cpt_enc_dec()
368 req_info->req_type = OTX_CPT_ENC_DEC_REQ; in cpt_enc_dec()
369 req_info->is_enc = enc; in cpt_enc_dec()
370 req_info->is_trunc_hmac = false; in cpt_enc_dec()
371 req_info->ctrl.s.grp = 0; in cpt_enc_dec()
378 status = otx_cpt_do_request(pdev, req_info, cpu_num); in cpt_enc_dec()
972 struct otx_cpt_req_info *req_info = &rctx->cpt_req; in create_aead_ctx_hdr() local
1014 req_info->ctrl.s.dma_mode = OTX_CPT_DMA_GATHER_SCATTER; in create_aead_ctx_hdr()
1015 req_info->ctrl.s.se_req = OTX_CPT_SE_CORE_REQ; in create_aead_ctx_hdr()
1016 req_info->req.opcode.s.major = OTX_CPT_MAJOR_OP_FC | in create_aead_ctx_hdr()
1019 req_info->req.opcode.s.minor = 2; in create_aead_ctx_hdr()
1020 req_info->req.param1 = req->cryptlen; in create_aead_ctx_hdr()
1021 req_info->req.param2 = req->cryptlen + req->assoclen; in create_aead_ctx_hdr()
1023 req_info->req.opcode.s.minor = 3; in create_aead_ctx_hdr()
1024 req_info->req.param1 = req->cryptlen - mac_len; in create_aead_ctx_hdr()
1025 req_info->req.param2 = req->cryptlen + req->assoclen - mac_len; in create_aead_ctx_hdr()
1038 req_info->in[*argcnt].vptr = (u8 *)&rctx->ctrl_word; in create_aead_ctx_hdr()
1039 req_info->in[*argcnt].size = CONTROL_WORD_LEN; in create_aead_ctx_hdr()
1040 req_info->req.dlen += CONTROL_WORD_LEN; in create_aead_ctx_hdr()
1043 req_info->in[*argcnt].vptr = (u8 *)fctx; in create_aead_ctx_hdr()
1044 req_info->in[*argcnt].size = sizeof(struct otx_cpt_fc_ctx); in create_aead_ctx_hdr()
1045 req_info->req.dlen += sizeof(struct otx_cpt_fc_ctx); in create_aead_ctx_hdr()
1057 struct otx_cpt_req_info *req_info = &rctx->cpt_req; in create_hmac_ctx_hdr() local
1059 req_info->ctrl.s.dma_mode = OTX_CPT_DMA_GATHER_SCATTER; in create_hmac_ctx_hdr()
1060 req_info->ctrl.s.se_req = OTX_CPT_SE_CORE_REQ; in create_hmac_ctx_hdr()
1061 req_info->req.opcode.s.major = OTX_CPT_MAJOR_OP_HMAC | in create_hmac_ctx_hdr()
1063 req_info->is_trunc_hmac = ctx->is_trunc_hmac; in create_hmac_ctx_hdr()
1065 req_info->req.opcode.s.minor = 0; in create_hmac_ctx_hdr()
1066 req_info->req.param1 = ctx->auth_key_len; in create_hmac_ctx_hdr()
1067 req_info->req.param2 = ctx->mac_type << 8; in create_hmac_ctx_hdr()
1070 req_info->in[*argcnt].vptr = ctx->key; in create_hmac_ctx_hdr()
1071 req_info->in[*argcnt].size = round_up(ctx->auth_key_len, 8); in create_hmac_ctx_hdr()
1072 req_info->req.dlen += round_up(ctx->auth_key_len, 8); in create_hmac_ctx_hdr()
1081 struct otx_cpt_req_info *req_info = &rctx->cpt_req; in create_aead_input_list() local
1088 update_input_data(req_info, req->src, inputlen, &argcnt); in create_aead_input_list()
1089 req_info->incnt = argcnt; in create_aead_input_list()
1098 struct otx_cpt_req_info *req_info = &rctx->cpt_req; in create_aead_output_list() local
1106 update_output_data(req_info, req->dst, 0, outputlen, &argcnt); in create_aead_output_list()
1107 req_info->outcnt = argcnt; in create_aead_output_list()
1116 struct otx_cpt_req_info *req_info = &rctx->cpt_req; in create_aead_null_input_list() local
1125 update_input_data(req_info, req->src, inputlen, &argcnt); in create_aead_null_input_list()
1126 req_info->incnt = argcnt; in create_aead_null_input_list()
1135 struct otx_cpt_req_info *req_info = &rctx->cpt_req; in create_aead_null_output_list() local
1152 ptr = kmalloc(inputlen, (req_info->areq->flags & in create_aead_null_output_list()
1191 update_output_data(req_info, dst, offset, mac_len, &argcnt); in create_aead_null_output_list()
1205 req_info->out[argcnt].vptr = rctx->fctx.hmac.s.hmac_calc; in create_aead_null_output_list()
1206 req_info->out[argcnt].size = mac_len; in create_aead_null_output_list()
1210 req_info->outcnt = argcnt; in create_aead_null_output_list()
1222 struct otx_cpt_req_info *req_info = &rctx->cpt_req; in cpt_aead_enc_dec() local
1231 req_info->callback = otx_cpt_aead_callback; in cpt_aead_enc_dec()
1232 req_info->areq = &req->base; in cpt_aead_enc_dec()
1233 req_info->req_type = reg_type; in cpt_aead_enc_dec()
1234 req_info->is_enc = enc; in cpt_aead_enc_dec()
1235 req_info->is_trunc_hmac = false; in cpt_aead_enc_dec()
1264 if (req_info->req.param1 > OTX_CPT_MAX_REQ_SIZE || in cpt_aead_enc_dec()
1265 req_info->req.param2 > OTX_CPT_MAX_REQ_SIZE) in cpt_aead_enc_dec()
1272 req_info->ctrl.s.grp = 0; in cpt_aead_enc_dec()
1274 status = otx_cpt_do_request(pdev, req_info, cpu_num); in cpt_aead_enc_dec()