Lines Matching refs:req_info

128 	struct otx2_cpt_req_info *req_info;  in output_iv_copyback()  local
141 req_info = &rctx->cpt_req; in output_iv_copyback()
145 if (req_info->is_enc) { in output_iv_copyback()
153 memcpy(sreq->iv, req_info->iv_out, ivsize); in output_iv_copyback()
154 kfree(req_info->iv_out); in output_iv_copyback()
177 static inline void update_input_data(struct otx2_cpt_req_info *req_info, in update_input_data() argument
181 req_info->req.dlen += nbytes; in update_input_data()
187 req_info->in[*argcnt].vptr = (void *)ptr; in update_input_data()
188 req_info->in[*argcnt].size = len; in update_input_data()
195 static inline void update_output_data(struct otx2_cpt_req_info *req_info, in update_output_data() argument
202 req_info->rlen += nbytes; in update_output_data()
209 req_info->out[*argcnt].vptr = (void *) (ptr + offset); in update_output_data()
210 req_info->out[*argcnt].size = len; in update_output_data()
224 struct otx2_cpt_req_info *req_info = &rctx->cpt_req; in create_ctx_hdr() local
232 req_info->ctrl.s.dma_mode = OTX2_CPT_DMA_MODE_SG; in create_ctx_hdr()
233 req_info->ctrl.s.se_req = 1; in create_ctx_hdr()
235 req_info->req.opcode.s.major = OTX2_CPT_MAJOR_OP_FC | in create_ctx_hdr()
238 req_info->req.opcode.s.minor = 2; in create_ctx_hdr()
240 req_info->req.opcode.s.minor = 3; in create_ctx_hdr()
244 req_info->iv_out = kmalloc(ivsize, flags); in create_ctx_hdr()
245 if (!req_info->iv_out) in create_ctx_hdr()
248 scatterwalk_map_and_copy(req_info->iv_out, req->src, in create_ctx_hdr()
253 req_info->req.param1 = req->cryptlen; in create_ctx_hdr()
255 req_info->req.param2 = 0; in create_ctx_hdr()
274 req_info->in[*argcnt].vptr = (u8 *)&rctx->ctrl_word; in create_ctx_hdr()
275 req_info->in[*argcnt].size = CONTROL_WORD_LEN; in create_ctx_hdr()
276 req_info->req.dlen += CONTROL_WORD_LEN; in create_ctx_hdr()
279 req_info->in[*argcnt].vptr = (u8 *)fctx; in create_ctx_hdr()
280 req_info->in[*argcnt].size = sizeof(struct otx2_cpt_fc_ctx); in create_ctx_hdr()
281 req_info->req.dlen += sizeof(struct otx2_cpt_fc_ctx); in create_ctx_hdr()
292 struct otx2_cpt_req_info *req_info = &rctx->cpt_req; in create_input_list() local
300 update_input_data(req_info, req->src, req->cryptlen, &argcnt); in create_input_list()
301 req_info->in_cnt = argcnt; in create_input_list()
310 struct otx2_cpt_req_info *req_info = &rctx->cpt_req; in create_output_list() local
321 update_output_data(req_info, req->dst, 0, req->cryptlen, &argcnt); in create_output_list()
322 req_info->out_cnt = argcnt; in create_output_list()
353 struct otx2_cpt_req_info *req_info = &rctx->cpt_req; in cpt_enc_dec() local
380 req_info->callback = otx2_cpt_skcipher_callback; in cpt_enc_dec()
381 req_info->areq = &req->base; in cpt_enc_dec()
382 req_info->req_type = OTX2_CPT_ENC_DEC_REQ; in cpt_enc_dec()
383 req_info->is_enc = enc; in cpt_enc_dec()
384 req_info->is_trunc_hmac = false; in cpt_enc_dec()
385 req_info->ctrl.s.grp = otx2_cpt_get_kcrypto_eng_grp_num(pdev); in cpt_enc_dec()
392 status = otx2_cpt_do_request(pdev, req_info, cpu_num); in cpt_enc_dec()
1018 struct otx2_cpt_req_info *req_info = &rctx->cpt_req; in create_aead_ctx_hdr() local
1066 req_info->ctrl.s.dma_mode = OTX2_CPT_DMA_MODE_SG; in create_aead_ctx_hdr()
1067 req_info->ctrl.s.se_req = 1; in create_aead_ctx_hdr()
1068 req_info->req.opcode.s.major = OTX2_CPT_MAJOR_OP_FC | in create_aead_ctx_hdr()
1071 req_info->req.opcode.s.minor = 2; in create_aead_ctx_hdr()
1072 req_info->req.param1 = req->cryptlen; in create_aead_ctx_hdr()
1073 req_info->req.param2 = req->cryptlen + req->assoclen; in create_aead_ctx_hdr()
1075 req_info->req.opcode.s.minor = 3; in create_aead_ctx_hdr()
1076 req_info->req.param1 = req->cryptlen - mac_len; in create_aead_ctx_hdr()
1077 req_info->req.param2 = req->cryptlen + req->assoclen - mac_len; in create_aead_ctx_hdr()
1090 req_info->in[*argcnt].vptr = (u8 *)&rctx->ctrl_word; in create_aead_ctx_hdr()
1091 req_info->in[*argcnt].size = CONTROL_WORD_LEN; in create_aead_ctx_hdr()
1092 req_info->req.dlen += CONTROL_WORD_LEN; in create_aead_ctx_hdr()
1095 req_info->in[*argcnt].vptr = (u8 *)fctx; in create_aead_ctx_hdr()
1096 req_info->in[*argcnt].size = sizeof(struct otx2_cpt_fc_ctx); in create_aead_ctx_hdr()
1097 req_info->req.dlen += sizeof(struct otx2_cpt_fc_ctx); in create_aead_ctx_hdr()
1109 struct otx2_cpt_req_info *req_info = &rctx->cpt_req; in create_hmac_ctx_hdr() local
1111 req_info->ctrl.s.dma_mode = OTX2_CPT_DMA_MODE_SG; in create_hmac_ctx_hdr()
1112 req_info->ctrl.s.se_req = 1; in create_hmac_ctx_hdr()
1113 req_info->req.opcode.s.major = OTX2_CPT_MAJOR_OP_HMAC | in create_hmac_ctx_hdr()
1115 req_info->is_trunc_hmac = ctx->is_trunc_hmac; in create_hmac_ctx_hdr()
1117 req_info->req.opcode.s.minor = 0; in create_hmac_ctx_hdr()
1118 req_info->req.param1 = ctx->auth_key_len; in create_hmac_ctx_hdr()
1119 req_info->req.param2 = ctx->mac_type << 8; in create_hmac_ctx_hdr()
1122 req_info->in[*argcnt].vptr = ctx->key; in create_hmac_ctx_hdr()
1123 req_info->in[*argcnt].size = round_up(ctx->auth_key_len, 8); in create_hmac_ctx_hdr()
1124 req_info->req.dlen += round_up(ctx->auth_key_len, 8); in create_hmac_ctx_hdr()
1131 struct otx2_cpt_req_info *req_info = &rctx->cpt_req; in create_aead_input_list() local
1138 update_input_data(req_info, req->src, inputlen, &argcnt); in create_aead_input_list()
1139 req_info->in_cnt = argcnt; in create_aead_input_list()
1148 struct otx2_cpt_req_info *req_info = &rctx->cpt_req; in create_aead_output_list() local
1156 update_output_data(req_info, req->dst, 0, outputlen, &argcnt); in create_aead_output_list()
1157 req_info->out_cnt = argcnt; in create_aead_output_list()
1164 struct otx2_cpt_req_info *req_info = &rctx->cpt_req; in create_aead_null_input_list() local
1173 update_input_data(req_info, req->src, inputlen, &argcnt); in create_aead_null_input_list()
1174 req_info->in_cnt = argcnt; in create_aead_null_input_list()
1181 struct otx2_cpt_req_info *req_info = &rctx->cpt_req; in create_aead_null_output_list() local
1198 ptr = kmalloc(inputlen, (req_info->areq->flags & in create_aead_null_output_list()
1233 update_output_data(req_info, dst, offset, mac_len, &argcnt); in create_aead_null_output_list()
1245 req_info->out[argcnt].vptr = rctx->fctx.hmac.s.hmac_calc; in create_aead_null_output_list()
1246 req_info->out[argcnt].size = mac_len; in create_aead_null_output_list()
1250 req_info->out_cnt = argcnt; in create_aead_null_output_list()
1285 struct otx2_cpt_req_info *req_info = &rctx->cpt_req; in cpt_aead_enc_dec() local
1295 req_info->callback = otx2_cpt_aead_callback; in cpt_aead_enc_dec()
1296 req_info->areq = &req->base; in cpt_aead_enc_dec()
1297 req_info->req_type = reg_type; in cpt_aead_enc_dec()
1298 req_info->is_enc = enc; in cpt_aead_enc_dec()
1299 req_info->is_trunc_hmac = false; in cpt_aead_enc_dec()
1321 if (!IS_ALIGNED(req_info->req.param1, ctx->enc_align_len)) in cpt_aead_enc_dec()
1324 if (!req_info->req.param2 || in cpt_aead_enc_dec()
1325 (req_info->req.param1 > OTX2_CPT_MAX_REQ_SIZE) || in cpt_aead_enc_dec()
1326 (req_info->req.param2 > OTX2_CPT_MAX_REQ_SIZE)) in cpt_aead_enc_dec()
1333 req_info->ctrl.s.grp = otx2_cpt_get_kcrypto_eng_grp_num(pdev); in cpt_aead_enc_dec()
1340 return otx2_cpt_do_request(pdev, req_info, cpu_num); in cpt_aead_enc_dec()