From: wangyuan wangyuan46@huawei.com
Description: This patch includes following changes: 1.in hisi_zip_udrv.c add sqe_fill/parse_priv for V3 api
Signed-off-by: Yu'an Wang wangyuan46@huawei.com --- v1/drv/hisi_zip_udrv.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/v1/drv/hisi_zip_udrv.c b/v1/drv/hisi_zip_udrv.c index 1dec4d6..f820b7f 100644 --- a/v1/drv/hisi_zip_udrv.c +++ b/v1/drv/hisi_zip_udrv.c @@ -256,6 +256,7 @@ int qm_parse_zip_sqe(void *hw_msg, const struct qm_queue_info *info, __u16 i, __u16 usr) { struct wcrypto_comp_msg *recv_msg = info->req_cache[i]; + struct wcrypto_comp_tag *tag = (void *)(uintptr_t)recv_msg->udata; struct hisi_zip_sqe *sqe = hw_msg; __u16 ctx_st = sqe->ctx_dw0 & HZ_CTX_ST_MASK; __u16 lstblk = sqe->dw3 & HZ_LSTBLK_MASK; @@ -301,6 +302,9 @@ int qm_parse_zip_sqe(void *hw_msg, const struct qm_queue_info *info, MAX_CTX_RSV_SIZE); }
+ if (tag && info->sqe_parse_priv) + info->sqe_parse_priv(sqe, WCRYPTO_COMP, tag->priv); + qm_parse_zip_sqe_set_status(recv_msg, status, lstblk, ctx_st);
return 1; @@ -580,6 +584,7 @@ int qm_fill_zip_sqe_v3(void *smsg, struct qm_queue_info *info, __u16 i) { struct hisi_zip_sqe_v3 *sqe = (struct hisi_zip_sqe_v3 *)info->sq_base + i; struct wcrypto_comp_msg *msg = smsg; + struct wcrypto_comp_tag *tag = (void *)(uintptr_t)msg->udata; struct wd_queue *q = info->q; __u8 flush_type; __u8 data_fmt; @@ -628,6 +633,9 @@ int qm_fill_zip_sqe_v3(void *smsg, struct qm_queue_info *info, __u16 i) ops[msg->alg_type].fill_sqe_hw_info(sqe, msg); sqe->tag_l = msg->tag;
+ if (tag && info->sqe_fill_priv) + info->sqe_fill_priv(sqe, WCRYPTO_COMP, tag->priv); + info->req_cache[i] = msg;
return WD_SUCCESS; @@ -728,6 +736,9 @@ int qm_parse_zip_sqe_v3(void *hw_msg, const struct qm_queue_info *info, if (tag && tag->priv && !info->sqe_fill_priv) fill_priv_lz77_zstd(sqe, recv_msg);
+ if (tag && info->sqe_parse_priv) + info->sqe_parse_priv(sqe, WCRYPTO_COMP, tag->priv); + return 1; }