Update uadk tool according to heterogeneous scheduling solution
Signed-off-by: Longfang Liu liulongfang@huawei.com --- test/Makefile.am | 11 +- uadk_tool/Makefile.am | 20 +- uadk_tool/benchmark/sec_uadk_benchmark.c | 527 +---------------------- uadk_tool/benchmark/uadk_benchmark.c | 22 +- uadk_tool/uadk_tool.c | 2 +- 5 files changed, 26 insertions(+), 556 deletions(-)
diff --git a/test/Makefile.am b/test/Makefile.am index 630613b1..f372a899 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,8 +1,7 @@ AM_CFLAGS=-Wall -O0 -Werror -fno-strict-aliasing -I$(top_srcdir)/include -I$(top_srcdir)
-bin_PROGRAMS=wd_mempool_test wd_dae_test +bin_PROGRAMS=wd_mempool_test wd_mempool_test_SOURCES=wd_mempool_test.c -wd_dae_test_SOURCES=wd_dae_test.c
if WD_STATIC_DRV AM_CFLAGS+=-Bstatic @@ -13,12 +12,4 @@ wd_mempool_test_LDADD=-L../.libs -lwd -lwd_crypto -lnuma -lpthread endif wd_mempool_test_LDFLAGS=-Wl,-rpath,'/usr/local/lib'
-if WD_STATIC_DRV -wd_dae_test_LDADD=../.libs/libwd.a ../.libs/libwd_dae.a \ - ../.libs/libhisi_dae.a -lnuma -lpthread -lm -else -wd_dae_test_LDADD=-L../.libs -lwd -lwd_dae -lnuma -lpthread -endif -wd_dae_test_LDFLAGS=-Wl,-rpath,'/usr/local/lib' - SUBDIRS=. hisi_hpre_test diff --git a/uadk_tool/Makefile.am b/uadk_tool/Makefile.am index d375a752..1ffd875d 100644 --- a/uadk_tool/Makefile.am +++ b/uadk_tool/Makefile.am @@ -12,14 +12,14 @@ bin_PROGRAMS=uadk_tool uadk_tool_SOURCES=uadk_tool.c dfx/uadk_dfx.c dfx/uadk_dfx.h \ benchmark/uadk_benchmark.c benchmark/uadk_benchmark.h \ benchmark/sec_uadk_benchmark.c benchmark/sec_uadk_benchmark.h \ - benchmark/sec_wd_benchmark.c benchmark/sec_wd_benchmark.h \ - benchmark/hpre_uadk_benchmark.c benchmark/hpre_uadk_benchmark.h \ - benchmark/hpre_wd_benchmark.c hpre_wd_benchmark.h \ - benchmark/zip_uadk_benchmark.c benchmark/zip_uadk_benchmark.h \ - benchmark/zip_wd_benchmark.c benchmark/zip_wd_benchmark.h \ - benchmark/trng_wd_benchmark.c benchmark/trng_wd_benchmark.h \ - test/uadk_test.c test/uadk_test.h \ - test/test_sec.c test/test_sec.h test/sec_template_tv.h + benchmark/zip_uadk_benchmark.c benchmark/zip_uadk_benchmark.h +# benchmark/sec_wd_benchmark.c benchmark/sec_wd_benchmark.h \ +# benchmark/hpre_uadk_benchmark.c benchmark/hpre_uadk_benchmark.h \ +# benchmark/hpre_wd_benchmark.c hpre_wd_benchmark.h \ +# benchmark/zip_wd_benchmark.c benchmark/zip_wd_benchmark.h +# benchmark/trng_wd_benchmark.c benchmark/trng_wd_benchmark.h +# test/uadk_test.c test/uadk_test.h \ +# test/test_sec.c test/test_sec.h test/sec_template_tv.h
if WD_STATIC_DRV AM_CFLAGS+=-Bstatic @@ -27,9 +27,7 @@ uadk_tool_LDADD=$(libwd_la_OBJECTS) \ $(libwd_crypto_la_OBJECTS) \ ../.libs/libwd_comp.a \ ../.libs/libhisi_sec.a \ - ../.libs/libhisi_hpre.a \ ../.libs/libhisi_zip.a \ - ../.libs/libisa_ce.a \ -ldl -lnuma else uadk_tool_LDADD=-L../.libs -l:libwd.so.2 -l:libwd_crypto.so.2 \ @@ -44,8 +42,6 @@ endif if WITH_OPENSSL_DIR AM_CFLAGS+= -DWITH_OPENSSL_DIR -I$(with_openssl_dir)/include
-uadk_tool_SOURCES+=benchmark/sec_soft_benchmark.c benchmark/sec_soft_benchmark.h - if WD_STATIC_DRV uadk_tool_LDADD+= $(with_openssl_dir)/libcrypto.a else diff --git a/uadk_tool/benchmark/sec_uadk_benchmark.c b/uadk_tool/benchmark/sec_uadk_benchmark.c index ed57957f..800cefba 100644 --- a/uadk_tool/benchmark/sec_uadk_benchmark.c +++ b/uadk_tool/benchmark/sec_uadk_benchmark.c @@ -5,8 +5,8 @@
#include "sec_uadk_benchmark.h" #include "include/wd_cipher.h" -#include "include/wd_digest.h" -#include "include/wd_aead.h" +//#include "include/wd_digest.h" +//#include "include/wd_aead.h" #include "include/wd_sched.h"
#define SEC_TST_PRT printf @@ -132,26 +132,13 @@ static void *cipher_async_cb(struct wd_cipher_req *req, void *data) return NULL; }
-static void *aead_async_cb(struct wd_aead_req *req, void *data) -{ - return NULL; -} - -static void *digest_async_cb(void *data) -{ - return NULL; -} - static int sec_uadk_param_parse(thread_data *tddata, struct acc_option *options) { u32 algtype = options->algtype; - u32 optype = options->optype; bool is_union = false; u32 out_bytes = 32; u8 keysize = 0; u8 ivsize = 0; - u8 dmode; - u8 dalg; u8 mode; u8 alg;
@@ -396,135 +383,6 @@ static int sec_uadk_param_parse(thread_data *tddata, struct acc_option *options) mode = WD_CIPHER_XTS_GB; alg = WD_CIPHER_SM4; break; - case AES_128_CCM: - keysize = 16; - ivsize = 16; - mode = WD_CIPHER_CCM; - alg = WD_CIPHER_AES; - break; - case AES_192_CCM: - keysize = 24; - ivsize = 16; - mode = WD_CIPHER_CCM; - alg = WD_CIPHER_AES; - break; - case AES_256_CCM: - keysize = 32; - ivsize = 16; - mode = WD_CIPHER_CCM; - alg = WD_CIPHER_AES; - break; - case AES_128_GCM: - keysize = 16; - ivsize = 12; - mode = WD_CIPHER_GCM; - alg = WD_CIPHER_AES; - break; - case AES_192_GCM: - keysize = 24; - ivsize = 12; - mode = WD_CIPHER_GCM; - alg = WD_CIPHER_AES; - break; - case AES_256_GCM: - keysize = 32; - ivsize = 12; - mode = WD_CIPHER_GCM; - alg = WD_CIPHER_AES; - break; - case AES_128_CBC_SHA256_HMAC: - keysize = 16; - ivsize = 16; - mode = WD_CIPHER_CBC; - alg = WD_CIPHER_AES; - is_union = true; - dalg = WD_DIGEST_SHA256; - dmode = WD_DIGEST_HMAC; - break; - case AES_192_CBC_SHA256_HMAC: - keysize = 24; - ivsize = 16; - mode = WD_CIPHER_CBC; - alg = WD_CIPHER_AES; - is_union = true; - dalg = WD_DIGEST_SHA256; - dmode = WD_DIGEST_HMAC; - break; - case AES_256_CBC_SHA256_HMAC: - keysize = 32; - ivsize = 16; - mode = WD_CIPHER_CBC; - alg = WD_CIPHER_AES; - is_union = true; - dalg = WD_DIGEST_SHA256; - dmode = WD_DIGEST_HMAC; - break; - case SM4_128_CCM: - keysize = 16; - ivsize = 16; - mode = WD_CIPHER_CCM; - alg = WD_CIPHER_SM4; - break; - case SM4_128_GCM: - keysize = 16; - ivsize = 12; - mode = WD_CIPHER_GCM; - alg = WD_CIPHER_SM4; - break; - case SM3_ALG: // digest mode is optype - keysize = 4; - mode = optype; - out_bytes = 32; - alg = WD_DIGEST_SM3; - break; - case MD5_ALG: - keysize = 4; - out_bytes = 16; - mode = optype; - alg = WD_DIGEST_MD5; - break; - case SHA1_ALG: - keysize = 4; - out_bytes = 20; - mode = optype; - alg = WD_DIGEST_SHA1; - break; - case SHA256_ALG: - keysize = 4; - out_bytes = 32; - mode = optype; - alg = WD_DIGEST_SHA256; - break; - case SHA224_ALG: - keysize = 4; - out_bytes = 28; - mode = optype; - alg = WD_DIGEST_SHA224; - break; - case SHA384_ALG: - keysize = 4; - out_bytes = 48; - mode = optype; - alg = WD_DIGEST_SHA384; - break; - case SHA512_ALG: - keysize = 4; - out_bytes = 64; - mode = optype; - alg = WD_DIGEST_SHA512; - break; - case SHA512_224: - keysize = 4; - out_bytes = 28; - mode = optype; - alg = WD_DIGEST_SHA512_224; - break; - case SHA512_256: - keysize = 4; - out_bytes = 32; - mode = optype; - alg = WD_DIGEST_SHA512_256; - break; default: SEC_TST_PRT("failed to set sec alg\n"); return -EINVAL; @@ -532,8 +390,6 @@ static int sec_uadk_param_parse(thread_data *tddata, struct acc_option *options)
tddata->alg = alg; tddata->mode = mode; - tddata->dalg = dalg; - tddata->dmode = dmode; tddata->ivsize = ivsize; tddata->keysize = keysize; tddata->is_union = is_union; @@ -688,12 +544,6 @@ static int init_ctx_config(struct acc_option *options) case CIPHER_TYPE: g_sched = wd_sched_rr_alloc(SCHED_POLICY_RR, 1, max_node, wd_cipher_poll_ctx); break; - case AEAD_TYPE: - g_sched = wd_sched_rr_alloc(SCHED_POLICY_RR, 1, max_node, wd_aead_poll_ctx); - break; - case DIGEST_TYPE: - g_sched = wd_sched_rr_alloc(SCHED_POLICY_RR, 1, max_node, wd_digest_poll_ctx); - break; default: SEC_TST_PRT("failed to parse alg subtype!\n"); goto free_ctx; @@ -720,12 +570,6 @@ static int init_ctx_config(struct acc_option *options) case CIPHER_TYPE: ret = wd_cipher_init(&g_ctx_cfg, g_sched); break; - case AEAD_TYPE: - ret = wd_aead_init(&g_ctx_cfg, g_sched); - break; - case DIGEST_TYPE: - ret = wd_digest_init(&g_ctx_cfg, g_sched); - break; } if (ret) { SEC_TST_PRT("failed to init sec ctx!\n"); @@ -756,12 +600,6 @@ static void uninit_ctx_config(int subtype) case CIPHER_TYPE: wd_cipher_uninit(); break; - case AEAD_TYPE: - wd_aead_uninit(); - break; - case DIGEST_TYPE: - wd_digest_uninit(); - break; default: SEC_TST_PRT("failed to parse alg subtype on uninit!\n"); return; @@ -781,12 +619,6 @@ static void uninit_ctx_config2(int subtype) case CIPHER_INSTR_TYPE: wd_cipher_uninit2(); break; - case AEAD_TYPE: - wd_aead_uninit2(); - break; - case DIGEST_TYPE: - wd_digest_uninit2(); - break; default: SEC_TST_PRT("failed to parse alg subtype on uninit2!\n"); return; @@ -817,16 +649,6 @@ static int init_ctx_config2(struct acc_option *options) if (ret) SEC_TST_PRT("failed to do cipher intruction init2!\n"); break; - case AEAD_TYPE: - ret = wd_aead_init2(alg_name, SCHED_POLICY_RR, TASK_HW); - if (ret) - SEC_TST_PRT("failed to do aead init2!\n"); - break; - case DIGEST_TYPE: - ret = wd_digest_init2(alg_name, options->sched_type, options->task_type); - if (ret) - SEC_TST_PRT("failed to do digest init2!\n"); - break; } if (ret) { SEC_TST_PRT("failed to do cipher init2!\n"); @@ -1102,12 +924,6 @@ static void *sec_uadk_poll(void *data) case CIPHER_TYPE: uadk_poll_ctx = wd_cipher_poll_ctx; break; - case AEAD_TYPE: - uadk_poll_ctx = wd_aead_poll_ctx; - break; - case DIGEST_TYPE: - uadk_poll_ctx = wd_digest_poll_ctx; - break; default: SEC_TST_PRT("<<<<<<async poll interface is NULL!\n"); return NULL; @@ -1147,12 +963,6 @@ static void *sec_uadk_poll2(void *data) case CIPHER_TYPE: uadk_poll_policy = wd_cipher_poll; break; - case AEAD_TYPE: - uadk_poll_policy = wd_aead_poll; - break; - case DIGEST_TYPE: - uadk_poll_policy = wd_digest_poll; - break; default: SEC_TST_PRT("<<<<<<async poll interface is NULL!\n"); return NULL; @@ -1249,177 +1059,6 @@ static void *sec_uadk_cipher_async(void *arg) return NULL; }
-static void *sec_uadk_aead_async(void *arg) -{ - thread_data *pdata = (thread_data *)arg; - struct wd_aead_sess_setup aead_setup = {0}; - u8 *priv_iv, *priv_key, *priv_hash; - u32 auth_size = SEC_PERF_AUTH_SIZE; - struct wd_aead_req areq = {0}; - struct bd_pool *uadk_pool; - int try_cnt = 0; - handle_t h_sess; - u32 count = 0; - int ret, i; - - if (pdata->td_id > g_thread_num) - return NULL; - - uadk_pool = &g_uadk_pool.pool[pdata->td_id]; - priv_iv = g_uadk_pool.iv[pdata->td_id]; - priv_key = g_uadk_pool.key[pdata->td_id]; - priv_hash = g_uadk_pool.hash[pdata->td_id]; - - memset(priv_iv, DEF_IVK_DATA, MAX_IVK_LENTH); - memset(priv_key, DEF_IVK_DATA, MAX_IVK_LENTH); - - aead_setup.calg = pdata->alg; - aead_setup.cmode = pdata->mode; - if (pdata->is_union) { - aead_setup.dalg = pdata->dalg; - aead_setup.dmode = pdata->dmode; - } - h_sess = wd_aead_alloc_sess(&aead_setup); - if (!h_sess) - return NULL; - ret = wd_aead_set_ckey(h_sess, (const __u8*)priv_key, pdata->keysize); - if (ret) { - SEC_TST_PRT("test sec cipher set key is failed!\n"); - wd_aead_free_sess(h_sess); - return NULL; - } - if (pdata->is_union) { - ret = wd_aead_set_akey(h_sess, (const __u8*)priv_hash, HASH_ZISE); - if (ret) { - SEC_TST_PRT("test sec aead set akey is failed!\n"); - wd_aead_free_sess(h_sess); - return NULL; - } - } - ret = wd_aead_set_authsize(h_sess, auth_size); - if (ret) { - SEC_TST_PRT("set auth size fail, authsize: 16\n"); - wd_aead_free_sess(h_sess); - return NULL; - } - - areq.op_type = pdata->optype; - areq.iv = priv_iv; // aead IV need update with param - areq.mac = uadk_pool->bds[0].mac; - areq.iv_bytes = pdata->ivsize; - 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 - areq.out_bytes = g_pktlen + 16; // aadsize = 16; - else - areq.out_bytes = g_pktlen + 32; // aadsize + authsize = 32; - - areq.data_fmt = 0; - areq.state = 0; - areq.cb = aead_async_cb; - - while(1) { - if (get_run_state() == 0) - break; - try_cnt = 0; - i = count % MAX_POOL_LENTH; - areq.src = uadk_pool->bds[i].src; - areq.dst = uadk_pool->bds[i].dst; - areq.mac = uadk_pool->bds[i].mac; - - ret = wd_do_aead_async(h_sess, &areq); - if (ret < 0) { - usleep(SEND_USLEEP * try_cnt); - try_cnt++; - if (try_cnt > MAX_TRY_CNT) { - SEC_TST_PRT("Test aead send fail %d times!\n", MAX_TRY_CNT); - try_cnt = 0; - } - continue; - } - count++; - } - wd_aead_free_sess(h_sess); - - add_send_complete(); - - return NULL; -} - -static void *sec_uadk_digest_async(void *arg) -{ - thread_data *pdata = (thread_data *)arg; - struct wd_digest_sess_setup digest_setup = {0}; - struct wd_digest_req dreq; - struct bd_pool *uadk_pool; - u8 *priv_iv, *priv_key; - int try_cnt = 0; - handle_t h_sess; - u32 count = 0; - int ret, i; - - if (pdata->td_id > g_thread_num) - return NULL; - - uadk_pool = &g_uadk_pool.pool[pdata->td_id]; - priv_iv = g_uadk_pool.iv[pdata->td_id]; - priv_key = g_uadk_pool.key[pdata->td_id]; - - memset(priv_iv, DEF_IVK_DATA, MAX_IVK_LENTH); - memset(priv_key, DEF_IVK_DATA, MAX_IVK_LENTH); - - digest_setup.alg = pdata->alg; - digest_setup.mode = pdata->mode; // digest mode is optype - h_sess = wd_digest_alloc_sess(&digest_setup); - if (!h_sess) - return NULL; - if (digest_setup.mode == WD_DIGEST_HMAC) { - ret = wd_digest_set_key(h_sess, (const __u8*)priv_key, 4); - if (ret) { - SEC_TST_PRT("test sec digest set key is failed!\n"); - wd_digest_free_sess(h_sess); - return NULL; - } - } - dreq.in_bytes = g_pktlen; - dreq.out_bytes = pdata->d_outbytes; - dreq.out_buf_bytes = pdata->d_outbytes; - dreq.data_fmt = 0; - dreq.state = 0; - dreq.has_next = 0; - dreq.cb = digest_async_cb; - - while(1) { - if (get_run_state() == 0) - break; - try_cnt = 0; - i = count % MAX_POOL_LENTH; - dreq.in = uadk_pool->bds[i].src; - dreq.out = uadk_pool->bds[i].dst; - - ret = wd_do_digest_async(h_sess, &dreq); - if (ret < 0) { - usleep(SEND_USLEEP * try_cnt); - try_cnt++; - if (try_cnt > MAX_TRY_CNT) { - SEC_TST_PRT("Test digest send fail %d times!\n", MAX_TRY_CNT); - try_cnt = 0; - } - continue; - } - count++; - } - wd_digest_free_sess(h_sess); - - add_send_complete(); - - return NULL; -} - static void *sec_uadk_cipher_sync(void *arg) { thread_data *pdata = (thread_data *)arg; @@ -1481,156 +1120,6 @@ static void *sec_uadk_cipher_sync(void *arg) return NULL; }
-static void *sec_uadk_aead_sync(void *arg) -{ - thread_data *pdata = (thread_data *)arg; - struct wd_aead_sess_setup aead_setup = {0}; - u8 *priv_iv, *priv_key, *priv_hash; - u32 auth_size = SEC_PERF_AUTH_SIZE; - struct wd_aead_req areq = {0}; - struct bd_pool *uadk_pool; - handle_t h_sess; - u32 count = 0; - int ret, i; - - if (pdata->td_id > g_thread_num) - return NULL; - - uadk_pool = &g_uadk_pool.pool[pdata->td_id]; - - priv_iv = g_uadk_pool.iv[pdata->td_id]; - priv_key = g_uadk_pool.key[pdata->td_id]; - priv_hash = g_uadk_pool.hash[pdata->td_id]; - - memset(priv_iv, DEF_IVK_DATA, MAX_IVK_LENTH); - memset(priv_key, DEF_IVK_DATA, MAX_IVK_LENTH); - - aead_setup.calg = pdata->alg; - aead_setup.cmode = pdata->mode; - if (pdata->is_union) { - aead_setup.dalg = pdata->dalg; - aead_setup.dmode = pdata->dmode; - } - h_sess = wd_aead_alloc_sess(&aead_setup); - if (!h_sess) - return NULL; - ret = wd_aead_set_ckey(h_sess, (const __u8*)priv_key, pdata->keysize); - if (ret) { - SEC_TST_PRT("test sec cipher set key is failed!\n"); - wd_aead_free_sess(h_sess); - return NULL; - } - if (pdata->is_union) { - ret = wd_aead_set_akey(h_sess, (const __u8*)priv_hash, HASH_ZISE); - if (ret) { - SEC_TST_PRT("test sec aead set akey is failed!\n"); - wd_aead_free_sess(h_sess); - return NULL; - } - } - ret = wd_aead_set_authsize(h_sess, auth_size); - if (ret) { - SEC_TST_PRT("set auth size fail, authsize: 16\n"); - wd_aead_free_sess(h_sess); - return NULL; - } - - areq.op_type = pdata->optype; - areq.iv = priv_iv; // aead IV need update with param - areq.mac = uadk_pool->bds[0].mac; - areq.iv_bytes = pdata->ivsize; - 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 - areq.out_bytes = g_pktlen + 32; // aadsize + authsize = 32; - - areq.data_fmt = 0; - areq.state = 0; - - while(1) { - i = count % MAX_POOL_LENTH; - areq.src = uadk_pool->bds[i].src; - areq.dst = uadk_pool->bds[i].dst; - count++; - - ret = wd_do_aead_sync(h_sess, &areq); - if (ret || areq.state) - break; - if (get_run_state() == 0) - break; - } - wd_aead_free_sess(h_sess); - - cal_avg_latency(count); - add_recv_data(count, g_pktlen); - - return NULL; -} - -static void *sec_uadk_digest_sync(void *arg) -{ - thread_data *pdata = (thread_data *)arg; - struct wd_digest_sess_setup digest_setup = {0}; - struct wd_digest_req dreq; - struct bd_pool *uadk_pool; - u8 *priv_iv, *priv_key; - handle_t h_sess; - u32 count = 0; - int ret, i; - - if (pdata->td_id > g_thread_num) - return NULL; - - uadk_pool = &g_uadk_pool.pool[pdata->td_id]; - priv_iv = g_uadk_pool.iv[pdata->td_id]; - priv_key = g_uadk_pool.key[pdata->td_id]; - - memset(priv_iv, DEF_IVK_DATA, MAX_IVK_LENTH); - memset(priv_key, DEF_IVK_DATA, MAX_IVK_LENTH); - - digest_setup.alg = pdata->alg; - digest_setup.mode = pdata->mode; // digest mode is optype - h_sess = wd_digest_alloc_sess(&digest_setup); - if (!h_sess) - return NULL; - if (digest_setup.mode == WD_DIGEST_HMAC) { - ret = wd_digest_set_key(h_sess, (const __u8*)priv_key, 4); - if (ret) { - SEC_TST_PRT("test sec digest set key is failed!\n"); - wd_digest_free_sess(h_sess); - return NULL; - } - } - dreq.in_bytes = g_pktlen; - dreq.out_bytes = pdata->d_outbytes; - dreq.out_buf_bytes = pdata->d_outbytes; - dreq.data_fmt = 0; - dreq.state = 0; - dreq.has_next = 0; - - while(1) { - i = count % MAX_POOL_LENTH; - dreq.in = uadk_pool->bds[i].src; - dreq.out = uadk_pool->bds[i].dst; - ret = wd_do_digest_sync(h_sess, &dreq); - if (ret || dreq.state) - break; - count++; - if (get_run_state() == 0) - break; - } - wd_digest_free_sess(h_sess); - - cal_avg_latency(count); - add_recv_data(count, g_pktlen); - - return NULL; -} - int sec_uadk_sync_threads(struct acc_option *options) { typedef void *(*sec_sync_run)(void *arg); @@ -1650,12 +1139,6 @@ int sec_uadk_sync_threads(struct acc_option *options) case CIPHER_INSTR_TYPE: uadk_sec_sync_run = sec_uadk_cipher_sync; break; - case AEAD_TYPE: - uadk_sec_sync_run = sec_uadk_aead_sync; - break; - case DIGEST_TYPE: - uadk_sec_sync_run = sec_uadk_digest_sync; - break; default: SEC_TST_PRT("Invalid subtype!\n"); return -EINVAL; @@ -1711,12 +1194,6 @@ int sec_uadk_async_threads(struct acc_option *options) case CIPHER_TYPE: uadk_sec_async_run = sec_uadk_cipher_async; break; - case AEAD_TYPE: - uadk_sec_async_run = sec_uadk_aead_async; - break; - case DIGEST_TYPE: - uadk_sec_async_run = sec_uadk_digest_async; - break; }
for (i = 0; i < g_ctxnum; i++) { diff --git a/uadk_tool/benchmark/uadk_benchmark.c b/uadk_tool/benchmark/uadk_benchmark.c index d3142bba..290e4123 100644 --- a/uadk_tool/benchmark/uadk_benchmark.c +++ b/uadk_tool/benchmark/uadk_benchmark.c @@ -7,16 +7,16 @@
#include "uadk_benchmark.h" #include "sec_uadk_benchmark.h" -#include "sec_wd_benchmark.h" -#include "sec_soft_benchmark.h" +//#include "sec_wd_benchmark.h" +//#include "sec_soft_benchmark.h"
-#include "hpre_uadk_benchmark.h" -#include "hpre_wd_benchmark.h" +//#include "hpre_uadk_benchmark.h" +//#include "hpre_wd_benchmark.h"
#include "zip_uadk_benchmark.h" -#include "zip_wd_benchmark.h" +//#include "zip_wd_benchmark.h"
-#include "trng_wd_benchmark.h" +//#include "trng_wd_benchmark.h"
#define TABLE_SPACE_SIZE 8
@@ -480,13 +480,16 @@ static int benchmark_run(struct acc_option *option) (option->modetype == MULTIBUF_MODE)) { ret = sec_uadk_benchmark(option); usleep(20000); +#if 0 } else if (option->modetype == NOSVA_MODE) { ret = sec_wd_benchmark(option); usleep(20000); } else if (option->modetype == SOFT_MODE) { ret = sec_soft_benchmark(option); +#endif } break; +#if 0 case HPRE_TYPE: if (option->modetype == SVA_MODE) { ret = hpre_uadk_benchmark(option); @@ -494,13 +497,15 @@ static int benchmark_run(struct acc_option *option) ret = hpre_wd_benchmark(option); } break; +#endif case ZIP_TYPE: if (option->modetype == SVA_MODE) { ret = zip_uadk_benchmark(option); - } else if (option->modetype == NOSVA_MODE) { - ret = zip_wd_benchmark(option); +// } else if (option->modetype == NOSVA_MODE) { +// ret = zip_wd_benchmark(option); } break; +#if 0 case TRNG_TYPE: if (option->modetype == SVA_MODE) ACC_TST_PRT("TRNG not support sva mode..\n"); @@ -508,6 +513,7 @@ static int benchmark_run(struct acc_option *option) ret = trng_wd_benchmark(option);
break; +#endif }
return ret; diff --git a/uadk_tool/uadk_tool.c b/uadk_tool/uadk_tool.c index 63e6d0f4..a3a7b757 100644 --- a/uadk_tool/uadk_tool.c +++ b/uadk_tool/uadk_tool.c @@ -38,7 +38,7 @@ int main(int argc, char **argv) (void)acc_benchmark_run(&option); } else if (!strcmp("test", argv[index])) { printf("start UADK acc algorithm test.\n"); - acc_test_run(argc, argv); + //acc_test_run(argc, argv); } else { print_tool_help(); }