Fixes to QAT enables for benchmark for HMAC. Adds new NO_HW_BENCH
to support using multi-threaded software only benchmarks.
This commit is contained in:
parent
1512f4da90
commit
77ffeccb0b
@ -1204,7 +1204,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_aescbc(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_AES)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_AES) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_aescbc(1);
|
||||
#endif
|
||||
}
|
||||
@ -1214,7 +1215,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_aesgcm(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_AES)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_AES) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_aesgcm(1);
|
||||
#endif
|
||||
}
|
||||
@ -1224,7 +1226,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_aesecb(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_AES)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_AES) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_aesecb(1);
|
||||
#endif
|
||||
}
|
||||
@ -1256,7 +1259,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_arc4(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ARC4)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ARC4) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_arc4(1);
|
||||
#endif
|
||||
}
|
||||
@ -1282,7 +1286,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_des(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_3DES)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_3DES) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_des(1);
|
||||
#endif
|
||||
}
|
||||
@ -1297,7 +1302,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_md5(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_MD5)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_MD5) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_md5(1);
|
||||
#endif
|
||||
}
|
||||
@ -1311,7 +1317,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_sha(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_sha(1);
|
||||
#endif
|
||||
}
|
||||
@ -1321,7 +1328,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_sha224(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA224)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA224) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_sha224(1);
|
||||
#endif
|
||||
}
|
||||
@ -1331,7 +1339,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_sha256(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA256)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA256) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_sha256(1);
|
||||
#endif
|
||||
}
|
||||
@ -1341,7 +1350,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_sha384(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA384)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA384) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_sha384(1);
|
||||
#endif
|
||||
}
|
||||
@ -1351,7 +1361,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_sha512(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA512)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA512) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_sha512(1);
|
||||
#endif
|
||||
}
|
||||
@ -1362,7 +1373,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_sha3_224(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA3)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA3) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_sha3_224(1);
|
||||
#endif
|
||||
}
|
||||
@ -1372,7 +1384,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_sha3_256(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA3)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA3) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_sha3_256(1);
|
||||
#endif
|
||||
}
|
||||
@ -1382,7 +1395,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_sha3_384(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA3)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA3) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_sha3_384(1);
|
||||
#endif
|
||||
}
|
||||
@ -1392,7 +1406,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_sha3_512(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA512)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA3) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_sha3_512(1);
|
||||
#endif
|
||||
}
|
||||
@ -1417,7 +1432,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_hmac_md5(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_HMAC)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_HMAC) && \
|
||||
defined(WC_ASYNC_ENABLE_MD5) && !defined(NO_HW_BENCH)
|
||||
bench_hmac_md5(1);
|
||||
#endif
|
||||
}
|
||||
@ -1427,7 +1443,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_hmac_sha(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_HMAC) && \
|
||||
defined(WC_ASYNC_ENABLE_SHA) && !defined(NO_HW_BENCH)
|
||||
bench_hmac_sha(1);
|
||||
#endif
|
||||
}
|
||||
@ -1437,7 +1454,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_hmac_sha224(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA224)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_HMAC) && \
|
||||
defined(WC_ASYNC_ENABLE_SHA224) && !defined(NO_HW_BENCH)
|
||||
bench_hmac_sha224(1);
|
||||
#endif
|
||||
}
|
||||
@ -1447,7 +1465,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_hmac_sha256(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA256)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_HMAC) && \
|
||||
defined(WC_ASYNC_ENABLE_SHA256) && !defined(NO_HW_BENCH)
|
||||
bench_hmac_sha256(1);
|
||||
#endif
|
||||
}
|
||||
@ -1457,7 +1476,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_hmac_sha384(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA384)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_HMAC) && \
|
||||
defined(WC_ASYNC_ENABLE_SHA384) && !defined(NO_HW_BENCH)
|
||||
bench_hmac_sha384(1);
|
||||
#endif
|
||||
}
|
||||
@ -1467,7 +1487,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_hmac_sha512(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_SHA512)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_HMAC) && \
|
||||
defined(WC_ASYNC_ENABLE_SHA512) && !defined(NO_HW_BENCH)
|
||||
bench_hmac_sha512(1);
|
||||
#endif
|
||||
}
|
||||
@ -1490,7 +1511,8 @@ static void* benchmarks_do(void* args)
|
||||
bench_rsaKeyGen(0);
|
||||
}
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_RSA_KEYGEN)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_RSA_KEYGEN) \
|
||||
&& !defined(NO_HW_BENCH)
|
||||
if (bench_asym_algs & BENCH_RSA_SZ) {
|
||||
bench_rsaKeyGen_size(1, bench_size);
|
||||
}
|
||||
@ -1504,7 +1526,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_rsa(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_RSA)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_RSA) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_rsa(1);
|
||||
#endif
|
||||
}
|
||||
@ -1514,7 +1537,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_rsa_key(0, bench_size);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_RSA)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_RSA) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_rsa_key(1, bench_size);
|
||||
#endif
|
||||
}
|
||||
@ -1526,7 +1550,8 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_dh(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_DH)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_DH) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_dh(1);
|
||||
#endif
|
||||
}
|
||||
@ -1544,18 +1569,17 @@ static void* benchmarks_do(void* args)
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_eccMakeKey(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ECC)
|
||||
/* async supported in simulator only */
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT_TEST
|
||||
bench_eccMakeKey(1);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ECC) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_eccMakeKey(1);
|
||||
#endif
|
||||
}
|
||||
if (bench_all || (bench_asym_algs & BENCH_ECC)) {
|
||||
#ifndef NO_SW_BENCH
|
||||
bench_ecc(0);
|
||||
#endif
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ECC)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ECC) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_ecc(1);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user