From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id EE4A95F32 for ; Wed, 20 Jun 2018 00:15:24 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2018 15:15:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,244,1526367600"; d="scan'208";a="59134697" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga002.fm.intel.com with ESMTP; 19 Jun 2018 15:15:22 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.139]) by IRSMSX103.ger.corp.intel.com ([169.254.3.136]) with mapi id 14.03.0319.002; Tue, 19 Jun 2018 23:15:22 +0100 From: "De Lara Guarch, Pablo" To: Shally Verma CC: "Trahe, Fiona" , "dev@dpdk.org" , "pathreya@caviumnetworks.com" , "mchalla@caviumnetworks.com" , Ashish Gupta , Sunila Sahu Thread-Topic: [PATCH v1 2/7] compress/octeontx: add device setup PMD ops Thread-Index: AQHT/LkQYXQk+HRps0e9xriUqf0IbKRoNUGA Date: Tue, 19 Jun 2018 22:15:20 +0000 Message-ID: References: <1528194913-25893-1-git-send-email-shally.verma@caviumnetworks.com> <1528194913-25893-3-git-send-email-shally.verma@caviumnetworks.com> In-Reply-To: <1528194913-25893-3-git-send-email-shally.verma@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODUxYWYwYTgtNGFlMS00OTQ5LTg5NjItYTA1NDIyM2Y3OGRkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRlFOM2lzVExpZ29sQU5Ga2ZoUFwvUnpDTVRKMXdVR3dESm96SDBzUEFFbzVkWXk2NTdGUExjeWFmbEpcL3ROXC83aiJ9 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 v1 2/7] compress/octeontx: add device setup PMD ops 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, 19 Jun 2018 22:15:25 -0000 > -----Original Message----- > From: Shally Verma [mailto:shally.verma@caviumnetworks.com] > Sent: Tuesday, June 5, 2018 11:35 AM > To: De Lara Guarch, Pablo > Cc: Trahe, Fiona ; dev@dpdk.org; > pathreya@caviumnetworks.com; mchalla@caviumnetworks.com; Ashish Gupta > ; Sunila Sahu > > Subject: [PATCH v1 2/7] compress/octeontx: add device setup PMD ops >=20 > implement device configure and PMD ops. > setup stream resource memory pool > setup and enable hardware queue >=20 > Signed-off-by: Ashish Gupta > Signed-off-by: Shally Verma > Signed-off-by: Sunila Sahu > --- > drivers/compress/octeontx/include/zip_regs.h | 721 > +++++++++++++++++++++++++++ > drivers/compress/octeontx/zip_pmd.c | 269 ++++++++++ > drivers/compress/octeontx/zipvf.c | 81 +++ > drivers/compress/octeontx/zipvf.h | 103 ++++ > 4 files changed, 1174 insertions(+) .. > diff --git a/drivers/compress/octeontx/zip_pmd.c > b/drivers/compress/octeontx/zip_pmd.c > index 1181bed19..3bb7f6896 100644 > --- a/drivers/compress/octeontx/zip_pmd.c > +++ b/drivers/compress/octeontx/zip_pmd.c ... > + > +/** Start device */ > +static int > +zip_pmd_start(struct rte_compressdev *dev) { > + if (dev =3D=3D NULL) > + return -1; > + return 0; > +} Dev cannot be NULL at this stage, so no need to have this check. > + > +/** Stop device */ > +static void > +zip_pmd_stop(__rte_unused struct rte_compressdev *dev) { > + > +} > + > +/** Close device */ > +static int > +zip_pmd_close(struct rte_compressdev *dev) { > + if (dev =3D=3D NULL) > + return -1; Same as above. > + > + struct zip_vf *vf =3D (struct zip_vf *)dev->data->dev_private; > + > + for (int i =3D 0; dev->data->nb_queue_pairs; i++) { > + if (dev->data->queue_pairs[i] !=3D NULL) > + /* qp not released, return error */ > + return -1; All queue pairs should be released at this point, so not sure this check is= required. If it is, don't forget the indentation. > + } > + > + rte_mempool_free(vf->zip_mp); > + return 0; > +} > + >=20