From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id CBA3898 for ; Tue, 24 Jul 2018 00:40:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jul 2018 15:40:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,394,1526367600"; d="scan'208";a="57285181" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by fmsmga008.fm.intel.com with ESMTP; 23 Jul 2018 15:40:35 -0700 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.193]) by IRSMSX106.ger.corp.intel.com ([169.254.8.211]) with mapi id 14.03.0319.002; Mon, 23 Jul 2018 23:40:35 +0100 From: "De Lara Guarch, Pablo" To: Ashish Gupta CC: "dev@dpdk.org" , "narayanaprasad.athreya@cavium.com" , "mahipal.challa@cavium.com" , Shally Verma , Sunila Sahu Thread-Topic: [PATCH v3 4/6] compress/octeontx: add ops enq deq apis Thread-Index: AQHUIFmDqYliqwT39UW2ZicJ0WjvdqSdabhQ Date: Mon, 23 Jul 2018 22:40:34 +0000 Message-ID: References: <20180720190447.7979-1-Ashish.Gupta@caviumnetworks.com> <20180720190447.7979-5-Ashish.Gupta@caviumnetworks.com> In-Reply-To: <20180720190447.7979-5-Ashish.Gupta@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODg2OThjNTgtYWUwZS00OWM3LWJkMDAtNWNmZThjZmIxMTk5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidTdQVG9rV0IrV09ZSG1LV25WeklZbnZ5TDUxKytqd3VTeW5WaHgyNCtIeG5oRXdsNFdObk9nNUtnNUNsOHFiQyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 4/6] compress/octeontx: add ops enq deq apis 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: Mon, 23 Jul 2018 22:40:43 -0000 Hi Ashish, > -----Original Message----- > From: Ashish Gupta [mailto:Ashish.Gupta@caviumnetworks.com] > Sent: Friday, July 20, 2018 8:05 PM > To: De Lara Guarch, Pablo > Cc: dev@dpdk.org; narayanaprasad.athreya@cavium.com; > mahipal.challa@cavium.com; Ashish Gupta > ; Shally Verma > ; Sunila Sahu > > Subject: [PATCH v3 4/6] compress/octeontx: add ops enq deq apis >=20 > Add enqueue/dequeue APIs to perform compression/decompression operations >=20 > Signed-off-by: Ashish Gupta > Signed-off-by: Shally Verma > Signed-off-by: Sunila Sahu > --- > drivers/compress/octeontx/otx_zip.c | 49 +++++++++ > drivers/compress/octeontx/otx_zip.h | 169 > ++++++++++++++++++++++++++++++++ > drivers/compress/octeontx/otx_zip_pmd.c | 119 ++++++++++++++++++++++ > 3 files changed, 337 insertions(+) >=20 ... > int > zipvf_create(struct rte_compressdev *compressdev) { diff --git > a/drivers/compress/octeontx/otx_zip.h b/drivers/compress/octeontx/otx_zip= .h > index 3fcd86a86..73a99e624 100644 > --- a/drivers/compress/octeontx/otx_zip.h > +++ b/drivers/compress/octeontx/otx_zip.h ... > + > +static inline int > +zipvf_prepare_in_buf(struct zip_stream *zstrm, struct rte_comp_op *op) > +{ > + uint32_t offset, inlen; > + union zip_zptr_s *sg_list =3D NULL; > + struct rte_mbuf *m_src; > + union zip_inst_s *inst =3D zstrm->inst; > + rte_iova_t iova; > + > + inlen =3D op->src.length; > + offset =3D op->src.offset; > + m_src =3D op->m_src; > + > + if (m_src->nb_segs =3D=3D 1) { > + /* Prepare direct input data pointer */ > + inst->s.dg =3D 0; > + inst->s.inp_ptr_addr.s.addr =3D > + rte_pktmbuf_iova_offset(m_src, offset); > + inst->s.inp_ptr_ctl.s.length =3D inlen; > + return 0; > + } > + > + ZIP_PMD_INFO("Input packet is segmented\n"); > + > + /* Packet is segmented, create gather buffer */ Looks like you actually support SGL, even though you are not setting that i= n the capabilities. Now that the SGL tests are available, you should check if the PMD passes th= e tests and update the capabilities accordingly. Also, you should take into account if offset is big enough to cross boundar= ies between segments (so first segment to be compressed/decompressed is not the= first segment of the SGL). Look at the comments that I made in the ZLIB PMD (partly based on comments = left in the ISAL PMD), since they should apply to this case too. > + inst->s.dg =3D 1; > + iova =3D rte_mempool_virt2iova(zstrm->bufs[IN_DATA_BUF]); > + if (iova & 0xF) { > + /* Align it to 16 Byte address */ > + iova =3D ZIP_ALIGN_ROUNDUP(iova, ZIP_SGPTR_ALIGN); > + } > + >=20