From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id D038BB62 for ; Thu, 3 May 2018 23:46:32 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 May 2018 14:46:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,360,1520924400"; d="scan'208";a="46592029" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by FMSMGA003.fm.intel.com with ESMTP; 03 May 2018 14:46:30 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.150]) by IRSMSX102.ger.corp.intel.com ([169.254.2.83]) with mapi id 14.03.0319.002; Thu, 3 May 2018 22:46:30 +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 06/10] compress/isal: support enqueue/dequeue api Thread-Index: AQHT3oEA4xWyu2UhP0+iXQRn4LyEFqQekp3g Date: Thu, 3 May 2018 21:46:29 +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-7-git-send-email-lee.daly@intel.com> In-Reply-To: <1524872313-196340-7-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmMyOWVjNTMtZTBiOS00MWJmLWFmMjMtZmMwMDRmMjIxZGViIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IlYrcExkVUZENTNnSGV4NjEyVlJ4VVlxWElBeTJZU1d0VElTYjI0VThzbU09In0= 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 06/10] compress/isal: support enqueue/dequeue api 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:46:33 -0000 > -----Original Message----- > From: Daly, Lee > Sent: Saturday, April 28, 2018 12:38 AM > To: dev@dpdk.org > Cc: De Lara Guarch, Pablo ; Tucker, Greg = B > ; Jain, Deepak K ; Trah= e, > Fiona ; Daly, Lee > Subject: [PATCH v4 06/10] compress/isal: support enqueue/dequeue api >=20 > This patchs adds support for the compressdev enqueue_burst and > dequeue_burst API operations. >=20 > Signed-off-by: Lee Daly > --- > drivers/compress/isal/isal_compress_pmd.c | 64 > +++++++++++++++++++++++++++ > drivers/compress/isal/isal_compress_pmd_ops.c | 2 + > 2 files changed, 66 insertions(+) >=20 > diff --git a/drivers/compress/isal/isal_compress_pmd.c > b/drivers/compress/isal/isal_compress_pmd.c > index 325867b..b13822a 100644 > --- a/drivers/compress/isal/isal_compress_pmd.c > +++ b/drivers/compress/isal/isal_compress_pmd.c > @@ -208,6 +208,66 @@ isal_comp_set_priv_xform_parameters(struct > isal_priv_xform *priv_xform, > return 0; > } >=20 > +/* Process compression/decompression operation */ static int > +process_op(struct isal_comp_qp *qp __rte_unused, > + struct rte_comp_op *op __rte_unused, > + struct isal_priv_xform *priv_xform) > +{ > + switch (priv_xform->type) { > + case RTE_COMP_COMPRESS: > + break; > + case RTE_COMP_DECOMPRESS: > + break; > + default: > + ISAL_PMD_LOG(ERR, "Operation Not Supported\n"); > + return -ENOTSUP; > + } > + return 0; > +} > + > +/* Enqueue burst */ > +static uint16_t > +isal_comp_pmd_enqueue_burst(void *queue_pair, struct rte_comp_op **ops, > + uint16_t nb_ops) > +{ > + struct isal_comp_qp *qp =3D queue_pair; > + uint16_t i; > + int retval; > + int16_t num_enq =3D RTE_MIN(qp->num_free_elements, nb_ops); > + > + for (i =3D 0; i < num_enq; i++) { Before calling process_op, check if the operation is a stateless op, since private_xform is only used with stateless ops and if not, set the status to= error and continue with the next op. > + retval =3D process_op(qp, ops[i], ops[i]->private_xform);