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 46A6F1D5C2 for ; Fri, 15 Jun 2018 13:08:57 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jun 2018 04:08:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,226,1526367600"; d="scan'208";a="49571450" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by orsmga008.jf.intel.com with ESMTP; 15 Jun 2018 04:08:55 -0700 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.80]) by IRSMSX103.ger.corp.intel.com ([169.254.3.136]) with mapi id 14.03.0319.002; Fri, 15 Jun 2018 12:08:54 +0100 From: "Daly, Lee" To: 'Shally Verma' CC: "Trahe, Fiona" , "dev@dpdk.org" , "pathreay@caviumnetworks.com" , Sunila Sahu , Ashish Gupta , "De Lara Guarch, Pablo" Thread-Topic: [dpdk-dev] [PATCH v1 1/6] compress/zlib: add ZLIB PMD support Thread-Index: AQHT7DgvdZ7Tqt42zkmsz3EC/oXz3KRgHTyA Date: Fri, 15 Jun 2018 11:08:53 +0000 Message-ID: References: <1526380346-7386-1-git-send-email-shally.verma@caviumnetworks.com> <1526380346-7386-2-git-send-email-shally.verma@caviumnetworks.com> In-Reply-To: <1526380346-7386-2-git-send-email-shally.verma@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjI5YWQzNGEtNTRlNS00ZmNjLWFhN2YtYWY4N2Q5ODU2NjY3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJ3dWU5UDlITGFHV0wwdXduMGtZQ29KaUdyb0pRMjVsK3E3Zkt4WXQ5ZFRnc2ZQb2RkamRoRG9zcThTUUJNem0yIn0= x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v1 1/6] 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: Fri, 15 Jun 2018 11:08:58 -0000 Hi, thanks for the work, reviewed the PMD see comments below. > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shally Verma > Sent: Tuesday, May 15, 2018 11:32 AM > To: De Lara Guarch, Pablo > Cc: Trahe, Fiona ; dev@dpdk.org; > pathreay@caviumnetworks.com; Sunila Sahu > ; Ashish Gupta > > Subject: [dpdk-dev] [PATCH v1 1/6] compress/zlib: add ZLIB PMD support <...> > diff --git a/config/common_base b/config/common_base index > 28557ed..537e9e4 100644 > --- a/config/common_base > +++ b/config/common_base > @@ -586,6 +586,12 @@ CONFIG_RTE_COMPRESSDEV_TEST=3Dn > CONFIG_RTE_LIBRTE_PMD_ISAL=3Dn >=20 > # > +# Compile PMD for ZLIB compression device # > +CONFIG_RTE_LIBRTE_PMD_ZLIB=3Dn > CONFIG_RTE_LIBRTE_PMD_ZLIB_DEBUG=3Dn [Lee] DPDK is moving from the static debugging, I see you have implemented = dynamic logging but have not yet used it in the PMD. i.e using ZLIB_LOG_ERR/INFO() rather than ZLIB_PMD_LOG(INFO, ""). When you have removed the static debugging use, could you remove this flag = to enable it please. > + > +# > # Compile generic event device library > # > CONFIG_RTE_LIBRTE_EVENTDEV=3Dy > diff --git a/drivers/compress/Makefile b/drivers/compress/Makefile index > 592497f..1f159a5 100644 > --- a/drivers/compress/Makefile > +++ b/drivers/compress/Makefile > @@ -4,5 +4,6 @@ > include $(RTE_SDK)/mk/rte.vars.mk >=20 > DIRS-$(CONFIG_RTE_LIBRTE_PMD_ISAL) +=3D isal > +DIRS-$(CONFIG_RTE_LIBRTE_PMD_ZLIB) +=3D zlib >=20 > include $(RTE_SDK)/mk/rte.subdir.mk > diff --git a/drivers/compress/zlib/Makefile b/drivers/compress/zlib/Makef= ile > new file mode 100644 index 0000000..e613960 > --- /dev/null > +++ b/drivers/compress/zlib/Makefile > @@ -0,0 +1,32 @@ > +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Cavium > +Networks > + > +include $(RTE_SDK)/mk/rte.vars.mk > + > +# library name > +LIB =3D librte_pmd_zlib.a > + > +# build flags > +CFLAGS +=3D -O3 > +CFLAGS +=3D $(WERROR_FLAGS) > +CFLAGS +=3D -DALLOW_EXPERIMENTAL_API > + > +# library version > +LIBABIVER :=3D 1 > + > +# versioning export map > +EXPORT_MAP :=3D rte_pmd_zlib_version.map > + > +# external library dependencies > +LDLIBS +=3D -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring -lz LDLIBS += =3D > +-lrte_compressdev LDLIBS +=3D -lrte_bus_vdev > + > +# library source files > +SRCS-$(CONFIG_RTE_LIBRTE_PMD_ZLIB) +=3D zlib_pmd.c > +SRCS-$(CONFIG_RTE_LIBRTE_PMD_ZLIB) +=3D zlib_pmd_ops.c > + > +# export include files > +SYMLINK-y-include +=3D > + [Lee] Do you have a need for this in the future, not being used now. > +include $(RTE_SDK)/mk/rte.lib.mk > 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..33c1b97 > --- /dev/null > +++ b/drivers/compress/zlib/rte_pmd_zlib_version.map > @@ -0,0 +1,3 @@ > +EXPERIMENTAL { [Lee] Would be better to replace EXPERMENTAL with 18.08 in this case. > + local: *; > +}; > diff --git a/drivers/compress/zlib/zlib_pmd.c > b/drivers/compress/zlib/zlib_pmd.c > new file mode 100644 > index 0000000..bbf49f1 > --- /dev/null > +++ b/drivers/compress/zlib/zlib_pmd.c > @@ -0,0 +1,106 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2017-2018 Cavium Networks */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include "zlib_pmd_private.h" > + > +static uint8_t compressdev_driver_id; [Lee] The current API no longer has rte_compressdev->driver_id anymore ther= efor this variable will be unused. > +int zlib_logtype_driver; > + > +static int zlib_remove(struct rte_vdev_device *vdev); > + > +static int > +zlib_create(const char *name, > + struct rte_vdev_device *vdev, > + struct rte_compressdev_pmd_init_params *init_params) { > + struct rte_compressdev *dev; > + struct zlib_private *internals; > + > + dev =3D rte_compressdev_pmd_create(name, &vdev->device, > + sizeof(struct zlib_private), init_params); > + if (dev =3D=3D NULL) { > + ZLIB_LOG_ERR("driver %s: create failed", init_params- > >name); > + return -ENODEV; > + } > + > + dev->driver_id =3D compressdev_driver_id; [Lee] See above comment. > + dev->dev_ops =3D rte_zlib_pmd_ops; > + > + dev->feature_flags =3D 0; > + dev->feature_flags |=3D RTE_COMP_FF_SHAREABLE_PRIV_XFORM | > + RTE_COMP_FF_NONCOMPRESSED_BLOCKS | > + RTE_COMP_FF_ADLER32_CHECKSUM; Thanks, Lee.