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 BD0B723C for ; Thu, 3 May 2018 23:37:54 +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; 03 May 2018 14:37:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,360,1520924400"; d="scan'208";a="52230172" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by fmsmga001.fm.intel.com with ESMTP; 03 May 2018 14:37:52 -0700 Received: from irsmsx156.ger.corp.intel.com (10.108.20.68) by IRSMSX101.ger.corp.intel.com (163.33.3.153) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 3 May 2018 22:37:51 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.150]) by IRSMSX156.ger.corp.intel.com ([169.254.3.233]) with mapi id 14.03.0319.002; Thu, 3 May 2018 22:37:51 +0100 From: "De Lara Guarch, Pablo" To: "Daly, Lee" , "dev@dpdk.org" CC: "Tucker, Greg B" , "Jain, Deepak K" , "Trahe, Fiona" Thread-Topic: [PATCH v4 08/10] compress/isal: add ISA-L compression functionality Thread-Index: AQHT3oEAeUEa5neTrEGuOBsHIoieD6Qej7hg Date: Thu, 3 May 2018 21:37:49 +0000 Message-ID: References: <1523972132-6894-12-git-send-email-lee.daly@intel.com> <1524872313-196340-1-git-send-email-lee.daly@intel.com> <1524872313-196340-9-git-send-email-lee.daly@intel.com> In-Reply-To: <1524872313-196340-9-git-send-email-lee.daly@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmM5MTAwNjAtNjZhZi00YTBmLTg4Y2QtOTkzODc3YTMzNWQwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InJCU2pMWVJ6YWZ4UUpMeUh6WjNHOHFMdkFHbUJ6enlHdnBzXC9YMys1U2pvPSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 08/10] compress/isal: add ISA-L compression functionality 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, 03 May 2018 21:37:55 -0000 Hi Lee, > -----Original Message----- > From: Daly, Lee > Sent: Saturday, April 28, 2018 12:39 AM > To: dev@dpdk.org > Cc: De Lara Guarch, Pablo ; Tucker, Greg = B > ; Jain, Deepak K ; Trah= e, > Fiona ; Daly, Lee > Subject: [PATCH v4 08/10] compress/isal: add ISA-L compression functional= ity >=20 > Adds compression functionality, this sets internal ISA-L structures, prov= ides input > & output mbuf addresses, executes compression, which ISA-L calls deflate,= and > finally error checks. >=20 > Signed-off-by: Lee Daly > --- > drivers/compress/isal/isal_compress_pmd.c | 93 > ++++++++++++++++++++++- > drivers/compress/isal/isal_compress_pmd_ops.c | 28 +++++++ > drivers/compress/isal/isal_compress_pmd_private.h | 2 + > 3 files changed, 121 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/compress/isal/isal_compress_pmd.c > b/drivers/compress/isal/isal_compress_pmd.c > index b13822a..e09fd3f 100644 > --- a/drivers/compress/isal/isal_compress_pmd.c > +++ b/drivers/compress/isal/isal_compress_pmd.c > @@ -6,6 +6,7 @@ > #include > #include > #include > +#include > #include >=20 > #include "isal_compress_pmd_private.h" > @@ -208,14 +209,102 @@ isal_comp_set_priv_xform_parameters(struct > isal_priv_xform *priv_xform, > return 0; > } >=20 > +/* Stateless Compression Function */ > +static int > +process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp, > + struct isal_priv_xform *priv_xform) > +{ > + int ret =3D 0; > + op->status =3D RTE_COMP_OP_STATUS_SUCCESS; > + > + /* Required due to init clearing level_buf */ > + uint8_t *temp_level_buf =3D qp->stream->level_buf; > + > + /* Initialize compression stream */ > + isal_deflate_stateless_init(qp->stream); > + > + qp->stream->level_buf =3D temp_level_buf; > + > + qp->stream->flush =3D NO_FLUSH; Worth putting a comment here saying why you are not using the flush flag fr= om op. > + > + /* Set op checksum, none by default */ > + qp->stream->gzip_flag =3D priv_xform->compress.chksum; > + ... > + } > + > + if (ret !=3D COMP_OK) { > + op->status =3D RTE_COMP_OP_STATUS_ERROR; > + return ret; > + } > + > + op->consumed =3D op->src.length - qp->stream->avail_in; Could you use qp->stream->total_in here? Looks simpler.