in the current UADK code. Due to the new support for aead stream mode,
a new msg_state state has been added. If the initial value is not
assigned, an error will occur in the block mode check.
As a result, the performance test cannot be executed.
Signed-off-by: Longfang Liu <liulongfang(a)huawei.com>
---
uadk_tool/benchmark/sec_uadk_benchmark.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/uadk_tool/benchmark/sec_uadk_benchmark.c b/uadk_tool/benchmark/sec_uadk_benchmark.c
index f1ae18b..2954719 100644
--- a/uadk_tool/benchmark/sec_uadk_benchmark.c
+++ b/uadk_tool/benchmark/sec_uadk_benchmark.c
@@ -1165,6 +1165,7 @@ static void *sec_uadk_aead_async(void *arg)
areq.mac_bytes = auth_size;
areq.assoc_bytes = SEC_AEAD_LEN;
areq.in_bytes = g_pktlen;
+ areq.msg_state = 0;
if (pdata->is_union)
areq.mac_bytes = 32;
if (areq.op_type) // decrypto
@@ -1396,6 +1397,7 @@ static void *sec_uadk_aead_sync(void *arg)
areq.assoc_bytes = SEC_AEAD_LEN;
areq.in_bytes = g_pktlen;
areq.mac_bytes = g_maclen;
+ areq.msg_state = 0;
if (areq.op_type) // decrypto
areq.out_bytes = g_pktlen + 16; // aadsize = 16;
else
--
2.33.0
In uadk v1, the library will alloc a ctx_buffer used for storing
stream information. On hisilicon platform, the hardware will output
some data to this buffer. So the ctx_buffer should be map to PA/IOVA.
But here the lz77_zstd forgot to unmap this buffer on error branch.
What's more, if the user use the wd_bmm ops, the unmap is a void
function.
Signed-off-by: Yang Shen <shenyang39(a)huawei.com>
---
v1/drv/hisi_zip_udrv.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/v1/drv/hisi_zip_udrv.c b/v1/drv/hisi_zip_udrv.c
index f820b7f..470acb9 100644
--- a/v1/drv/hisi_zip_udrv.c
+++ b/v1/drv/hisi_zip_udrv.c
@@ -512,6 +512,9 @@ static int fill_zip_addr_lz77_zstd(void *ssqe,
unmap_phy_seq:
drv_iova_unmap(q, zstd_out->literal, (void *)phy_lit, zstd_out->lit_sz);
unmap_phy_lit:
+ if (msg->stream_mode == WCRYPTO_COMP_STATEFUL)
+ drv_iova_unmap(q, msg->ctx_buf, (void *)addr.ctxbuf_addr - CTX_BUFFER_OFFSET,
+ MAX_CTX_RSV_SIZE);
drv_iova_unmap(q, msg->src, (void *)addr.source_addr, msg->in_size);
return -WD_ENOMEM;
}
--
2.33.0