From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 2053C2BB1 for ; Sat, 14 Jul 2018 00:21:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jul 2018 15:21:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,349,1526367600"; d="scan'208";a="215864809" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by orsmga004.jf.intel.com with ESMTP; 13 Jul 2018 15:21:38 -0700 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.193]) by irsmsx105.ger.corp.intel.com ([169.254.7.201]) with mapi id 14.03.0319.002; Fri, 13 Jul 2018 23:21:37 +0100 From: "De Lara Guarch, Pablo" To: Shally Verma CC: "dev@dpdk.org" , "pathreya@caviumnetworks.com" , "mchalla@caviumnetworks.com" , Sunila Sahu , Ashish Gupta Thread-Topic: [PATCH v2 2/6] compress/octeontx: add device setup PMD ops Thread-Index: AQHUEiWRI0PoGaK+F0mZYCBxatnJTqSNpcYQ Date: Fri, 13 Jul 2018 22:21:36 +0000 Message-ID: References: <1530550477-22444-1-git-send-email-shally.verma@caviumnetworks.com> <1530550477-22444-3-git-send-email-shally.verma@caviumnetworks.com> In-Reply-To: <1530550477-22444-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmQ3MGNlMTYtYWVjNS00ZGM3LTgwYzYtYmI0N2Q0OGJmMjAwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSWx1ZjVGUldZblJRNjZxUGpiOHh5bHFjRzdZWXgyNjhWTzhsQ3RvZEEzNlBlYTNpcXdoRlNWMlJmbU81QmFGNyJ9 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 v2 2/6] 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: Fri, 13 Jul 2018 22:21:43 -0000 > -----Original Message----- > From: Shally Verma [mailto:shally.verma@caviumnetworks.com] > Sent: Monday, July 2, 2018 5:55 PM > To: De Lara Guarch, Pablo > Cc: dev@dpdk.org; pathreya@caviumnetworks.com; > mchalla@caviumnetworks.com; Sunila Sahu > ; Ashish Gupta > > Subject: [PATCH v2 2/6] compress/octeontx: add device setup PMD ops >=20 > From: Sunila Sahu >=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/zip_pmd.c | 251 > ++++++++++++++++++++++++++++++++++++ > drivers/compress/octeontx/zipvf.c | 73 +++++++++++ > drivers/compress/octeontx/zipvf.h | 56 +++++++- > 3 files changed, 378 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/compress/octeontx/zip_pmd.c > b/drivers/compress/octeontx/zip_pmd.c > index 2011db37e..44c271e1a 100644 > --- a/drivers/compress/octeontx/zip_pmd.c > +++ b/drivers/compress/octeontx/zip_pmd.c > @@ -9,8 +9,259 @@ > #include > #include >=20 > +static const struct rte_compressdev_capabilities > + octtx_zip_pmd_capabilities[] =3D { > + { .algo =3D RTE_COMP_ALGO_DEFLATE, > + /* Deflate */ > + .comp_feature_flags =3D 0, Need to add at least Fixed feature flag here. > + /* Non sharable Priv XFORM and Stateless */ > + .window_size =3D { > + .min =3D 1, > + .max =3D 14, > + .increment =3D 1 > + /* size supported 2^1 to 2^14 */ > + }, > + }, > + RTE_COMP_END_OF_CAPABILITIES_LIST() > +}; > + ... > + > +/** Release queue pair */ > +static int > +zip_pmd_qp_release(struct rte_compressdev *dev, uint16_t qp_id) { > + struct zipvf_qp *qp =3D dev->data->queue_pairs[qp_id]; > + struct rte_ring *r =3D NULL; > + > + if (qp !=3D NULL) { > + zipvf_q_term(qp); > + r =3D rte_ring_lookup(qp->name); You can use qp->processed_pkts. > + if (r) > + rte_ring_free(r); > + rte_free(qp); > + dev->data->queue_pairs[qp_id] =3D NULL; > + } > + return 0; > +} > + ... > +qp_setup_cleanup: > + if (qp->processed_pkts) { > + rte_ring_free(qp->processed_pkts); > + qp->processed_pkts =3D NULL; > + } > + if (qp) { > + rte_free(qp); > + qp =3D NULL; > +=09 No need to set NULL these two last pointers.