sec_sqe
struct sec_sqe sec_sqe;
struct sec_sqe *bd = resp;
struct sec_sqe *sec_sqe = &req->sec_sqe;
memset(sec_sqe, 0, sizeof(struct sec_sqe));
sec_sqe->type2.c_key_addr = cpu_to_le64(c_ctx->c_key_dma);
sec_sqe->type2.c_ivin_addr = cpu_to_le64(c_req->c_ivin_dma);
sec_sqe->type2.data_src_addr = cpu_to_le64(req->buf.in_dma);
sec_sqe->type2.data_dst_addr = cpu_to_le64(req->buf.out_dma);
sec_sqe->type2.data_src_addr = cpu_to_le64(req->in_dma);
sec_sqe->type2.data_dst_addr = cpu_to_le64(c_req->c_out_dma);
if (sec_sqe->type2.data_src_addr != sec_sqe->type2.data_dst_addr)
sec_sqe->type2.icvw_kmode |= cpu_to_le16(((u16)c_ctx->c_mode) <<
sec_sqe->type2.c_alg = c_ctx->c_alg;
sec_sqe->type2.icvw_kmode |= cpu_to_le16(((u16)c_ctx->c_key_len) <<
sec_sqe->type_cipher_auth = bd_type | cipher;
sec_sqe->sdm_addr_type |= da_type;
sec_sqe->sds_sa_type = (de | scene | sa_type);
sec_sqe->type2.clen_ivhlen |= cpu_to_le32(c_req->c_len);
struct sec_req *req, struct sec_sqe *sec_sqe)
sec_sqe->type2.icvw_kmode |= cpu_to_le16((u16)authsize);
sec_sqe->type2.a_key_addr = sec_sqe->type2.c_key_addr;
sec_sqe->type2.a_ivin_addr = cpu_to_le64(a_req->a_ivin_dma);
sec_sqe->type_cipher_auth |= SEC_NO_AUTH << SEC_AUTH_OFFSET;
sec_sqe->sds_sa_type &= SEC_CIPHER_AUTH;
sec_sqe->sds_sa_type |= SEC_AUTH_CIPHER;
sec_sqe->type2.alen_ivllen = cpu_to_le32(aq->assoclen);
sec_sqe->type2.auth_src_offset = cpu_to_le16(0x0);
sec_sqe->type2.cipher_src_offset = cpu_to_le16((u16)aq->assoclen);
sec_sqe->type2.mac_addr = cpu_to_le64(a_req->out_mac_dma);
struct sec_req *req, struct sec_sqe *sec_sqe)
sec_sqe->type2.a_key_addr = cpu_to_le64(ctx->a_key_dma);
sec_sqe->type2.mac_key_alg = cpu_to_le32(BYTES_TO_WORDS(authsize));
sec_sqe->type2.mac_key_alg |=
sec_sqe->type2.mac_key_alg |=
sec_sqe->type_cipher_auth |= SEC_AUTH_TYPE1 << SEC_AUTH_OFFSET;
sec_sqe->sds_sa_type &= SEC_CIPHER_AUTH;
sec_sqe->type_cipher_auth |= SEC_AUTH_TYPE2 << SEC_AUTH_OFFSET;
sec_sqe->sds_sa_type |= SEC_AUTH_CIPHER;
sec_sqe->type2.alen_ivllen = cpu_to_le32(c_req->c_len + aq->assoclen);
sec_sqe->type2.cipher_src_offset = cpu_to_le16((u16)aq->assoclen);
sec_sqe->type2.mac_addr = cpu_to_le64(a_req->out_mac_dma);
struct sec_sqe *sec_sqe = &req->sec_sqe;
sec_auth_bd_fill_xcm(auth_ctx, req->c_req.encrypt, req, sec_sqe);
sec_auth_bd_fill_ex(auth_ctx, req->c_req.encrypt, req, sec_sqe);
req->sec_sqe.type2.tag = cpu_to_le16((u16)qp_ctx->send_head);
ret = hisi_qp_send(qp_ctx->qp, &req->sec_sqe);
const struct sec_sqe *sqe = qp->msg[qp->qp_status.cq_head];
struct sec_req *req = container_of(sqe, struct sec_req, sec_sqe);