diff mbox

[dpdk-dev,v5,01/10] compress/isal: add skeleton ISA-L compression PMD

Message ID 1525782775-138647-2-git-send-email-lee.daly@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Pablo de Lara Guarch
Headers show

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation fail apply issues

Commit Message

Daly, Lee May 8, 2018, 12:32 p.m. UTC
Adding basic skeleton of the ISA-L compression driver. No compression
functionality, but lays the foundation for operations in the rest of the
patchset. The ISA-L compression driver utilizes Intel's ISA-L compression
library and compressdev API. It therefore has dependencies on both compressdev
and the ISA-L library, v2.22.0.

Signed-off-by: Lee Daly <lee.daly@intel.com>
---
 config/common_base                             |  5 +++++
 doc/guides/rel_notes/release_18_05.rst         |  3 +++
 drivers/Makefile                               |  2 ++
 drivers/compress/Makefile                      |  8 +++++++
 drivers/compress/isal/Makefile                 | 30 ++++++++++++++++++++++++++
 drivers/compress/isal/isal_compress_pmd.c      | 29 +++++++++++++++++++++++++
 drivers/compress/isal/meson.build              | 14 ++++++++++++
 drivers/compress/isal/rte_pmd_isal_version.map |  3 +++
 drivers/compress/meson.build                   |  8 +++++++
 drivers/meson.build                            |  1 +
 mk/rte.app.mk                                  |  5 +++++
 11 files changed, 108 insertions(+)
 create mode 100644 drivers/compress/Makefile
 create mode 100644 drivers/compress/isal/Makefile
 create mode 100644 drivers/compress/isal/isal_compress_pmd.c
 create mode 100644 drivers/compress/isal/meson.build
 create mode 100644 drivers/compress/isal/rte_pmd_isal_version.map
 create mode 100644 drivers/compress/meson.build

Comments

Daly, Lee May 9, 2018, 4:14 p.m. UTC | #1
V2:
  - Changes to keep in compliance with compressdev API,
  - Enable meson build system,
  - General rework & fixes,
  - Documentation.

V3:
  - Changes to keep in compliance with compressdev API,
  - General rework,
  - Split into patchset.

V4:
  - Changes to keep in compliance with the compressdev API,
  - Removed unnecessary branching in compression function, process_isal_deflate,
  - Some minor documentation fixes,
  - Minor reworks.

V5:
  - Removed unnecessary overhead related to dynamic huffman code compression,
  - Minor reworks.

V6:
  - Removed partial checksum support for enablement of full checksum in future,
  - Added fix to dynamic huffman code compression.

Lee Daly (10):
  compress/isal: add skeleton ISA-L compression PMD
  compress/isal: add pmd device init and de-init
  compress/isal: add basic pmd ops
  compress/isal: add private xform related ops
  compress/isal: add queue pair related ops
  compress/isal: support enqueue/dequeue api
  compress/isal: add stats related ops
  compress/isal: add ISA-L compression functionality
  compress/isal: add ISA-L decomp functionality
  doc: add compression driver and ISA-L PMD docs

 .gitignore                                        |   1 +
 MAINTAINERS                                       |  12 +
 config/common_base                                |   5 +
 devtools/test-build.sh                            |   4 +
 doc/guides/compressdevs/features/default.ini      |  24 ++
 doc/guides/compressdevs/features/isal.ini         |  22 +
 doc/guides/compressdevs/index.rst                 |  13 +
 doc/guides/compressdevs/isal.rst                  |  74 ++++
 doc/guides/compressdevs/overview.rst              |  12 +
 doc/guides/conf.py                                |   5 +
 doc/guides/index.rst                              |   1 +
 doc/guides/rel_notes/release_18_05.rst            |   4 +
 drivers/Makefile                                  |   2 +
 drivers/compress/Makefile                         |   8 +
 drivers/compress/isal/Makefile                    |  31 ++
 drivers/compress/isal/isal_compress_pmd.c         | 472 ++++++++++++++++++++++
 drivers/compress/isal/isal_compress_pmd_ops.c     | 343 ++++++++++++++++
 drivers/compress/isal/isal_compress_pmd_private.h |  57 +++
 drivers/compress/isal/meson.build                 |  14 +
 drivers/compress/isal/rte_pmd_isal_version.map    |   3 +
 drivers/compress/meson.build                      |   8 +
 drivers/meson.build                               |   1 +
 mk/rte.app.mk                                     |   5 +
 23 files changed, 1121 insertions(+)
 create mode 100644 doc/guides/compressdevs/features/default.ini
 create mode 100644 doc/guides/compressdevs/features/isal.ini
 create mode 100644 doc/guides/compressdevs/index.rst
 create mode 100644 doc/guides/compressdevs/isal.rst
 create mode 100644 doc/guides/compressdevs/overview.rst
 create mode 100644 drivers/compress/Makefile
 create mode 100644 drivers/compress/isal/Makefile
 create mode 100644 drivers/compress/isal/isal_compress_pmd.c
 create mode 100644 drivers/compress/isal/isal_compress_pmd_ops.c
 create mode 100644 drivers/compress/isal/isal_compress_pmd_private.h
 create mode 100644 drivers/compress/isal/meson.build
 create mode 100644 drivers/compress/isal/rte_pmd_isal_version.map
 create mode 100644 drivers/compress/meson.build
De Lara Guarch, Pablo May 9, 2018, 8:56 p.m. UTC | #2
> -----Original Message-----
> From: Daly, Lee
> Sent: Wednesday, May 9, 2018 5:14 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Tucker, Greg B
> <greg.b.tucker@intel.com>; Jain, Deepak K <deepak.k.jain@intel.com>; Trahe,
> Fiona <fiona.trahe@intel.com>; Daly, Lee <lee.daly@intel.com>
> Subject: [PATCH v6 00/10] add ISA-L compression PMD
> 

Series-reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
De Lara Guarch, Pablo May 9, 2018, 9:36 p.m. UTC | #3
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch, Pablo
> Sent: Wednesday, May 9, 2018 9:57 PM
> To: Daly, Lee <lee.daly@intel.com>; dev@dpdk.org
> Cc: Tucker, Greg B <greg.b.tucker@intel.com>; Jain, Deepak K
> <deepak.k.jain@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v6 00/10] add ISA-L compression PMD
> 
> 
> 
> > -----Original Message-----
> > From: Daly, Lee
> > Sent: Wednesday, May 9, 2018 5:14 PM
> > To: dev@dpdk.org
> > Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Tucker,
> > Greg B <greg.b.tucker@intel.com>; Jain, Deepak K
> > <deepak.k.jain@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>; Daly,
> > Lee <lee.daly@intel.com>
> > Subject: [PATCH v6 00/10] add ISA-L compression PMD
> >
> 
> Series-reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Series-applied-to dpdk-next-crypto.
Thanks for the work!

Pablo
diff mbox

Patch

diff --git a/config/common_base b/config/common_base
index dd836e8..a982570 100644
--- a/config/common_base
+++ b/config/common_base
@@ -562,6 +562,11 @@  CONFIG_RTE_COMPRESS_MAX_DEVS=64
 CONFIG_RTE_COMPRESSDEV_TEST=y
 
 #
+# Compile PMD for ISA-L compression device
+#
+CONFIG_RTE_LIBRTE_PMD_ISAL=n
+
+#
 # Compile generic event device library
 #
 CONFIG_RTE_LIBRTE_EVENTDEV=y
diff --git a/doc/guides/rel_notes/release_18_05.rst b/doc/guides/rel_notes/release_18_05.rst
index 5193a62..ce70d1f 100644
--- a/doc/guides/rel_notes/release_18_05.rst
+++ b/doc/guides/rel_notes/release_18_05.rst
@@ -75,7 +75,10 @@  New Features
   The compressdev library provides an API for offload of compression and
   decompression operations to hardware or software accelerator devices.
 
+* **Added a new compression poll mode driver using Intels ISA-L.**
 
+   Added the new ``ISA-L`` compression driver, for compression and decompression
+   operations in software.
 
 
 API Changes
diff --git a/drivers/Makefile b/drivers/Makefile
index 3d9f86b..c88638c 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -13,6 +13,8 @@  DIRS-$(CONFIG_RTE_LIBRTE_BBDEV) += baseband
 DEPDIRS-baseband := common bus mempool
 DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += crypto
 DEPDIRS-crypto := common bus mempool
+DIRS-$(CONFIG_RTE_LIBRTE_COMPRESSDEV) += compress
+DEPDIRS-compress := bus mempool
 DIRS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += event
 DEPDIRS-event := common bus mempool net
 DIRS-$(CONFIG_RTE_LIBRTE_RAWDEV) += raw
diff --git a/drivers/compress/Makefile b/drivers/compress/Makefile
new file mode 100644
index 0000000..592497f
--- /dev/null
+++ b/drivers/compress/Makefile
@@ -0,0 +1,8 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+DIRS-$(CONFIG_RTE_LIBRTE_PMD_ISAL) += isal
+
+include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/drivers/compress/isal/Makefile b/drivers/compress/isal/Makefile
new file mode 100644
index 0000000..9b1d866
--- /dev/null
+++ b/drivers/compress/isal/Makefile
@@ -0,0 +1,30 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+# library name
+LIB = librte_pmd_isal_comp.a
+
+# build flags
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
+# external library dependencies
+LDLIBS += -lisal
+LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
+LDLIBS += -lrte_compressdev
+LDLIBS += -lrte_bus_vdev
+
+# library version
+LIBABIVER := 1
+
+# versioning export map
+EXPORT_MAP := rte_pmd_isal_version.map
+
+# library source files
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_ISAL) += isal_compress_pmd.c
+
+# export include files
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
new file mode 100644
index 0000000..d7137fd
--- /dev/null
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -0,0 +1,29 @@ 
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2018 Intel Corporation
+ */
+
+#include <rte_bus_vdev.h>
+#include <rte_compressdev_pmd.h>
+
+/** Remove compression device */
+static int
+compdev_isal_remove_dev(struct rte_vdev_device *vdev __rte_unused)
+{
+	return 0;
+}
+
+/** Initialise ISA-L compression device */
+static int
+compdev_isal_probe(struct rte_vdev_device *dev __rte_unused)
+{
+	return 0;
+}
+
+static struct rte_vdev_driver compdev_isal_pmd_drv = {
+	.probe = compdev_isal_probe,
+	.remove = compdev_isal_remove_dev,
+};
+
+RTE_PMD_REGISTER_VDEV(COMPDEV_NAME_ISAL_PMD, compdev_isal_pmd_drv);
+RTE_PMD_REGISTER_PARAM_STRING(COMPDEV_NAME_ISAL_PMD,
+	"socket_id=<int>");
diff --git a/drivers/compress/isal/meson.build b/drivers/compress/isal/meson.build
new file mode 100644
index 0000000..4447e20
--- /dev/null
+++ b/drivers/compress/isal/meson.build
@@ -0,0 +1,14 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2018 Intel Corporation
+
+dep = dependency('libisal', required: false)
+if not dep.found()
+       build =false
+endif
+
+deps += 'bus_vdev'
+sources = files('isal_compress_pmd.c')
+ext_deps += dep
+pkgconfig_extra_libs += '-lisal'
+
+allow_experimental_apis = true
diff --git a/drivers/compress/isal/rte_pmd_isal_version.map b/drivers/compress/isal/rte_pmd_isal_version.map
new file mode 100644
index 0000000..de8e412
--- /dev/null
+++ b/drivers/compress/isal/rte_pmd_isal_version.map
@@ -0,0 +1,3 @@ 
+DPDK_18.05 {
+	local: *;
+};
diff --git a/drivers/compress/meson.build b/drivers/compress/meson.build
new file mode 100644
index 0000000..fb136e1
--- /dev/null
+++ b/drivers/compress/meson.build
@@ -0,0 +1,8 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+drivers = ['isal']
+
+std_deps = ['compressdev'] # compressdev pulls in all other needed deps
+config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
+driver_name_fmt = 'rte_pmd_@0@'
diff --git a/drivers/meson.build b/drivers/meson.build
index b146f09..ac7ba5e 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -7,6 +7,7 @@  driver_classes = ['common',
 	       'mempool', # depends on common and bus.
 	       'net',     # depends on common, bus and mempool.
 	       'crypto',  # depends on common, bus and mempool (net in future).
+	       'compress', # depends on bus, mempool.
 	       'event']   # depends on common, bus, mempool and net.
 
 foreach class:driver_classes
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 8530ac5..7a6739c 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -228,6 +228,11 @@  endif # CONFIG_RTE_LIBRTE_DPAA_BUS
 
 endif # CONFIG_RTE_LIBRTE_CRYPTODEV
 
+ifeq ($(CONFIG_RTE_LIBRTE_COMPRESSDEV),y)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ISAL) += -lrte_pmd_isal_comp
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ISAL) += -lisal
+endif # CONFIG_RTE_LIBRTE_COMPRESSDEV
+
 ifeq ($(CONFIG_RTE_LIBRTE_EVENTDEV),y)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV) += -lrte_pmd_skeleton_event
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += -lrte_pmd_sw_event