From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 0227A1B4CD for ; Wed, 11 Jul 2018 12:29:03 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2018 03:29:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,338,1526367600"; d="scan'208";a="56797571" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga006.jf.intel.com with ESMTP; 11 Jul 2018 03:29:01 -0700 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.193]) by IRSMSX104.ger.corp.intel.com ([169.254.5.225]) with mapi id 14.03.0319.002; Wed, 11 Jul 2018 11:29:00 +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 1/5] compress/zlib: add ZLIB PMD support Thread-Index: AQHUEiXUVtnBn1wV9E6TldyzTJHtSqSJ0gLQ Date: Wed, 11 Jul 2018 10:29:00 +0000 Message-ID: References: <1530550631-22841-1-git-send-email-shally.verma@caviumnetworks.com> <1530550631-22841-2-git-send-email-shally.verma@caviumnetworks.com> In-Reply-To: <1530550631-22841-2-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWUxYWJhNzEtYzIwMi00Nzk3LWFkMTgtMjBhMTc1Njg3NGYyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYTVXaVViKzR2VVpQSXdZbGJOdGd3T2NcLzNGckExa1lnMmxzdlluZmhURmZIbXVOdXlcL3VsRjJ5YUN4WTZUUzliIn0= 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 1/5] compress/zlib: add ZLIB PMD support 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 10:29:04 -0000 Hi Shally/Ashish, > -----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 1/5] compress/zlib: add ZLIB PMD support >=20 Remove "support" from title. Also, add the PMD in devtools/test-build.sh. Since it depends on ZLIB, add a "sed" line below test "$DPDK_DEP_ZLIB" !=3D= y. More comments inline below. > From: Ashish Gupta >=20 > Add sw zlib pmd support in compressdev driver. > Add device probe and remove support. > Add ZLIB build file support. >=20 > Signed-off-by: Sunila Sahu > Signed-off-by: Shally Verma > Signed-off-by: Ashish Gupta ... > +++ b/drivers/compress/zlib/meson.build > @@ -0,0 +1,14 @@ > +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Cavium > +Networks > + > +dep =3D dependency('zlib', required: false) if not dep.found() > + build =3D false > +endif > + > +deps +=3D 'bus_vdev' > +sources =3D files('zlib_pmd.c', 'zlib_pmd_ops.c') ext_deps +=3D dep Zlib_pmd_ops.c is created in the next patch, so remove it from here. > +pkgconfig_extra_libs +=3D '-lz' > + > +allow_experimental_apis =3D true > diff --git a/drivers/compress/zlib/rte_pmd_zlib_version.map > b/drivers/compress/zlib/rte_pmd_zlib_version.map > new file mode 100644 > index 0000000..1a99a33 > --- /dev/null > +++ b/drivers/compress/zlib/rte_pmd_zlib_version.map > @@ -0,0 +1,3 @@ > +18.08 { DPDK_18.08. > + local: *; > +}; > diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zli= b_pmd.c > new file mode 100644 > index 0000000..f667ccc > --- /dev/null > +++ b/drivers/compress/zlib/zlib_pmd.c > @@ -0,0 +1,81 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2018 Cavium Networks > + */ > + > +#include > +#include Leave space between rte_common and zlib_pmd_private.h > +#include "zlib_pmd_private.h" > + > +static int > +zlib_create(const char *name, > + struct rte_vdev_device *vdev, > + struct rte_compressdev_pmd_init_params *init_params) { > + struct rte_compressdev *dev; > + > + dev =3D rte_compressdev_pmd_create(name, &vdev->device, > + sizeof(struct zlib_private), init_params); > + if (dev =3D=3D NULL) { > + ZLIB_PMD_ERR("driver %s: create failed", init_params->name); > + return -ENODEV; > + } > + > + dev->feature_flags =3D RTE_COMP_FF_NONCOMPRESSED_BLOCKS; This is an algorithm feature flag, so it should go in capabilities. > + > + return 0; > +} > + ... > +RTE_PMD_REGISTER_VDEV(COMPRESSDEV_NAME_ZLIB_PMD, zlib_pmd_drv); > +RTE_PMD_REGISTER_ALIAS(COMPRESSDEV_NAME_ZLIB_PMD, > +compressdev_zlib_pmd); No need to use an alias here. The convention now is driverType_driverName (= e.g. compress_zlib). > + > +RTE_INIT(zlib_init_log); > + > +static void > +zlib_init_log(void) > +{ > + zlib_logtype_driver =3D rte_log_register("compress_zlib"); > + if (zlib_logtype_driver >=3D 0) > + rte_log_set_level(zlib_logtype_driver, RTE_LOG_INFO); }