From 29b323d8210d51a047391dd80e78bffc8ab052fd Mon Sep 17 00:00:00 2001 From: Elliot Gorokhovsky Date: Thu, 23 Feb 2023 16:00:28 +0800 Subject: [PATCH] QATAPP-28529: fix minmatch bug Change-Id: I8b1fd8379dbb187921c95709158223e48aecb813 --- utils/qzstd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/qzstd.c b/utils/qzstd.c index a41a9e0..8256b71 100644 --- a/utils/qzstd.c +++ b/utils/qzstd.c @@ -323,6 +323,12 @@ int compressFile(int in_file, int out_file) * should be 3. if mini match is 3, then LZ4MINMATCH should be 2*/ LZ4MINMATCH = g_sess_params.lz4s_mini_match == 4 ? 3 : 2; + /* Align zstd minmatch to the QAT minmatch */ + ZSTD_CCtx_setParameter( + zc, ZSTD_c_minMatch, + g_sess_params.lz4s_mini_match >= 4 ? 4 : 3 + ); + //setup session int ret = qzInit(&qzstd_g_sess, g_sess_params.common_params.sw_backup); if (ret != QZ_OK && ret != QZ_DUPLICATE) {