From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 2A9031B494 for ; Fri, 23 Nov 2018 11:29:24 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A17A88311; Fri, 23 Nov 2018 10:29:23 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8ABA82A30B; Fri, 23 Nov 2018 10:29:22 +0000 (UTC) From: Kevin Traynor To: Lee Daly Cc: dpdk stable Date: Fri, 23 Nov 2018 10:26:29 +0000 Message-Id: <20181123102713.17309-25-ktraynor@redhat.com> In-Reply-To: <20181123102713.17309-1-ktraynor@redhat.com> References: <20181123102713.17309-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 23 Nov 2018 10:29:23 +0000 (UTC) Subject: [dpdk-stable] patch 'compress/isal: fix uncleared compression states' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2018 10:29:24 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/29/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From 8f1066348d4cbedfa7a6ae3563aa61d01f56b4b3 Mon Sep 17 00:00:00 2001 From: Lee Daly Date: Thu, 1 Nov 2018 11:48:19 +0000 Subject: [PATCH] compress/isal: fix uncleared compression states [ upstream commit 1713ad8bc5578db230830c3713d140184b364a3d ] Fixing uncleared states of compression & decompression engines post op. Fixes: 788e748d3845 ("compress/isal: support chained mbufs") Fixes: dc49e6aa4879 ("compress/isal: add ISA-L compression functionality") Fixes: 7bf4f0630af6 ("compress/isal: add ISA-L decomp functionality") Signed-off-by: Lee Daly --- drivers/compress/isal/isal_compress_pmd.c | 29 ++++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c index e943336b3..9f1e96888 100644 --- a/drivers/compress/isal/isal_compress_pmd.c +++ b/drivers/compress/isal/isal_compress_pmd.c @@ -315,22 +315,21 @@ chained_mbuf_decompression(struct rte_comp_op *op, struct isal_comp_qp *qp) ret = isal_inflate(qp->state); + if (ret != ISAL_DECOMP_OK) { + ISAL_PMD_LOG(ERR, "Decompression operation failed\n"); + op->status = RTE_COMP_OP_STATUS_ERROR; + return ret; + } + /* Check for first segment, offset needs to be accounted for */ if (remaining_data == op->src.length) { - consumed_data = src->data_len - qp->state->avail_in - - src_remaining_offset; + consumed_data = src->data_len - src_remaining_offset; } else - consumed_data = src->data_len - qp->state->avail_in; - - op->consumed += consumed_data; - remaining_data -= consumed_data; - - if (ret != ISAL_DECOMP_OK) { - ISAL_PMD_LOG(ERR, "Decompression operation failed\n"); - op->status = RTE_COMP_OP_STATUS_ERROR; - return ret; - } + consumed_data = src->data_len; if (qp->state->avail_in == 0 && op->consumed != op->src.length) { + op->consumed += consumed_data; + remaining_data -= consumed_data; + if (src->next != NULL) { src = src->next; @@ -461,6 +460,7 @@ process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp, } } - op->consumed = qp->stream->total_in; - op->produced = qp->stream->total_out; + op->consumed = qp->stream->total_in; + op->produced = qp->stream->total_out; + isal_deflate_reset(qp->stream); return ret; @@ -539,4 +539,5 @@ process_isal_inflate(struct rte_comp_op *op, struct isal_comp_qp *qp) } op->produced = qp->state->total_out; + isal_inflate_reset(qp->state); return ret; -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-23 10:22:54.908504510 +0000 +++ 0025-compress-isal-fix-uncleared-compression-states.patch 2018-11-23 10:22:54.000000000 +0000 @@ -1,14 +1,15 @@ -From 1713ad8bc5578db230830c3713d140184b364a3d Mon Sep 17 00:00:00 2001 +From 8f1066348d4cbedfa7a6ae3563aa61d01f56b4b3 Mon Sep 17 00:00:00 2001 From: Lee Daly Date: Thu, 1 Nov 2018 11:48:19 +0000 Subject: [PATCH] compress/isal: fix uncleared compression states +[ upstream commit 1713ad8bc5578db230830c3713d140184b364a3d ] + Fixing uncleared states of compression & decompression engines post op. Fixes: 788e748d3845 ("compress/isal: support chained mbufs") Fixes: dc49e6aa4879 ("compress/isal: add ISA-L compression functionality") Fixes: 7bf4f0630af6 ("compress/isal: add ISA-L decomp functionality") -Cc: stable@dpdk.org Signed-off-by: Lee Daly ---