From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700052.outbound.protection.outlook.com [40.107.70.52]) by dpdk.org (Postfix) with ESMTP id BB69DF72 for ; Tue, 24 Jul 2018 10:22:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LSBA1CAvfHuDLeC/1+sH2dTv+kD4waqsPS5710aDlSk=; b=Hr+/n/AQVe91fbUox8E7DQudgE+s1H3T+pPQbI+0uoCCRzitUSRjS6qzgRDQj9AwuUE1W5scb8MhZP8pwYq3ZzJpjy8JXT7hOAtr9RdsE4O+c2utgQUhZjybVRYp/CUy76vGbaN2N2Rrb9wZjqmr+MbHMEEb1C1mBjO8IHHArx4= Received: from CY4PR0701MB3634.namprd07.prod.outlook.com (52.132.101.164) by CY4PR0701MB3764.namprd07.prod.outlook.com (52.132.102.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.20; Tue, 24 Jul 2018 08:22:05 +0000 Received: from CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f0d4:1828:37f5:5927]) by CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f0d4:1828:37f5:5927%2]) with mapi id 15.20.0973.022; Tue, 24 Jul 2018 08:22:04 +0000 From: "Verma, Shally" To: "De Lara Guarch, Pablo" , "Gupta, Ashish" CC: "dev@dpdk.org" , "Athreya, Narayana Prasad" , "Challa, Mahipal" , "Sahu, Sunila" Thread-Topic: [PATCH v3 4/6] compress/octeontx: add ops enq deq apis Thread-Index: AQHUIFl2p9sKXoTDxk+bBP2NVUuYMKSda6MAgACiAkA= Date: Tue, 24 Jul 2018 08:22:04 +0000 Message-ID: References: <20180720190447.7979-1-Ashish.Gupta@caviumnetworks.com> <20180720190447.7979-5-Ashish.Gupta@caviumnetworks.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Shally.Verma@cavium.com; x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR0701MB3764; 6:p6wsicAVSNKCUy15ypz70w4qFECgqyyRb/JPuZ0RP3W2ruxQhqbIA4o6AstXhlS79abH2C0aGiIaeG9SkcWcl8thWRQKfJUbEosoCPWiIlCWqAVAtqlEChnFix1eduJFG4vkwxZoVejLpiNr75LlW4LfxWI1FoVZ79wb2xU1qGF7T79Zch8cKtmmYltlfxo7w3rkDk9Nqy3sfiMaNm6Zg8CElvXiuSWoDSjOtRBrriq2F17U8Nw/2VSquPs6NyZtR8Eh326lKHl9gr9V9SGsGLLGSUsCJdVKQSBglRPvQSGnCcnIqgGir5ecUSnEp986m4uPLJpZ6a2Wse9y5fBEQPGojnZ5EcCmak4HAgCVMa4q/QlVb05ow9XHvwzokjrSGmPqo/vBHTJCV8vDKcUNVfkC4LdQarvC3WwBy4kpAhE3tiT9Kice7GKLOIlMBCiqKLmVIzHSyvka92je8lX2ZA==; 5:A5E6V25TBEFForbPPWmrgFfNWbYtpdoMVwkR5RTwjf11Rs/9qap7Ln0qMq2le2RIcX06ltM9LxbgbARvxKKTBzz956CrdTDzyC8C7G6DO69UmXmwyK2zRYlvrhYfXLqr9KDLOfyFFQTIiSUsJLsZV4ZRhvZzX3X3c8yqr/dcwHQ=; 7:qo2adoR8dxmeSMHzv30rDf3PdEUdygj6vpnEj34QePNYQNDvO/eZS6Ds+g5F4RLLXb8qAEqi0H8Sko5TMS3iRhIppAxadOzKptPuvi3py3oYQQ39lbEEPOwFtMJU2zXGpDCM2YQbXgMCC4ZpYW6kqHV4ZEVpOYYLYZpGcsMZBqrFcQMbceTdVVXDwolFF9SFyxLSbxaVQl7ls7bVmvIg+NiwTI6+HC4K/qbYqVVwBgSfe0aNYRc6uCu/kZabWXZB x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(366004)(39860400002)(376002)(346002)(396003)(136003)(13464003)(199004)(189003)(43544003)(6636002)(305945005)(102836004)(14444005)(68736007)(72206003)(53546011)(8676002)(55236004)(6506007)(81166006)(76176011)(186003)(478600001)(81156014)(7696005)(256004)(476003)(316002)(86362001)(25786009)(6116002)(4326008)(11346002)(26005)(53936002)(5250100002)(446003)(74316002)(33656002)(2906002)(6436002)(105586002)(14454004)(97736004)(7736002)(9686003)(99286004)(66066001)(3846002)(107886003)(55016002)(106356001)(2900100001)(486006)(8936002)(5660300001)(110136005)(6246003)(229853002)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3764; H:CY4PR0701MB3634.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-office365-filtering-correlation-id: de36013d-6a34-40a0-37c5-08d5f13e8a01 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:CY4PR0701MB3764; x-ms-traffictypediagnostic: CY4PR0701MB3764: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:CY4PR0701MB3764; BCL:0; PCL:0; RULEID:; SRVR:CY4PR0701MB3764; x-forefront-prvs: 0743E8D0A6 received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: y8diSr2Mo1ebkZa4vqzSFCEqd/9GRqIcc/GxH7Ol4NCQHybbwq+D22qOsXjBVFeX9av+Fji4bGZS1V9l4qzDVAq4xMIV7keZOQmlDKdPGM8QOnRxc4ryUGmFymwwXUjdJCOssVQmvF0J0b1NTAbdXNTPiBTQMQQ+qoXfDZvpdV+E8iIwFrimhuGM90c/+JQ9cBwonzyNLIYW9TGwkzpM5LsCGYzy46jskYe2fdJaF/g7cr4D1yjE44eXu7eOePeaBr0aM6B5FVt0ajXlATZzSbwuSAiBhnpE//Y/3f3ck7n51/eBLZ27wECDt3hjNFy2moy/TIbrLXj9lVuX9IhPBvUSvOn0VPdgPiivAZV/Xq4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: de36013d-6a34-40a0-37c5-08d5f13e8a01 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2018 08:22:04.7784 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3764 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: Tue, 24 Jul 2018 08:22:07 -0000 >-----Original Message----- >From: De Lara Guarch, Pablo >Sent: 24 July 2018 04:11 >To: Gupta, Ashish >Cc: dev@dpdk.org; Athreya, Narayana Prasad ; Challa, Mahipal >; Verma, Shally ; Sahu= , Sunila >Subject: RE: [PATCH v3 4/6] compress/octeontx: add ops enq deq apis > >External Email > >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 >> >> Add enqueue/dequeue APIs to perform compression/decompression operations >> >> 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(+) >> > >... > >> int >> zipvf_create(struct rte_compressdev *compressdev) { diff --git >> a/drivers/compress/octeontx/otx_zip.h b/drivers/compress/octeontx/otx_zi= p.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 = in the capabilities. >Now that the SGL tests are available, you should check if the PMD passes t= he tests >and update the capabilities accordingly. > >Also, you should take into account if offset is big enough to cross bounda= ries >between segments (so first segment to be compressed/decompressed is not th= e 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. Ok. Will take care when we add SGL support. Right now, we're planning to ma= ke 1st release with Linear buffer support only. Thanks Shally > >> + 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); >> + } >> + >>