From: Wenkai Lin <linwenkai6@hisilicon.com> Initialize the algorithm names supported by each module. During subsequent initialization, this will be used to determine whether the algorithm executed by the user is supported. Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> --- wd_aead.c | 1 + wd_agg.c | 1 + wd_cipher.c | 1 + wd_comp.c | 1 + wd_dh.c | 1 + wd_digest.c | 1 + wd_ecc.c | 1 + wd_join_gather.c | 1 + wd_rsa.c | 1 + wd_udma.c | 1 + 10 files changed, 10 insertions(+) diff --git a/wd_aead.c b/wd_aead.c index b10890f..373b6fe 100644 --- a/wd_aead.c +++ b/wd_aead.c @@ -446,6 +446,7 @@ static int wd_aead_init_nolock(struct wd_ctx_config *config, struct wd_sched *sc if (ret < 0) return ret; + wd_aead_setting.config.alg_name = "aead"; ret = wd_init_ctx_config(&wd_aead_setting.config, config); if (ret) return ret; diff --git a/wd_agg.c b/wd_agg.c index 85fb7f6..8c54d10 100644 --- a/wd_agg.c +++ b/wd_agg.c @@ -580,6 +580,7 @@ static int wd_agg_alg_init(struct wd_ctx_config *config, struct wd_sched *sched) if (ret < 0) return ret; + wd_agg_setting.config.alg_name = "hashagg"; ret = wd_init_ctx_config(&wd_agg_setting.config, config); if (ret < 0) return ret; diff --git a/wd_cipher.c b/wd_cipher.c index ef54dc8..92ca07b 100644 --- a/wd_cipher.c +++ b/wd_cipher.c @@ -328,6 +328,7 @@ static int wd_cipher_common_init(struct wd_ctx_config *config, if (ret < 0) return ret; + wd_cipher_setting.config.alg_name = "cipher"; ret = wd_init_ctx_config(&wd_cipher_setting.config, config); if (ret < 0) return ret; diff --git a/wd_comp.c b/wd_comp.c index ac0470f..435f5a8 100644 --- a/wd_comp.c +++ b/wd_comp.c @@ -154,6 +154,7 @@ static int wd_comp_init_nolock(struct wd_ctx_config *config, struct wd_sched *sc if (ret < 0) return ret; + wd_comp_setting.config.alg_name = "zlib gzip deflate lz77_zstd lz4 lz77_only"; ret = wd_init_ctx_config(&wd_comp_setting.config, config); if (ret < 0) return ret; diff --git a/wd_dh.c b/wd_dh.c index 2c88ce2..221322f 100644 --- a/wd_dh.c +++ b/wd_dh.c @@ -125,6 +125,7 @@ static int wd_dh_common_init(struct wd_ctx_config *config, struct wd_sched *sche if (ret < 0) return ret; + wd_dh_setting.config.alg_name = "dh"; ret = wd_init_ctx_config(&wd_dh_setting.config, config); if (ret) return ret; diff --git a/wd_digest.c b/wd_digest.c index cb0a111..2d31176 100644 --- a/wd_digest.c +++ b/wd_digest.c @@ -260,6 +260,7 @@ static int wd_digest_init_nolock(struct wd_ctx_config *config, if (ret < 0) return ret; + wd_digest_setting.config.alg_name = "digest"; ret = wd_init_ctx_config(&wd_digest_setting.config, config); if (ret < 0) return ret; diff --git a/wd_ecc.c b/wd_ecc.c index 2a1228d..b1971b9 100644 --- a/wd_ecc.c +++ b/wd_ecc.c @@ -192,6 +192,7 @@ static int wd_ecc_common_init(struct wd_ctx_config *config, struct wd_sched *sch if (ret < 0) return ret; + wd_ecc_setting.config.alg_name = "sm2 x448 x25519 ecdsa ecdh"; ret = wd_init_ctx_config(&wd_ecc_setting.config, config); if (ret < 0) return ret; diff --git a/wd_join_gather.c b/wd_join_gather.c index a845e03..915c1b8 100644 --- a/wd_join_gather.c +++ b/wd_join_gather.c @@ -684,6 +684,7 @@ static int wd_join_gather_alg_init(struct wd_ctx_config *config, struct wd_sched if (ret < 0) return ret; + wd_join_gather_setting.config.alg_name = "hashjoin gather"; ret = wd_init_ctx_config(&wd_join_gather_setting.config, config); if (ret < 0) return ret; diff --git a/wd_rsa.c b/wd_rsa.c index 4cb72fc..cf9239c 100644 --- a/wd_rsa.c +++ b/wd_rsa.c @@ -166,6 +166,7 @@ static int wd_rsa_common_init(struct wd_ctx_config *config, struct wd_sched *sch if (ret < 0) return ret; + wd_rsa_setting.config.alg_name = "rsa"; ret = wd_init_ctx_config(&wd_rsa_setting.config, config); if (ret < 0) return ret; diff --git a/wd_udma.c b/wd_udma.c index 5f47291..eebe495 100644 --- a/wd_udma.c +++ b/wd_udma.c @@ -390,6 +390,7 @@ static int wd_udma_alg_init(struct wd_ctx_config *config, struct wd_sched *sched if (ret < 0) return ret; + wd_udma_setting.config.alg_name = "udma"; ret = wd_init_ctx_config(&wd_udma_setting.config, config); if (ret < 0) return ret; -- 2.33.0