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 728F11B05C for ; Wed, 11 Jul 2018 13:10:40 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2018 04:10:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,338,1526367600"; d="scan'208";a="55689184" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga007.jf.intel.com with ESMTP; 11 Jul 2018 04:10:37 -0700 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.193]) by IRSMSX102.ger.corp.intel.com ([169.254.2.110]) with mapi id 14.03.0319.002; Wed, 11 Jul 2018 12:10:37 +0100 From: "De Lara Guarch, Pablo" To: Shally Verma CC: "dev@dpdk.org" , "pathreya@caviumnetworks.com" , "mchalla@caviumnetworks.com" , Ashish Gupta , Sunila Sahu Thread-Topic: [PATCH v2 2/5] compress/zlib: add device setup PMD ops Thread-Index: AQHUEiXcxiQzHY7SNEiwH2T+H3C4tKSJ4Xgw Date: Wed, 11 Jul 2018 11:10:36 +0000 Message-ID: References: <1530550631-22841-1-git-send-email-shally.verma@caviumnetworks.com> <1530550631-22841-3-git-send-email-shally.verma@caviumnetworks.com> In-Reply-To: <1530550631-22841-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTEwOWQ1ZjUtNTcyZi00ZTIwLThmYjgtNzFiNmQ4OTRlYTRjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiXC9HQk1HUHBrTkF6STFwbG9mTUtaMXhvXC9ubGNITW1rT0NpanJWWUtXdVdnT1I3and4dExzWmtZMjdwbm8yQVZmIn0= 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/5] compress/zlib: 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, 11 Jul 2018 11:10:41 -0000 > -----Original Message----- > From: Shally Verma [mailto:shally.verma@caviumnetworks.com] > Sent: Monday, July 2, 2018 5:57 PM > To: De Lara Guarch, Pablo > Cc: dev@dpdk.org; pathreya@caviumnetworks.com; > mchalla@caviumnetworks.com; Ashish Gupta > ; Sunila Sahu > > Subject: [PATCH v2 2/5] compress/zlib: add device setup PMD ops >=20 > From: Ashish Gupta >=20 > Implement device configure and PMD ops >=20 > Signed-off-by: Sunila Sahu > Signed-off-by: Shally Verma > Signed-off-by: Ashish Gupta ... > b/drivers/compress/zlib/zlib_pmd_ops.c > new file mode 100644 > index 0000000..03b6da5 > --- /dev/null > +++ b/drivers/compress/zlib/zlib_pmd_ops.c > @@ -0,0 +1,236 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2018 Cavium Networks > + */ > + > +#include > + > +#include > +#include > + > +#include "zlib_pmd_private.h" > + > +static const struct rte_compressdev_capabilities zlib_pmd_capabilities[]= =3D { > + { /* Deflate */ > + .algo =3D RTE_COMP_ALGO_DEFLATE, > + .window_size =3D { > + .min =3D 8, > + .max =3D 15, > + .increment =3D 1 > + }, > + }, Add comp_feature_flags here, including the new FIXED and DYNAMIC flags. > + > + RTE_COMP_END_OF_CAPABILITIES_LIST() > + > +}; > + ... > +static int > +zlib_pmd_qp_release(struct rte_compressdev *dev, uint16_t qp_id) { > + struct zlib_qp *qp =3D dev->data->queue_pairs[qp_id]; > + struct rte_ring *r =3D NULL; > + > + if (qp !=3D NULL) { > + r =3D rte_ring_lookup(qp->name); > + if (r) > + rte_ring_free(r); I think you can use rte_ring_free(qp->processed_pkts) here directly. > + rte_free(qp); > + dev->data->queue_pairs[qp_id] =3D NULL; > + } > + return 0; > +} > + > +/** set a unique name for the queue pair based on it's name, dev_id and Typo: "its" ... > + > +struct rte_compressdev_ops zlib_pmd_ops =3D { ... > + > + .private_xform_create =3D NULL, > + .private_xform_free =3D NULL, Remove extra indentation here. > + > + .stream_create =3D NULL, > + .stream_free =3D NULL > +}; > + > +struct rte_compressdev_ops *rte_zlib_pmd_ops =3D &zlib_pmd_ops;