
From: Zhushuai Yin <yinzhushuai@huawei.com> Reduce the digest block size to prevent repeated application and release of large memory, thereby improving performance. Signed-off-by: Zhushuai Yin <yinzhushuai@huawei.com> Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com> --- src/uadk_prov_digest.c | 2 +- src/uadk_prov_hmac.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uadk_prov_digest.c b/src/uadk_prov_digest.c index 208f381..39e589a 100644 --- a/src/uadk_prov_digest.c +++ b/src/uadk_prov_digest.c @@ -50,7 +50,7 @@ #define MD5_SMALL_PACKET_OFFLOAD_THRESHOLD_DEFAULT (8 * 1024) #define SHA_SMALL_PACKET_OFFLOAD_THRESHOLD_DEFAULT (512) #define MAX_DIGEST_LENGTH 64 -#define DIGEST_BLOCK_SIZE (512 * 1024) +#define DIGEST_BLOCK_SIZE 16384 #define ALG_NAME_SIZE 128 #define UADK_DIGEST_DEF_CTXS 1 diff --git a/src/uadk_prov_hmac.c b/src/uadk_prov_hmac.c index 9ad9168..7ee663a 100644 --- a/src/uadk_prov_hmac.c +++ b/src/uadk_prov_hmac.c @@ -41,7 +41,7 @@ #define MAX_DIGEST_LENGTH 64 #define MAX_KEY_LEN 144 -#define HMAC_BLOCK_SIZE (512 * 1024) +#define HMAC_BLOCK_SIZE 16384 #define ALG_NAME_SIZE 128 #define PARAMS_SIZE 2 -- 2.43.0