diff --git a/app/test/test_compressdev.c b/app/test/test_compressdev.c index 81b8e02006..139094ecb5 100644 --- a/app/test/test_compressdev.c +++ b/app/test/test_compressdev.c @@ -450,6 +450,9 @@ compress_zlib(struct rte_comp_op *op, else if (xform->compress.chksum == RTE_COMP_CHECKSUM_CRC32) window_bits = ZLIB_CRC_CHECKSUM_WINDOW_BITS; + // hack for zlib + window_bits = 15; + comp_level = xform->compress.level; if (comp_level != RTE_COMP_LEVEL_NONE) @@ -593,6 +596,9 @@ decompress_zlib(struct rte_comp_op *op, * When doing raw DEFLATE, this number will be negative. */ window_bits = -(xform->decompress.window_size); + + // hack for zlib + window_bits = 15; ret = inflateInit2(&stream, window_bits); if (ret != Z_OK) { diff --git a/drivers/compress/uadk/uadk_compress_pmd.c b/drivers/compress/uadk/uadk_compress_pmd.c index ea8f06b6e0..931edb11ab 100644 --- a/drivers/compress/uadk/uadk_compress_pmd.c +++ b/drivers/compress/uadk/uadk_compress_pmd.c @@ -13,7 +13,7 @@ #include "uadk_compress_pmd_private.h" #define UADK_COMP_DEF_CTXS 2 -static char alg_name[8] = "deflate"; +static char alg_name[8] = "zlib"; static const struct rte_compressdev_capabilities uadk_compress_pmd_capabilities[] = { @@ -254,7 +254,7 @@ uadk_compress_pmd_xform_create(struct rte_compressdev *dev __rte_unused, case RTE_COMP_ALGO_NULL: break; case RTE_COMP_ALGO_DEFLATE: - setup.alg_type = WD_DEFLATE; + setup.alg_type = WD_ZLIB; setup.win_sz = WD_COMP_WS_8K; setup.comp_lv = WD_COMP_L8; setup.op_type = WD_DIR_COMPRESS; @@ -271,7 +271,7 @@ uadk_compress_pmd_xform_create(struct rte_compressdev *dev __rte_unused, case RTE_COMP_ALGO_NULL: break; case RTE_COMP_ALGO_DEFLATE: - setup.alg_type = WD_DEFLATE; + setup.alg_type = WD_ZLIB; setup.comp_lv = WD_COMP_L8; setup.op_type = WD_DIR_DECOMPRESS; param.type = setup.op_type;