summaryrefslogtreecommitdiff
path: root/drivers/compress
diff options
context:
space:
mode:
authorFiona Trahe <fiona.trahe@intel.com>2018-09-22 14:25:37 +0100
committerAkhil Goyal <akhil.goyal@nxp.com>2018-09-27 13:40:22 +0200
commit7586c5787375b3947d7d12c91aa99ac4ff58203d (patch)
tree6cb3d7c78702028a71e190b0c7c8dee436ab9fec /drivers/compress
parent0ad08d3c29dc0bebe7f7c95efb77925cdeb1f665 (diff)
downloaddpdk-next-eventdev-7586c5787375b3947d7d12c91aa99ac4ff58203d.zip
dpdk-next-eventdev-7586c5787375b3947d7d12c91aa99ac4ff58203d.tar.gz
dpdk-next-eventdev-7586c5787375b3947d7d12c91aa99ac4ff58203d.tar.xz
compress/qat: fix checksum on decompression
Checksum was always 0 on QAT decompression due to incorrect use of union variable. Fixes: 6a7ea14819e9 ("compress/qat: add xform processing") Cc: stable@dpdk.org Signed-off-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Diffstat (limited to 'drivers/compress')
-rw-r--r--drivers/compress/qat/qat_comp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
index 38c8a5b..6f1f2dc 100644
--- a/drivers/compress/qat/qat_comp.c
+++ b/drivers/compress/qat/qat_comp.c
@@ -345,17 +345,16 @@ qat_comp_private_xform_create(struct rte_compressdev *dev,
if (xform->compress.deflate.huffman == RTE_COMP_HUFFMAN_FIXED ||
((xform->compress.deflate.huffman == RTE_COMP_HUFFMAN_DEFAULT)
&& qat->interm_buff_mz == NULL))
-
qat_xform->qat_comp_request_type =
QAT_COMP_REQUEST_FIXED_COMP_STATELESS;
+ qat_xform->checksum_type = xform->compress.chksum;
} else {
qat_xform->qat_comp_request_type = QAT_COMP_REQUEST_DECOMPRESS;
+ qat_xform->checksum_type = xform->decompress.chksum;
}
- qat_xform->checksum_type = xform->compress.chksum;
-
if (qat_comp_create_templates(qat_xform, qat->interm_buff_mz, xform)) {
QAT_LOG(ERR, "QAT: Problem with setting compression");
return -EINVAL;