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 1f4c4cfd00..b7790b171a 100644 --- a/drivers/compress/uadk/uadk_compress_pmd.c +++ b/drivers/compress/uadk/uadk_compress_pmd.c @@ -218,7 +218,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; @@ -235,7 +235,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; @@ -386,7 +386,7 @@ uadk_compress_probe(struct rte_vdev_device *vdev) struct uacce_dev *udev; const char *name; - udev = wd_get_accel_dev("deflate"); + udev = wd_get_accel_dev("zlib"); if (!udev) return -ENODEV;