[dpdk-dev] [PATCH v1 1/7] compress/octeontx: add octeontx zip PMD support

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Wed Jun 20 00:15:13 CEST 2018



> -----Original Message-----
> From: Shally Verma [mailto:shally.verma at caviumnetworks.com]
> Sent: Tuesday, June 5, 2018 11:35 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>
> Cc: Trahe, Fiona <fiona.trahe at intel.com>; dev at dpdk.org;
> pathreya at caviumnetworks.com; mchalla at caviumnetworks.com; Ashish Gupta
> <ashish.gupta at caviumnetworks.com>; Sunila Sahu
> <sunila.sahu at caviumnetworks.com>
> Subject: [PATCH v1 1/7] compress/octeontx: add octeontx zip PMD support
> 
> Add octeontx zip pmd support in compressdev driver.
> Add device probe and remove support.
> Update makefile to build octeontx zip pmd

Don't forget to update the MAINTAINERS file.
Also, there are some compilation errors in the the next patches,
when enabling the PMD since the beginning. This should be fixed.

> 
> Signed-off-by: Ashish Gupta <ashish.gupta at caviumnetworks.com>
> Signed-off-by: Shally Verma <shally.verma at caviumnetworks.com>
> Signed-off-by: Sunila Sahu <sunila.sahu at caviumnetworks.com>
> ---
>  config/common_base                                 |   6 +
>  drivers/compress/Makefile                          |   2 +-
>  drivers/compress/octeontx/Makefile                 |  33 ++++++
>  drivers/compress/octeontx/meson.build              |  10 ++
>  .../octeontx/rte_pmd_octeontx_compress_version.map |   3 +
>  drivers/compress/octeontx/zip_pmd.c                | 129 +++++++++++++++++++++
>  drivers/compress/octeontx/zipvf.c                  |  48 ++++++++
>  drivers/compress/octeontx/zipvf.h                  |  47 ++++++++
>  usertools/dpdk-devbind.py                          |   9 ++
>  9 files changed, 286 insertions(+), 1 deletion(-)
> 
> diff --git a/config/common_base b/config/common_base index
> 6b0d1cbbb..e56d14b7f 100644
> --- a/config/common_base
> +++ b/config/common_base
> @@ -584,6 +584,12 @@ CONFIG_RTE_COMPRESS_MAX_DEVS=64  #
> CONFIG_RTE_COMPRESSDEV_TEST=n
> 
> +#
> +# Compile PMD for Octeontx ZIPVF compression device #
> +CONFIG_RTE_LIBRTE_PMD_OCTEONTX_ZIPVF=n
> +CONFIG_RTE_LIBRTE_PMD_OCTEONTX_ZIPVF_DEBUG=n

As Jerin said, the PMD can be enabled by default, right?
As far as I know, this PMD has no external dependencies.
Also, the DEBUG flag can be removed.

> +
>  #
>  # Compile PMD for ISA-L compression device  # diff --git
> a/drivers/compress/Makefile b/drivers/compress/Makefile index
> 592497f51..62b4e5abe 100644
> --- a/drivers/compress/Makefile
> +++ b/drivers/compress/Makefile
> @@ -4,5 +4,5 @@
>  include $(RTE_SDK)/mk/rte.vars.mk
> 
>  DIRS-$(CONFIG_RTE_LIBRTE_PMD_ISAL) += isal
> -
> +DIRS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_ZIPVF) += octeontx

Add this without removing the blank line.

>  include $(RTE_SDK)/mk/rte.subdir.mk
> diff --git a/drivers/compress/octeontx/Makefile
> b/drivers/compress/octeontx/Makefile
> new file mode 100644
> index 000000000..89078f085
> --- /dev/null
> +++ b/drivers/compress/octeontx/Makefile
> @@ -0,0 +1,33 @@
> +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017-2018 Cavium
> +Networks
> +
> +include $(RTE_SDK)/mk/rte.vars.mk
> +
> +# library name
> +LIB = librte_pmd_octeontx_zip.a
> +
> +# library version
> +LIBABIVER := 1
> +
> +# build flags
> +CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -O3
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
> +CFLAGS += -I$(RTE_SDK)/drivers/compress/octeontx/include

Is this include necessary?
Also, there is not /include in this patch.

> +
> +# external library include paths
> +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring LDLIBS +=
> +-lrte_compressdev LDLIBS += -lrte_pci -lrte_bus_pci
> +
> +# library source files
> +SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_ZIPVF) += zip_pmd.c
> +SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_ZIPVF) += zipvf.c
> +
> +# export include files
> +SYMLINK-y-include +=
> +
> +# versioning export map
> +EXPORT_MAP := rte_pmd_octeontx_compress_version.map
> +
> +include $(RTE_SDK)/mk/rte.lib.mk
> diff --git a/drivers/compress/octeontx/meson.build
> b/drivers/compress/octeontx/meson.build
> new file mode 100644
> index 000000000..cce404337
> --- /dev/null
> +++ b/drivers/compress/octeontx/meson.build
> @@ -0,0 +1,10 @@
> +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Cavium
> +Networks
> +
> +sources = files('zipvf.c', 'zip_pmd.c') allow_experimental_apis = true
> +includes += include_directories('include') deps += ['mempool_octeontx',
> +'bus_pci'] ext_deps += dep
> +
> +
> diff --git
> a/drivers/compress/octeontx/rte_pmd_octeontx_compress_version.map
> b/drivers/compress/octeontx/rte_pmd_octeontx_compress_version.map
> new file mode 100644
> index 000000000..33c1b976f
> --- /dev/null
> +++ b/drivers/compress/octeontx/rte_pmd_octeontx_compress_version.map
> @@ -0,0 +1,3 @@
> +EXPERIMENTAL {
> +	local: *;
> +};

I think this can be 18.08, as there is no API, so we won't need to
modify this once the compression API turns stable.

> diff --git a/drivers/compress/octeontx/zip_pmd.c
> b/drivers/compress/octeontx/zip_pmd.c
> new file mode 100644
> index 000000000..1181bed19
> --- /dev/null
> +++ b/drivers/compress/octeontx/zip_pmd.c

...

> +++ b/drivers/compress/octeontx/zipvf.c
> @@ -0,0 +1,48 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2017-2018 Cavium Networks  */
> +
> +#include "zipvf.h"
> +
> +int zipvf_create(struct rte_compressdev *compressdev, int vfid) {

Return type should be in the line before the function name.




More information about the dev mailing list