From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id F025D27D; Sat, 22 Sep 2018 15:25:53 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Sep 2018 06:25:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,289,1534834800"; d="scan'208";a="92352293" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by fmsmga001.fm.intel.com with ESMTP; 22 Sep 2018 06:25:51 -0700 From: Fiona Trahe To: dev@dpdk.org Cc: akhil.goyal@nxp.com, stable@dpdk.org, Fiona Trahe Date: Sat, 22 Sep 2018 14:25:37 +0100 Message-Id: <1537622738-29475-1-git-send-email-fiona.trahe@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH 1/2] compress/qat: fix for zero checksum on decompression X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2018 13:25:55 -0000 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 --- 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