From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0067.outbound.protection.outlook.com [104.47.42.67]) by dpdk.org (Postfix) with ESMTP id 727831B457 for ; Wed, 20 Jun 2018 08:04:55 +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=QTosXpDg7CYngnOCgjDCl3fLhnGF2VGHOFAH21LDFak=; b=VpQa58kYj7nD9+9lAkU50AWwtOA1waJfqmuzwVvXHI7JgUfcmmQVYOe+ITuSkiZc1xqHJDnxQ0DQlLlxFirr+rfHM9DRElXmshVEly6/rbm2qDiXU5eY79nHO1gbaMc+w0RrIPZNXnh9DX8onr64IOcuVnm/A8ahJfcZKO+AkAQ= Received: from CY4PR0701MB3634.namprd07.prod.outlook.com (52.132.101.164) by CY4PR0701MB3636.namprd07.prod.outlook.com (52.132.102.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.19; Wed, 20 Jun 2018 06:04:53 +0000 Received: from CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f55a:7354:8d2f:cf0b]) by CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f55a:7354:8d2f:cf0b%2]) with mapi id 15.20.0863.016; Wed, 20 Jun 2018 06:04:52 +0000 From: "Verma, Shally" To: "De Lara Guarch, Pablo" CC: "Trahe, Fiona" , "dev@dpdk.org" , "Athreya, Narayana Prasad" , "Challa, Mahipal" , "Gupta, Ashish" , "Sahu, Sunila" Thread-Topic: [PATCH v1 2/7] compress/octeontx: add device setup PMD ops Thread-Index: AQHUCBsG9Ewts4ow8Eu6m2SCwZEoRaRoqVxA Date: Wed, 20 Jun 2018 06:04:52 +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: 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; CY4PR0701MB3636; 7:iXKD1YGL5IH2G2eoXllMc/yBvowvKs8DzDG9W6yXkhzTvsKTdOHH/6adQ0FpanEKtfM+GOMQVhvIvVK8tGn20Ir0+Q/hX70adCp4aJPex04x0mPTlJ+Hj33G7AyYWQ4CnefLTUQ/UAojH4jwqyT/SNxgXJGTUf4mwxMWU7pDKfupuojmiRE+HDwArmn111hiO6XiwaBo5GxQp3PUs7zCjToxm+gQlDJAZXZkRlUlKukV50ylcg+8YlSlh2C2eHH0 x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(346002)(396003)(366004)(39380400002)(39860400002)(376002)(199004)(189003)(13464003)(5660300001)(3280700002)(59450400001)(72206003)(7696005)(26005)(6506007)(55236004)(76176011)(3660700001)(53546011)(102836004)(2900100001)(316002)(305945005)(74316002)(186003)(5250100002)(99286004)(6116002)(33656002)(3846002)(86362001)(2906002)(54906003)(478600001)(6916009)(14454004)(7736002)(97736004)(6436002)(106356001)(229853002)(476003)(8676002)(53936002)(105586002)(55016002)(107886003)(6246003)(68736007)(25786009)(4326008)(81156014)(81166006)(8936002)(486006)(9686003)(11346002)(446003)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3636; H:CY4PR0701MB3634.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-office365-filtering-correlation-id: 7d48d1fa-266e-42ce-a17a-08d5d673bd55 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:CY4PR0701MB3636; x-ms-traffictypediagnostic: CY4PR0701MB3636: 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)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:CY4PR0701MB3636; BCL:0; PCL:0; RULEID:; SRVR:CY4PR0701MB3636; x-forefront-prvs: 070912876F received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: MLtyIrBIyn7IbPczGL8jPj0f7iCyf+kBZLY3ymAs3WaGZf8qoEzTmR7X94ktmyFEOfqr12sqVeAtoSTZa7bcOvh/K6OmBVs88z/W7Sk6KNhtbN4Rr53D9MqjZh40jhJUi9naQFjC/pW5p5xVixXp8ohV/uSlysf7d8WF27XX9G9GHNhzkZLMmT8kCfwbAQ698tRGuLOmuI+DYu3Q8H4vEC4mjGmaGwl3qh4tfQ5SSB+z++soQNUhpDO1FCcThlSQZhhUzM60p/4mQMffxTCDOc6cpBtPO8SsNPxhHb/1E/DBkKZt0WKhA0wd1dob8mvOiU19bFBTdwahSFxQRR2UUg== 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: 7d48d1fa-266e-42ce-a17a-08d5d673bd55 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jun 2018 06:04:52.8257 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3636 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: Wed, 20 Jun 2018 06:04:56 -0000 >-----Original Message----- >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] >Sent: 20 June 2018 03:45 >To: Verma, Shally >Cc: Trahe, Fiona ; dev@dpdk.org; Athreya, Narayana = Prasad ; >Challa, Mahipal ; Gupta, Ashish ; Sahu, Sunila > >Subject: RE: [PATCH v1 2/7] compress/octeontx: add device setup PMD ops > >External Email > >> -----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 >> >> implement device configure and PMD ops. >> setup stream resource memory pool >> setup and enable hardware queue >> >> 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 i= s required. >If it is, don't forget the indentation. > [Shally] Ack to all.=20 Thanks for review. Shally >> + } >> + >> + rte_mempool_free(vf->zip_mp); >> + return 0; >> +} >> + >>