Modify spelling errors related to digest stream mode.
Signed-off-by: Zhiqi Song songzhiqi1@huawei.com --- drv/hash_mb/hash_mb.c | 4 ++-- drv/hisi_sec.c | 8 ++++---- drv/isa_ce_sm3.c | 4 ++-- include/drv/wd_digest_drv.h | 6 +++--- v1/test/hisi_sec_test/test_hisi_sec.c | 4 ++-- v1/test/hisi_sec_test_sgl/test_hisi_sec_sgl.c | 4 ++-- wd_digest.c | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/drv/hash_mb/hash_mb.c b/drv/hash_mb/hash_mb.c index 0f27c11..4750062 100644 --- a/drv/hash_mb/hash_mb.c +++ b/drv/hash_mb/hash_mb.c @@ -406,7 +406,7 @@ static int hash_do_partial(struct hash_mb_poll_queue *poll_queue, int ret = WD_SUCCESS;
switch (bd_type) { - case HASH_FRIST_BLOCK: + case HASH_FIRST_BLOCK: ret = hash_first_block_process(d_msg, job, poll_queue->ops->iv_bytes); break; case HASH_MIDDLE_BLOCK: @@ -434,7 +434,7 @@ static void hash_mb_init_iv(struct hash_mb_poll_queue *poll_queue,
job->opad.opad_size = 0; switch (bd_type) { - case HASH_FRIST_BLOCK: + case HASH_FIRST_BLOCK: memcpy(job->result_digest, poll_queue->ops->iv_data, poll_queue->ops->iv_bytes); if (d_msg->mode != WD_DIGEST_HMAC) return; diff --git a/drv/hisi_sec.c b/drv/hisi_sec.c index 2eaac51..e66fb00 100644 --- a/drv/hisi_sec.c +++ b/drv/hisi_sec.c @@ -1536,7 +1536,7 @@ static int fill_digest_long_hash(handle_t h_qp, struct wd_digest_msg *msg, if (ret) return ret;
- if (block_type == HASH_FRIST_BLOCK) { + if (block_type == HASH_FIRST_BLOCK) { /* Long hash first */ sqe->ai_apd_cs = AI_GEN_INNER; sqe->ai_apd_cs |= AUTHPAD_NOPAD << AUTHPAD_OFFSET; @@ -1618,7 +1618,7 @@ static int digest_bd2_type_check(struct wd_digest_msg *msg) enum hash_block_type type = get_hash_block_type(msg);
/* Long hash first and middle bd */ - if (type == HASH_FRIST_BLOCK || type == HASH_MIDDLE_BLOCK) { + if (type == HASH_FIRST_BLOCK || type == HASH_MIDDLE_BLOCK) { WD_ERR("hardware v2 not supports 0 size in long hash!\n"); return -WD_EINVAL; } @@ -1636,7 +1636,7 @@ static int digest_bd3_type_check(struct wd_digest_msg *msg) { enum hash_block_type type = get_hash_block_type(msg); /* Long hash first and middle bd */ - if (type == HASH_FRIST_BLOCK || type == HASH_MIDDLE_BLOCK) { + if (type == HASH_FIRST_BLOCK || type == HASH_MIDDLE_BLOCK) { WD_ERR("invalid: hardware v3 not supports 0 size in long hash!\n"); return -WD_EINVAL; } @@ -1889,7 +1889,7 @@ static int fill_digest_long_hash3(handle_t h_qp, struct wd_digest_msg *msg, if (ret) return ret;
- if (block_type == HASH_FRIST_BLOCK) { + if (block_type == HASH_FIRST_BLOCK) { /* Long hash first */ sqe->auth_mac_key |= AI_GEN_INNER << SEC_AI_GEN_OFFSET_V3; sqe->stream_scene.stream_auth_pad = AUTHPAD_NOPAD; diff --git a/drv/isa_ce_sm3.c b/drv/isa_ce_sm3.c index 2789a08..5fc7acc 100644 --- a/drv/isa_ce_sm3.c +++ b/drv/isa_ce_sm3.c @@ -188,7 +188,7 @@ static int do_sm3_ce(struct wd_digest_msg *msg, __u8 *out_digest) sm3_ce_update(&sctx, data, data_len, sm3_ce_block_compress); sm3_ce_final(&sctx, out_digest, sm3_ce_block_compress); break; - case HASH_FRIST_BLOCK: + case HASH_FIRST_BLOCK: sm3_ce_init(&sctx); sm3_ce_update(&sctx, data, data_len, sm3_ce_block_compress); trans_output_result(out_digest, sctx.word_reg); @@ -306,7 +306,7 @@ static int do_hmac_sm3_ce(struct wd_digest_msg *msg, __u8 *out_hmac) sm3_ce_hmac_update(&hctx, data, data_len); sm3_ce_hmac_final(&hctx, out_hmac); break; - case HASH_FRIST_BLOCK: + case HASH_FIRST_BLOCK: sm3_ce_hmac_init(&hctx, key, key_len); sm3_ce_hmac_update(&hctx, data, data_len); trans_output_result(out_hmac, hctx.sctx.word_reg); diff --git a/include/drv/wd_digest_drv.h b/include/drv/wd_digest_drv.h index 7d86b65..5e3e821 100644 --- a/include/drv/wd_digest_drv.h +++ b/include/drv/wd_digest_drv.h @@ -12,7 +12,7 @@ extern "C" { #endif
enum hash_block_type { - HASH_FRIST_BLOCK, + HASH_FIRST_BLOCK, HASH_MIDDLE_BLOCK, HASH_END_BLOCK, HASH_SINGLE_BLOCK, @@ -66,13 +66,13 @@ static inline enum hash_block_type get_hash_block_type(struct wd_digest_msg *msg { /* * [has_next , iv_bytes] - * [ 1 , 0 ] = long hash(frist bd) + * [ 1 , 0 ] = long hash(first bd) * [ 1 , 1 ] = long hash(middle bd) * [ 0 , 1 ] = long hash(end bd) * [ 0 , 0 ] = block hash(single bd) */ if (msg->has_next && !msg->iv_bytes) - return HASH_FRIST_BLOCK; + return HASH_FIRST_BLOCK; else if (msg->has_next && msg->iv_bytes) return HASH_MIDDLE_BLOCK; else if (!msg->has_next && msg->iv_bytes) diff --git a/v1/test/hisi_sec_test/test_hisi_sec.c b/v1/test/hisi_sec_test/test_hisi_sec.c index be4ee9d..05c91ad 100644 --- a/v1/test/hisi_sec_test/test_hisi_sec.c +++ b/v1/test/hisi_sec_test/test_hisi_sec.c @@ -1463,7 +1463,7 @@ static int sec_cipher_async_test(int thread_num, __u64 lcore_mask, SEC_TST_PRT("%s(): create pool fail!\n", __func__); return -ENOMEM; } - /* frist create the async poll thread! */ + /* first create the async poll thread! */ test_thrds_data[0].pool = pool; test_thrds_data[0].q = &q; test_thrds_data[0].thread_num = 1; @@ -2070,7 +2070,7 @@ static int sec_aead_async_test(int thd_num, __u64 lcore_mask, SEC_TST_PRT("%s(): create pool fail!\n", __func__); return -ENOMEM; } - /* frist create the async poll thread! */ + /* first create the async poll thread! */ test_thrds_data[0].pool = pool; test_thrds_data[0].q = &q; test_thrds_data[0].thread_num = 1; diff --git a/v1/test/hisi_sec_test_sgl/test_hisi_sec_sgl.c b/v1/test/hisi_sec_test_sgl/test_hisi_sec_sgl.c index b7513d1..ba5cdfa 100644 --- a/v1/test/hisi_sec_test_sgl/test_hisi_sec_sgl.c +++ b/v1/test/hisi_sec_test_sgl/test_hisi_sec_sgl.c @@ -1733,7 +1733,7 @@ static int sec_cipher_async_test(int thread_num, __u64 lcore_mask, SEC_TST_PRT("%s(): create pool fail!\n", __func__); return -ENOMEM; } - /* frist create the async poll thread! */ + /* first create the async poll thread! */ test_thrds_data[0].pool = pool; test_thrds_data[0].q = &q; test_thrds_data[0].thread_num = 1; @@ -2640,7 +2640,7 @@ static int sec_aead_async_test(int thd_num, __u64 lcore_mask, return -ENOMEM; }
- /* frist create the async poll thread! */ + /* first create the async poll thread! */ test_thrds_data[0].pool = pool; test_thrds_data[0].q = &q; test_thrds_data[0].thread_num = 1; diff --git a/wd_digest.c b/wd_digest.c index dfe709b..4832de8 100644 --- a/wd_digest.c +++ b/wd_digest.c @@ -55,7 +55,7 @@ struct wd_digest_stream_data { /* Total data length for stream mode */ __u64 long_data_len; /* - * Notify the stream message state, zero is frist message, + * Notify the stream message state, zero is first message, * non-zero is middle or final message. */ int msg_state;