DPDK patches and discussions
 help / color / mirror / Atom feed
From: Fiona Trahe <fiona.trahe@intel.com>
To: dev@dpdk.org
Cc: akhil.goyal@nxp.com, stable@dpdk.org,
	Fiona Trahe <fiona.trahe@intel.com>
Subject: [dpdk-dev] [PATCH 1/2] compress/qat: fix for zero checksum on decompression
Date: Sat, 22 Sep 2018 14:25:37 +0100	[thread overview]
Message-ID: <1537622738-29475-1-git-send-email-fiona.trahe@intel.com> (raw)

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

             reply	other threads:[~2018-09-22 13:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-22 13:25 Fiona Trahe [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1537622738-29475-1-git-send-email-fiona.trahe@intel.com \
    --to=fiona.trahe@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).