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 755BB4C93 for ; Thu, 24 Jan 2019 16:19:53 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2019 07:19:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,516,1539673200"; d="scan'208";a="313149144" Received: from silpixa00399501.ir.intel.com ([10.237.223.69]) by fmsmga006.fm.intel.com with ESMTP; 24 Jan 2019 07:19:41 -0800 From: Lee Daly To: dev@dpdk.org Cc: akhil.goyal@nxp.com, Lee Daly Date: Thu, 24 Jan 2019 15:19:13 +0000 Message-Id: <1548343153-62336-1-git-send-email-lee.daly@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] compress/isal: add appropriate flag on overflow 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: Thu, 24 Jan 2019 15:19:53 -0000 This patch will change the operation status when ISA-L returns because of a recoverable out of space error, rather than a just generic fail. Signed-off-by: Lee Daly --- drivers/compress/isal/isal_compress_pmd.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c index 4748238..19c4d70 100644 --- a/drivers/compress/isal/isal_compress_pmd.c +++ b/drivers/compress/isal/isal_compress_pmd.c @@ -348,12 +348,6 @@ 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 - src_remaining_offset; @@ -374,6 +368,20 @@ chained_mbuf_decompression(struct rte_comp_op *op, struct isal_comp_qp *qp) } } + if (ret == ISAL_OUT_OVERFLOW) { + ISAL_PMD_LOG(ERR, "Decompression operation ran " + "out of space, but can be recovered.\n%d bytes " + "consumed\t%d bytes produced\n", + consumed_data, qp->state->total_out); + op->status = + RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE; + return ret; + } else if (ret < 0) { + ISAL_PMD_LOG(ERR, "Decompression operation failed\n"); + op->status = RTE_COMP_OP_STATUS_ERROR; + return ret; + } + if (qp->state->avail_out == 0 && qp->state->block_state != ISAL_BLOCK_FINISH) { if (dst->next != NULL) { -- 2.7.4