DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] compress/qat: fix for zero checksum on decompression
@ 2018-09-22 13:25 Fiona Trahe
  2018-09-22 13:25 ` [dpdk-dev] [PATCH 2/2] compress/qat: remove unnecessary assignment Fiona Trahe
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Fiona Trahe @ 2018-09-22 13:25 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, stable, Fiona Trahe

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>
---
 drivers/compress/qat/qat_comp.c | 5 ++---
 1 file 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;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-09-27 11:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-22 13:25 [dpdk-dev] [PATCH 1/2] compress/qat: fix for zero checksum on decompression Fiona Trahe
2018-09-22 13:25 ` [dpdk-dev] [PATCH 2/2] compress/qat: remove unnecessary assignment Fiona Trahe
     [not found]   ` <9221f2b7-8737-369c-77e0-95e2a5daa1b2@nxp.com>
2018-09-27 11:29     ` Jozwiak, TomaszX
2018-09-27 11:48   ` Akhil Goyal
     [not found] ` <fc4d4392-bbef-63f5-46f0-1ab86df6aae8@nxp.com>
2018-09-27 11:25   ` [dpdk-dev] [PATCH 1/2] compress/qat: fix for zero checksum on decompression Jozwiak, TomaszX
2018-09-27 11:47 ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).