From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 3664F5689 for ; Wed, 27 Mar 2019 18:44:42 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Mar 2019 10:44:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,277,1549958400"; d="scan'208";a="144378855" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 27 Mar 2019 10:44:40 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 27 Mar 2019 10:44:40 -0700 Received: from hasmsx108.ger.corp.intel.com (10.184.198.18) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 27 Mar 2019 10:44:39 -0700 Received: from hasmsx111.ger.corp.intel.com ([169.254.5.74]) by hasmsx108.ger.corp.intel.com ([169.254.9.237]) with mapi id 14.03.0415.000; Wed, 27 Mar 2019 19:44:37 +0200 From: "Cel, TomaszX" To: "dev@dpdk.org" , Akhil Goyal , "Daly, Lee" Thread-Topic: [dpdk-dev] [PATCH] compress/isal: add appropriate flag on overflow Thread-Index: AQHUs/hRrruhe5XUQmCE/oIc6VgjsaYgAN+ggAAfDoA= Date: Wed, 27 Mar 2019 17:44:37 +0000 Message-ID: References: <1548343153-62336-1-git-send-email-lee.daly@intel.com> <6976F642F4CB7B4C9D17DE41C99F326019177641@hasmsx107.ger.corp.intel.com> In-Reply-To: <6976F642F4CB7B4C9D17DE41C99F326019177641@hasmsx107.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGY2Nzg4MWQtZmM5Ni00M2U0LTg4N2YtM2QwYjU2ZDY3MGZlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVkZpeTdta0VHaVliWlwvMnE3MHZIRkpOT2U3UDR4ejZcL1hkU2x5RFJZUEVPZXYzSXU1VnpXVVdSdCthVlFjS25LIn0= dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.103.104.47] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Wed, 27 Mar 2019 17:44:42 -0000 Hi Lee, > 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. >=20 > Signed-off-by: Lee Daly > --- > drivers/compress/isal/isal_compress_pmd.c | 20 ++++++++++++++------ > 1 file changed, 14 insertions(+), 6 deletions(-) >=20 > 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) >=20 > ret =3D isal_inflate(qp->state); >=20 > - if (ret !=3D ISAL_DECOMP_OK) { > - ISAL_PMD_LOG(ERR, "Decompression operation > failed\n"); > - op->status =3D RTE_COMP_OP_STATUS_ERROR; > - return ret; > - } > - > /* Check for first segment, offset needs to be accounted for > */ > if (remaining_data =3D=3D op->src.length) { > consumed_data =3D src->data_len - > src_remaining_offset; @@ -374,6 +368,20 @@ > chained_mbuf_decompression(struct rte_comp_op *op, struct > isal_comp_qp *qp) > } > } >=20 > + if (ret =3D=3D 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 =3D > + > RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE; > + return ret; > + } else if (ret < 0) { > + ISAL_PMD_LOG(ERR, "Decompression operation > failed\n"); > + op->status =3D RTE_COMP_OP_STATUS_ERROR; > + return ret; > + } > + > if (qp->state->avail_out =3D=3D 0 && > qp->state->block_state !=3D > ISAL_BLOCK_FINISH) { > if (dst->next !=3D NULL) { > -- Tested-by: Tomasz Cel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 40707A05D3 for ; Wed, 27 Mar 2019 18:44:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E29765689; Wed, 27 Mar 2019 18:44:43 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 3664F5689 for ; Wed, 27 Mar 2019 18:44:42 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Mar 2019 10:44:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,277,1549958400"; d="scan'208";a="144378855" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 27 Mar 2019 10:44:40 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 27 Mar 2019 10:44:40 -0700 Received: from hasmsx108.ger.corp.intel.com (10.184.198.18) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 27 Mar 2019 10:44:39 -0700 Received: from hasmsx111.ger.corp.intel.com ([169.254.5.74]) by hasmsx108.ger.corp.intel.com ([169.254.9.237]) with mapi id 14.03.0415.000; Wed, 27 Mar 2019 19:44:37 +0200 From: "Cel, TomaszX" To: "dev@dpdk.org" , Akhil Goyal , "Daly, Lee" Thread-Topic: [dpdk-dev] [PATCH] compress/isal: add appropriate flag on overflow Thread-Index: AQHUs/hRrruhe5XUQmCE/oIc6VgjsaYgAN+ggAAfDoA= Date: Wed, 27 Mar 2019 17:44:37 +0000 Message-ID: References: <1548343153-62336-1-git-send-email-lee.daly@intel.com> <6976F642F4CB7B4C9D17DE41C99F326019177641@hasmsx107.ger.corp.intel.com> In-Reply-To: <6976F642F4CB7B4C9D17DE41C99F326019177641@hasmsx107.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGY2Nzg4MWQtZmM5Ni00M2U0LTg4N2YtM2QwYjU2ZDY3MGZlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVkZpeTdta0VHaVliWlwvMnE3MHZIRkpOT2U3UDR4ejZcL1hkU2x5RFJZUEVPZXYzSXU1VnpXVVdSdCthVlFjS25LIn0= dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.103.104.47] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190327174437.reyi5zqlS7k5xT3w9W0BIQioJirylA5SX1CfITA865s@z> Hi Lee, > 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. >=20 > Signed-off-by: Lee Daly > --- > drivers/compress/isal/isal_compress_pmd.c | 20 ++++++++++++++------ > 1 file changed, 14 insertions(+), 6 deletions(-) >=20 > 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) >=20 > ret =3D isal_inflate(qp->state); >=20 > - if (ret !=3D ISAL_DECOMP_OK) { > - ISAL_PMD_LOG(ERR, "Decompression operation > failed\n"); > - op->status =3D RTE_COMP_OP_STATUS_ERROR; > - return ret; > - } > - > /* Check for first segment, offset needs to be accounted for > */ > if (remaining_data =3D=3D op->src.length) { > consumed_data =3D src->data_len - > src_remaining_offset; @@ -374,6 +368,20 @@ > chained_mbuf_decompression(struct rte_comp_op *op, struct > isal_comp_qp *qp) > } > } >=20 > + if (ret =3D=3D 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 =3D > + > RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE; > + return ret; > + } else if (ret < 0) { > + ISAL_PMD_LOG(ERR, "Decompression operation > failed\n"); > + op->status =3D RTE_COMP_OP_STATUS_ERROR; > + return ret; > + } > + > if (qp->state->avail_out =3D=3D 0 && > qp->state->block_state !=3D > ISAL_BLOCK_FINISH) { > if (dst->next !=3D NULL) { > -- Tested-by: Tomasz Cel