DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1 0/6]compress: add zlib compression PMD
@ 2018-05-15 10:32 Shally Verma
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 1/6] compress/zlib: add ZLIB PMD support Shally Verma
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Shally Verma @ 2018-05-15 10:32 UTC (permalink / raw)
  To: pablo.de.lara.guarch; +Cc: fiona.trahe, dev, pathreay

This patch series add software zlib based compression PMD
in DPDK compress drivers.
Application must need to install zlib prior to compile and
run this PMD to avail compression/decompression services.
Currently driver only tested for deflate, stateless
compression and decompression with direct memory buffers.

v1 includes:

build changes to build zlib PMD
zlib PMD implementation
zlib PMD documentation
meson build support

This patchset is dependent upon compressdev API.

Sunila Sahu (6):
  compress/zlib: add ZLIB PMD support
  compress/zlib: add device setup PMD ops
  compress/zlib: add xform and stream create support
  compress/zlib: add enq deq apis
  test: add ZLIB PMD for compressdev tests
  doc: add ZLIB PMD documentation

 config/common_base                             |   6 +
 doc/guides/compressdevs/features/zlib.ini      |  22 ++
 doc/guides/compressdevs/zlib.rst               |  72 ++++
 drivers/compress/Makefile                      |   1 +
 drivers/compress/meson.build                   |   2 +-
 drivers/compress/zlib/Makefile                 |  32 ++
 drivers/compress/zlib/meson.build              |  11 +
 drivers/compress/zlib/rte_pmd_zlib_version.map |   3 +
 drivers/compress/zlib/zlib_pmd.c               | 478 +++++++++++++++++++++++++
 drivers/compress/zlib/zlib_pmd_ops.c           | 314 ++++++++++++++++
 drivers/compress/zlib/zlib_pmd_private.h       |  77 ++++
 mk/rte.app.mk                                  |   2 +
 12 files changed, 1019 insertions(+), 1 deletion(-)
 create mode 100644 doc/guides/compressdevs/features/zlib.ini
 create mode 100644 doc/guides/compressdevs/zlib.rst
 create mode 100644 drivers/compress/zlib/Makefile
 create mode 100644 drivers/compress/zlib/meson.build
 create mode 100644 drivers/compress/zlib/rte_pmd_zlib_version.map
 create mode 100644 drivers/compress/zlib/zlib_pmd.c
 create mode 100644 drivers/compress/zlib/zlib_pmd_ops.c
 create mode 100644 drivers/compress/zlib/zlib_pmd_private.h

-- 
2.9.5

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH v1 1/6] compress/zlib: add ZLIB PMD support
  2018-05-15 10:32 [dpdk-dev] [PATCH v1 0/6]compress: add zlib compression PMD Shally Verma
@ 2018-05-15 10:32 ` Shally Verma
  2018-06-15 11:08   ` Daly, Lee
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 2/6] compress/zlib: add device setup PMD ops Shally Verma
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Shally Verma @ 2018-05-15 10:32 UTC (permalink / raw)
  To: pablo.de.lara.guarch
  Cc: fiona.trahe, dev, pathreay, Sunila Sahu, Ashish Gupta

Add sw zlib pmd support in compressdev driver.
Add device probe and remove support.
Update makefile to build zlib.

Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
---
 config/common_base                             |   6 ++
 drivers/compress/Makefile                      |   1 +
 drivers/compress/zlib/Makefile                 |  32 ++++++++
 drivers/compress/zlib/rte_pmd_zlib_version.map |   3 +
 drivers/compress/zlib/zlib_pmd.c               | 106 +++++++++++++++++++++++++
 5 files changed, 148 insertions(+)

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=n
 CONFIG_RTE_LIBRTE_PMD_ISAL=n
 
 #
+# Compile PMD for ZLIB compression device
+#
+CONFIG_RTE_LIBRTE_PMD_ZLIB=n
+CONFIG_RTE_LIBRTE_PMD_ZLIB_DEBUG=n
+
+#
 # Compile generic event device library
 #
 CONFIG_RTE_LIBRTE_EVENTDEV=y
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
 
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_ISAL) += isal
+DIRS-$(CONFIG_RTE_LIBRTE_PMD_ZLIB) += zlib
 
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/drivers/compress/zlib/Makefile b/drivers/compress/zlib/Makefile
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 = librte_pmd_zlib.a
+
+# build flags
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
+# library version
+LIBABIVER := 1
+
+# versioning export map
+EXPORT_MAP := rte_pmd_zlib_version.map
+
+# external library dependencies
+LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring -lz
+LDLIBS += -lrte_compressdev
+LDLIBS += -lrte_bus_vdev
+
+# library source files
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_ZLIB) += zlib_pmd.c
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_ZLIB) += zlib_pmd_ops.c
+
+# export include files
+SYMLINK-y-include +=
+
+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 {
+	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 <rte_common.h>
+#include <rte_hexdump.h>
+#include <rte_comp.h>
+#include <rte_compressdev.h>
+#include <rte_compressdev_pmd.h>
+#include <rte_bus_vdev.h>
+#include <rte_malloc.h>
+#include <rte_cpuflags.h>
+#include <rte_byteorder.h>
+
+#include <math.h>
+#include <assert.h>
+#include "zlib_pmd_private.h"
+
+static uint8_t compressdev_driver_id;
+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 = rte_compressdev_pmd_create(name, &vdev->device,
+			sizeof(struct zlib_private), init_params);
+	if (dev == NULL) {
+		ZLIB_LOG_ERR("driver %s: create failed", init_params->name);
+		return -ENODEV;
+	}
+
+	dev->driver_id = compressdev_driver_id;
+	dev->dev_ops = rte_zlib_pmd_ops;
+
+	dev->feature_flags = 0;
+	dev->feature_flags |= RTE_COMP_FF_SHAREABLE_PRIV_XFORM |
+				RTE_COMP_FF_NONCOMPRESSED_BLOCKS |
+				RTE_COMP_FF_ADLER32_CHECKSUM;
+
+	internals = dev->data->dev_private;
+	internals->max_nb_queue_pairs = ZLIB_PMD_MAX_NB_QUEUE_PAIRS;
+
+	return 0;
+}
+
+static int
+zlib_probe(struct rte_vdev_device *vdev)
+{
+	struct rte_compressdev_pmd_init_params init_params = {
+		"",
+		rte_socket_id()
+	};
+	const char *name;
+	const char *input_args;
+
+	name = rte_vdev_device_name(vdev);
+
+	if (name == NULL)
+		return -EINVAL;
+	input_args = rte_vdev_device_args(vdev);
+	rte_compressdev_pmd_parse_input_args(&init_params, input_args);
+
+	return zlib_create(name, vdev, &init_params);
+}
+
+static int
+zlib_remove(struct rte_vdev_device *vdev)
+{
+	struct rte_compressdev *compressdev;
+	const char *name;
+
+	name = rte_vdev_device_name(vdev);
+	if (name == NULL)
+		return -EINVAL;
+
+	compressdev = rte_compressdev_pmd_get_named_dev(name);
+	if (compressdev == NULL)
+		return -ENODEV;
+
+	return rte_compressdev_pmd_destroy(compressdev);
+}
+
+static struct rte_vdev_driver zlib_pmd_drv = {
+	.probe = zlib_probe,
+	.remove = zlib_remove
+};
+
+RTE_PMD_REGISTER_VDEV(COMPRESSDEV_NAME_ZLIB_PMD, zlib_pmd_drv);
+RTE_PMD_REGISTER_ALIAS(COMPRESSDEV_NAME_ZLIB_PMD, compressdev_zlib_pmd);
+
+RTE_INIT(zlib_init_log);
+
+static void
+zlib_init_log(void)
+{
+	zlib_logtype_driver = rte_log_register("compress_zlib");
+	if (zlib_logtype_driver >= 0)
+		rte_log_set_level(zlib_logtype_driver, RTE_LOG_INFO);
+}
-- 
2.9.5

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH v1 2/6] compress/zlib: add device setup PMD ops
  2018-05-15 10:32 [dpdk-dev] [PATCH v1 0/6]compress: add zlib compression PMD Shally Verma
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 1/6] compress/zlib: add ZLIB PMD support Shally Verma
@ 2018-05-15 10:32 ` Shally Verma
  2018-06-15 11:08   ` Daly, Lee
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 3/6] compress/zlib: add xform and stream create support Shally Verma
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Shally Verma @ 2018-05-15 10:32 UTC (permalink / raw)
  To: pablo.de.lara.guarch
  Cc: fiona.trahe, dev, pathreay, Sunila Sahu, Ashish Gupta

Implement device configure and PMD ops

Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
---
 drivers/compress/zlib/zlib_pmd_ops.c     | 238 +++++++++++++++++++++++++++++++
 drivers/compress/zlib/zlib_pmd_private.h |  77 ++++++++++
 2 files changed, 315 insertions(+)

diff --git a/drivers/compress/zlib/zlib_pmd_ops.c b/drivers/compress/zlib/zlib_pmd_ops.c
new file mode 100644
index 0000000..0bd42f3
--- /dev/null
+++ b/drivers/compress/zlib/zlib_pmd_ops.c
@@ -0,0 +1,238 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2018 Cavium Networks
+ */
+
+#include <string.h>
+
+#include <rte_common.h>
+#include <rte_malloc.h>
+#include <rte_compressdev_pmd.h>
+
+#include "zlib_pmd_private.h"
+
+static const struct rte_compressdev_capabilities zlib_pmd_capabilities[] = {
+	{   /* Deflate */
+		.algo = RTE_COMP_ALGO_DEFLATE,
+		.comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM,
+		.window_size = {
+			.min = 8,
+			.max = 15,
+			.increment = 2
+		},
+	},
+
+	RTE_COMP_END_OF_CAPABILITIES_LIST()
+
+};
+
+/** Configure device */
+static int
+zlib_pmd_config(struct rte_compressdev *dev,
+		struct rte_compressdev_config *config)
+{
+	struct rte_mempool *mp;
+
+	struct zlib_private *internals = dev->data->dev_private;
+	snprintf(internals->mp_name, RTE_MEMPOOL_NAMESIZE,
+			"stream_mp_%u", dev->data->dev_id);
+	mp = rte_mempool_create(internals->mp_name,
+			config->max_nb_priv_xforms + config->max_nb_streams,
+			sizeof(struct zlib_priv_xform),
+			0, 0, NULL, NULL, NULL,
+			NULL, config->socket_id,
+			0);
+	if (mp == NULL) {
+		ZLIB_LOG_ERR("Cannot create private xform pool on socket %d\n",
+				config->socket_id);
+		return -ENOMEM;
+	}
+	return 0;
+}
+
+/** Start device */
+static int
+zlib_pmd_start(__rte_unused struct rte_compressdev *dev)
+{
+	return 0;
+}
+
+/** Stop device */
+static void
+zlib_pmd_stop(struct rte_compressdev *dev)
+{
+	struct zlib_private *internals = dev->data->dev_private;
+	struct rte_mempool *mp = rte_mempool_lookup(internals->mp_name);
+	rte_mempool_free(mp);
+}
+
+/** Close device */
+static int
+zlib_pmd_close(__rte_unused struct rte_compressdev *dev)
+{
+	return 0;
+}
+
+/** Get device statistics */
+static void
+zlib_pmd_stats_get(struct rte_compressdev *dev,
+		struct rte_compressdev_stats *stats)
+{
+	int qp_id;
+
+	for (qp_id = 0; qp_id < dev->data->nb_queue_pairs; qp_id++) {
+		struct zlib_qp *qp = dev->data->queue_pairs[qp_id];
+
+		stats->enqueued_count += qp->qp_stats.enqueued_count;
+		stats->dequeued_count += qp->qp_stats.dequeued_count;
+
+		stats->enqueue_err_count += qp->qp_stats.enqueue_err_count;
+		stats->dequeue_err_count += qp->qp_stats.dequeue_err_count;
+	}
+}
+
+/** Reset device statistics */
+static void
+zlib_pmd_stats_reset(struct rte_compressdev *dev)
+{
+	int qp_id;
+
+	for (qp_id = 0; qp_id < dev->data->nb_queue_pairs; qp_id++) {
+		struct zlib_qp *qp = dev->data->queue_pairs[qp_id];
+
+		memset(&qp->qp_stats, 0, sizeof(qp->qp_stats));
+	}
+}
+
+/** Get device info */
+static void
+zlib_pmd_info_get(struct rte_compressdev *dev,
+		struct rte_compressdev_info *dev_info)
+{
+	struct zlib_private *internals = dev->data->dev_private;
+
+	if (dev_info != NULL) {
+		dev_info->driver_name = dev->device->name;
+		dev_info->feature_flags = dev->feature_flags;
+		dev_info->capabilities = zlib_pmd_capabilities;
+		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
+	}
+}
+
+/** Release queue pair */
+static int
+zlib_pmd_qp_release(struct rte_compressdev *dev, uint16_t qp_id)
+{
+	struct zlib_qp *qp = dev->data->queue_pairs[qp_id];
+	struct rte_ring *r = NULL;
+
+	if (qp != NULL) {
+		r = rte_ring_lookup(qp->name);
+		if (r)
+			rte_ring_free(r);
+		rte_free(qp);
+		dev->data->queue_pairs[qp_id] = NULL;
+	}
+	return 0;
+}
+
+/** set a unique name for the queue pair based on it's name, dev_id and qp_id */
+static int
+zlib_pmd_qp_set_unique_name(struct rte_compressdev *dev,
+		struct zlib_qp *qp)
+{
+	unsigned int n = snprintf(qp->name, sizeof(qp->name),
+				"zlib_pmd_%u_qp_%u",
+				dev->data->dev_id, qp->id);
+
+	if (n >= sizeof(qp->name))
+		return -1;
+
+	return 0;
+}
+
+/** Create a ring to place process packets on */
+static struct rte_ring *
+zlib_pmd_qp_create_processed_pkts_ring(struct zlib_qp *qp,
+		unsigned int ring_size, int socket_id)
+{
+	struct rte_ring *r;
+
+	r = rte_ring_lookup(qp->name);
+	if (r) {
+		if (rte_ring_get_size(r) >= ring_size) {
+			ZLIB_LOG_INFO("Reusing existing ring %s for processed"
+					" packets", qp->name);
+			return r;
+		}
+
+		ZLIB_LOG_ERR("Unable to reuse existing ring %s for processed"
+				" packets", qp->name);
+		return NULL;
+	}
+
+	return rte_ring_create(qp->name, ring_size, socket_id,
+						RING_F_EXACT_SZ);
+}
+
+/** Setup a queue pair */
+static int
+zlib_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
+		uint32_t max_inflight_ops, int socket_id)
+{
+	struct zlib_qp *qp = NULL;
+
+	/* Free memory prior to re-allocation if needed. */
+	if (dev->data->queue_pairs[qp_id] != NULL)
+		zlib_pmd_qp_release(dev, qp_id);
+
+	/* Allocate the queue pair data structure. */
+	qp = rte_zmalloc_socket("ZLIB PMD Queue Pair", sizeof(*qp),
+					RTE_CACHE_LINE_SIZE, socket_id);
+	if (qp == NULL)
+		return (-ENOMEM);
+
+	qp->id = qp_id;
+	dev->data->queue_pairs[qp_id] = qp;
+
+	if (zlib_pmd_qp_set_unique_name(dev, qp))
+		goto qp_setup_cleanup;
+
+	qp->processed_pkts = zlib_pmd_qp_create_processed_pkts_ring(qp,
+			max_inflight_ops, socket_id);
+	if (qp->processed_pkts == NULL)
+		goto qp_setup_cleanup;
+
+	memset(&qp->qp_stats, 0, sizeof(qp->qp_stats));
+	return 0;
+
+qp_setup_cleanup:
+	if (qp) {
+		rte_free(qp);
+		qp = NULL;
+	}
+	return -1;
+}
+
+struct rte_compressdev_ops zlib_pmd_ops = {
+		.dev_configure		= zlib_pmd_config,
+		.dev_start		= zlib_pmd_start,
+		.dev_stop		= zlib_pmd_stop,
+		.dev_close		= zlib_pmd_close,
+
+		.stats_get		= zlib_pmd_stats_get,
+		.stats_reset		= zlib_pmd_stats_reset,
+
+		.dev_infos_get		= zlib_pmd_info_get,
+
+		/* TODO:Check if no q-pair count needed*/
+		.queue_pair_setup	= zlib_pmd_qp_setup,
+		.queue_pair_release	= zlib_pmd_qp_release,
+
+		.private_xform_create	= NULL,
+		.private_xform_free	= NULL,
+
+		.stream_create	= NULL,
+		.stream_free	= NULL
+};
+
+struct rte_compressdev_ops *rte_zlib_pmd_ops = &zlib_pmd_ops;
diff --git a/drivers/compress/zlib/zlib_pmd_private.h b/drivers/compress/zlib/zlib_pmd_private.h
new file mode 100644
index 0000000..d29dc59
--- /dev/null
+++ b/drivers/compress/zlib/zlib_pmd_private.h
@@ -0,0 +1,77 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2017-2018 Cavium Networks
+ */
+
+#ifndef _RTE_ZLIB_PMD_PRIVATE_H_
+#define _RTE_ZLIB_PMD_PRIVATE_H_
+
+#include <zlib.h>
+#include <rte_comp.h>
+#include <rte_compressdev.h>
+#include <rte_compressdev_pmd.h>
+
+#define COMPRESSDEV_NAME_ZLIB_PMD	compress_zlib
+/**< ZLIB PMD device name */
+
+#define ZLIB_PMD_MAX_NB_QUEUE_PAIRS	1
+/**< ZLIB PMD specified queue pairs */
+
+#define DEF_MEM_LEVEL			8
+
+int zlib_logtype_driver;
+#define ZLIB_LOG(level, fmt, args...) \
+	rte_log(RTE_LOG_ ## level, zlib_logtype_driver, "%s(): "fmt "\n", \
+			__func__, ##args)
+
+#define ZLIB_LOG_INFO(fmt, args...) \
+	ZLIB_LOG(INFO, fmt, ## args)
+#define ZLIB_LOG_ERR(fmt, args...) \
+	ZLIB_LOG(ERR, fmt, ## args)
+#define ZLIB_LOG_WARN(fmt, args...) \
+	ZLIB_LOG(WARNING, fmt, ## args)
+
+struct zlib_private {
+	uint32_t max_nb_queue_pairs;
+	char mp_name[RTE_MEMPOOL_NAMESIZE];
+};
+
+struct zlib_qp {
+	struct rte_ring *processed_pkts;
+	/**< Ring for placing process packets */
+	struct rte_compressdev_stats qp_stats;
+	/**< Queue pair statistics */
+	uint16_t id;
+	/**< Queue Pair Identifier */
+	char name[RTE_COMPRESSDEV_NAME_MAX_LEN];
+	/**< Unique Queue Pair Name */
+} __rte_cache_aligned;
+
+/* Algorithm handler function prototype */
+typedef void (*comp_func_t)(struct rte_comp_op *op, z_stream *strm);
+
+typedef int (*comp_free_t)(z_stream *strm);
+
+/** ZLIB Stream structure */
+struct zlib_stream {
+	z_stream strm;
+	/**< zlib stream structure */
+	comp_func_t comp;
+	/**< Operation (compression/decompression) */
+	comp_free_t free;
+	/**< Free Operation (compression/decompression) */
+} __rte_cache_aligned;
+
+/** ZLIB private xform structure */
+struct zlib_priv_xform {
+	struct zlib_stream stream;
+} __rte_cache_aligned;
+
+/** Set ZLIB compression private-xform/Stream parameters */
+extern int
+zlib_set_stream_parameters(const struct rte_comp_xform *xform,
+	struct zlib_stream *stream);
+
+/** Device specific operations function pointer structure */
+extern struct rte_compressdev_ops *rte_zlib_pmd_ops;
+
+#endif /* _RTE_ZLIB_PMD_PRIVATE_H_ */
-- 
2.9.5

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH v1 3/6] compress/zlib: add xform and stream create support
  2018-05-15 10:32 [dpdk-dev] [PATCH v1 0/6]compress: add zlib compression PMD Shally Verma
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 1/6] compress/zlib: add ZLIB PMD support Shally Verma
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 2/6] compress/zlib: add device setup PMD ops Shally Verma
@ 2018-05-15 10:32 ` Shally Verma
  2018-06-15 11:09   ` Daly, Lee
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 4/6] compress/zlib: add enq deq apis Shally Verma
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Shally Verma @ 2018-05-15 10:32 UTC (permalink / raw)
  To: pablo.de.lara.guarch
  Cc: fiona.trahe, dev, pathreay, Sunila Sahu, Ashish Gupta

Implement private xform and stream create ops

Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
---
 drivers/compress/zlib/zlib_pmd.c     | 99 ++++++++++++++++++++++++++++++++++++
 drivers/compress/zlib/zlib_pmd_ops.c | 84 ++++++++++++++++++++++++++++--
 2 files changed, 179 insertions(+), 4 deletions(-)

diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
index bbf49f1..3dc71ec 100644
--- a/drivers/compress/zlib/zlib_pmd.c
+++ b/drivers/compress/zlib/zlib_pmd.c
@@ -19,6 +19,105 @@
 static uint8_t compressdev_driver_id;
 int zlib_logtype_driver;
 
+/** Parse comp xform and set private xform/Stream parameters */
+int
+zlib_set_stream_parameters(const struct rte_comp_xform *xform,
+		struct zlib_stream *stream)
+{
+	int strategy, level, wbits;
+	z_stream *strm = &stream->strm;
+
+	/* allocate deflate state */
+	strm->zalloc = Z_NULL;
+	strm->zfree = Z_NULL;
+	strm->opaque = Z_NULL;
+
+	switch (xform->type) {
+	case RTE_COMP_COMPRESS:
+
+		stream->comp = process_zlib_deflate;
+		stream->free = deflateEnd;
+		/** Compression window bits */
+		switch (xform->compress.algo) {
+		case RTE_COMP_ALGO_DEFLATE:
+			wbits = -(xform->compress.window_size);
+			break;
+		default:
+			ZLIB_LOG_ERR("Compression algorithm not supported\n");
+			return -1;
+		}
+
+		/** Compression Level */
+		switch (xform->compress.level) {
+		case RTE_COMP_LEVEL_PMD_DEFAULT:
+			level = Z_DEFAULT_COMPRESSION;
+			break;
+		case RTE_COMP_LEVEL_NONE:
+			level = Z_NO_COMPRESSION;
+			break;
+		case RTE_COMP_LEVEL_MIN:
+			level = Z_BEST_SPEED;
+			break;
+		case RTE_COMP_LEVEL_MAX:
+			level = Z_BEST_COMPRESSION;
+			break;
+		default:
+			level = xform->compress.level;
+
+			if (level < RTE_COMP_LEVEL_MIN ||
+					level > RTE_COMP_LEVEL_MAX) {
+				ZLIB_LOG_ERR("Compression level not supported\n");
+				return -1;
+			}
+		}
+
+		/** Compression strategy */
+		switch (xform->compress.deflate.huffman) {
+		case RTE_COMP_HUFFMAN_DEFAULT:
+			strategy = Z_DEFAULT_STRATEGY;
+			break;
+		case RTE_COMP_HUFFMAN_FIXED:
+			strategy = Z_FIXED;
+			break;
+		case RTE_COMP_HUFFMAN_DYNAMIC:
+			strategy = Z_HUFFMAN_ONLY;
+			break;
+		default:
+			ZLIB_LOG_ERR("Compression strategy not supported\n");
+			return -1;
+		}
+		if (deflateInit2(strm, level,
+					Z_DEFLATED, wbits,
+					DEF_MEM_LEVEL, strategy) != Z_OK) {
+			ZLIB_LOG_ERR("Deflate init failed\n");
+			return -1;
+		}
+		break;
+	case RTE_COMP_DECOMPRESS:
+
+		stream->comp = process_zlib_inflate;
+		stream->free = inflateEnd;
+		/** window bits */
+		switch (xform->decompress.algo) {
+		case RTE_COMP_ALGO_DEFLATE:
+			wbits = -(xform->decompress.window_size);
+			break;
+		default:
+			ZLIB_LOG_ERR("Compression algorithm not supported\n");
+			return -1;
+		}
+
+		if (inflateInit2(strm, wbits) != Z_OK) {
+			ZLIB_LOG_ERR("Inflate init failed\n");
+			return -1;
+		}
+		break;
+	default:
+		return -1;
+	}
+	return 0;
+}
+
 static int zlib_remove(struct rte_vdev_device *vdev);
 
 static int
diff --git a/drivers/compress/zlib/zlib_pmd_ops.c b/drivers/compress/zlib/zlib_pmd_ops.c
index 0bd42f3..be4fccd 100644
--- a/drivers/compress/zlib/zlib_pmd_ops.c
+++ b/drivers/compress/zlib/zlib_pmd_ops.c
@@ -213,6 +213,82 @@ zlib_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
 	return -1;
 }
 
+/** Configure stream */
+static int
+zlib_pmd_stream_create(struct rte_compressdev *dev,
+		const struct rte_comp_xform *xform,
+		void **zstream)
+{
+	int ret = 0;
+	struct zlib_stream *stream;
+	struct zlib_private *internals = dev->data->dev_private;
+
+	if (xform == NULL) {
+		ZLIB_LOG_ERR("invalid xform struct");
+		return -EINVAL;
+	}
+
+	struct rte_mempool *mp = rte_mempool_lookup(internals->mp_name);
+	if (rte_mempool_get(mp, (void **)zstream)) {
+		ZLIB_LOG_ERR(
+				"Couldn't get object from session mempool");
+		return -ENOMEM;
+	}
+	stream = *((struct zlib_stream **)zstream);
+
+	ret = zlib_set_stream_parameters(xform, stream);
+
+	if (ret < 0) {
+		ZLIB_LOG_ERR("failed configure session parameters");
+
+		memset(stream, 0, sizeof(struct zlib_stream));
+		/* Return session to mempool */
+		rte_mempool_put(mp, stream);
+	}
+
+	return 0;
+}
+
+/** Configure private xform */
+static int
+zlib_pmd_private_xform_create(struct rte_compressdev *dev,
+		const struct rte_comp_xform *xform,
+		void **private_xform)
+{
+	int ret = 0;
+
+	ret = zlib_pmd_stream_create(dev, xform, private_xform);
+	return ret;
+}
+
+/** Clear the memory of stream so it doesn't leave key material behind */
+static int
+zlib_pmd_stream_free(__rte_unused struct rte_compressdev *dev,
+		void *zstream)
+{
+	struct zlib_stream *stream = zstream;
+	if (!stream)
+		return -EINVAL;
+
+	stream->free(&stream->strm);
+	/* Zero out the whole structure */
+	memset(stream, 0, sizeof(struct zlib_stream));
+	struct rte_mempool *mp = rte_mempool_from_obj(stream);
+	rte_mempool_put(mp, stream);
+
+	return 0;
+}
+
+/** Clear the memory of stream so it doesn't leave key material behind */
+static int
+zlib_pmd_private_xform_free(struct rte_compressdev *dev,
+		void *private_xform)
+{
+	zlib_pmd_stream_free(dev, private_xform);
+
+	return 0;
+}
+
 struct rte_compressdev_ops zlib_pmd_ops = {
 		.dev_configure		= zlib_pmd_config,
 		.dev_start		= zlib_pmd_start,
@@ -228,11 +304,11 @@ struct rte_compressdev_ops zlib_pmd_ops = {
 		.queue_pair_setup	= zlib_pmd_qp_setup,
 		.queue_pair_release	= zlib_pmd_qp_release,
 
-		.private_xform_create	= NULL,
-		.private_xform_free	= NULL,
+		.private_xform_create	= zlib_pmd_private_xform_create,
+		.private_xform_free		= zlib_pmd_private_xform_free,
 
-		.stream_create	= NULL,
-		.stream_free	= NULL
+		.stream_create	= zlib_pmd_stream_create,
+		.stream_free	= zlib_pmd_stream_free
 };
 
 struct rte_compressdev_ops *rte_zlib_pmd_ops = &zlib_pmd_ops;
-- 
2.9.5

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH v1 4/6] compress/zlib: add enq deq apis
  2018-05-15 10:32 [dpdk-dev] [PATCH v1 0/6]compress: add zlib compression PMD Shally Verma
                   ` (2 preceding siblings ...)
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 3/6] compress/zlib: add xform and stream create support Shally Verma
@ 2018-05-15 10:32 ` Shally Verma
  2018-06-15 11:09   ` Daly, Lee
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 5/6] test: add ZLIB PMD for compressdev tests Shally Verma
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 6/6] doc: add ZLIB PMD documentation Shally Verma
  5 siblings, 1 reply; 15+ messages in thread
From: Shally Verma @ 2018-05-15 10:32 UTC (permalink / raw)
  To: pablo.de.lara.guarch
  Cc: fiona.trahe, dev, pathreay, Sunila Sahu, Ashish Gupta

implement enqueue and dequeue apis

Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
---
 drivers/compress/meson.build      |   2 +-
 drivers/compress/zlib/meson.build |  11 ++
 drivers/compress/zlib/zlib_pmd.c  | 275 +++++++++++++++++++++++++++++++++++++-
 3 files changed, 286 insertions(+), 2 deletions(-)

diff --git a/drivers/compress/meson.build b/drivers/compress/meson.build
index fb136e1..e4d5e5c 100644
--- a/drivers/compress/meson.build
+++ b/drivers/compress/meson.build
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
-drivers = ['isal']
+drivers = ['isal','zlib']
 
 std_deps = ['compressdev'] # compressdev pulls in all other needed deps
 config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
diff --git a/drivers/compress/zlib/meson.build b/drivers/compress/zlib/meson.build
new file mode 100644
index 0000000..d66de95
--- /dev/null
+++ b/drivers/compress/zlib/meson.build
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Cavium Networks
+
+dep = dependency('zlib', required: false)
+if not dep.found()
+	build = false
+endif
+deps += 'bus_vdev'
+sources = files('zlib_pmd.c', 'zlib_pmd_ops.c')
+ext_deps += dep
+pkgconfig_extra_libs += '-lz'
diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
index 3dc71ec..e2681a7 100644
--- a/drivers/compress/zlib/zlib_pmd.c
+++ b/drivers/compress/zlib/zlib_pmd.c
@@ -17,7 +17,239 @@
 #include "zlib_pmd_private.h"
 
 static uint8_t compressdev_driver_id;
-int zlib_logtype_driver;
+
+/** compute the next mbuf in list and assign dst buffer and dlen,
+ * set op->status to appropriate flag if we run out of mbuf
+ */
+#define COMPUTE_DST_BUF(mbuf, dst, dlen)		\
+	((mbuf = mbuf->next) ?						\
+		(dst = rte_pktmbuf_mtod(mbuf, uint8_t *)),		\
+		dlen = rte_pktmbuf_data_len(mbuf) :			\
+			!(op->status =					\
+			((op->op_type == RTE_COMP_OP_STATELESS) ?	\
+			RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED :	\
+			RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE)))
+
+static void
+process_zlib_deflate(struct rte_comp_op *op, z_stream *strm)
+{
+	int ret, flush, fin_flush;
+	uint8_t *src, *dst;
+	uint32_t sl, dl, have;
+	struct rte_mbuf *mbuf_src = op->m_src;
+	struct rte_mbuf *mbuf_dst = op->m_dst;
+
+	src = rte_pktmbuf_mtod_offset(mbuf_src, uint8_t *, op->src.offset);
+
+	sl = rte_pktmbuf_data_len(mbuf_src) - op->src.offset;
+
+	dst = rte_pktmbuf_mtod_offset(mbuf_dst, unsigned char *,
+			op->dst.offset);
+
+	dl = rte_pktmbuf_data_len(mbuf_dst) - op->dst.offset;
+
+	if (unlikely(!src || !dst || !strm)) {
+		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
+		ZLIB_LOG_ERR("\nInvalid source or destination buffers");
+		return;
+	}
+	switch (op->flush_flag) {
+	case RTE_COMP_FLUSH_NONE:
+		fin_flush = Z_NO_FLUSH;
+		break;
+	case RTE_COMP_FLUSH_SYNC:
+		fin_flush = Z_SYNC_FLUSH;
+		break;
+	case RTE_COMP_FLUSH_FULL:
+		fin_flush = Z_FULL_FLUSH;
+		break;
+	case RTE_COMP_FLUSH_FINAL:
+		fin_flush = Z_FINISH;
+		break;
+	default:
+		op->status = RTE_COMP_OP_STATUS_ERROR;
+		goto def_end;
+	}
+	if (op->src.length <= sl) {
+		sl = op->src.length;
+		flush = fin_flush;
+	} else {
+		/* if there're more than one mbufs in input,
+		 * process intermediate with NO_FLUSH
+		 */
+		flush = Z_NO_FLUSH;
+	}
+	/* initialize status to SUCCESS */
+	op->status = RTE_COMP_OP_STATUS_SUCCESS;
+
+	do {
+		/* Update z_stream with the inputs provided by application */
+		strm->next_in = src;
+		strm->avail_in = sl;
+
+		do {
+			strm->avail_out = dl;
+			strm->next_out = dst;
+			ret = deflate(strm, flush);
+			if (unlikely(ret == Z_STREAM_ERROR)) {
+				/* error return, do not process further */
+				op->status =  RTE_COMP_OP_STATUS_ERROR;
+				goto def_end;
+			}
+			/* Update op stats */
+			op->produced += dl - strm->avail_out;
+			op->consumed += sl - strm->avail_in;
+		/* Break if Z_STREAM_END is encountered or dst mbuf gets over */
+		} while (!(ret == Z_STREAM_END) && (strm->avail_out == 0) &&
+				COMPUTE_DST_BUF(mbuf_dst, dst, dl));
+
+		/** Compress till the end of compressed blocks provided
+		 * or till Z_FINISH
+		 * Exit if op->status is not SUCCESS.
+		 */
+		if ((op->status != RTE_COMP_OP_STATUS_SUCCESS) ||
+			(ret == Z_STREAM_END) ||
+			op->consumed == op->src.length)
+			goto def_end;
+
+		/** Update last output buffer with respect to availed space */
+		have = dl - strm->avail_out;
+		dst += have;
+		dl = strm->avail_out;
+		/** Update source buffer to next mbuf*/
+		mbuf_src = mbuf_src->next;
+		src = rte_pktmbuf_mtod(mbuf_src, uint8_t *);
+		sl = rte_pktmbuf_data_len(mbuf_src);
+
+		/** Last block to be compressed
+		 * Update flush with value provided by app for last block,
+		 * For stateless flush should be always Z_FINISH
+		 */
+
+		if ((op->src.length - op->consumed) <= sl) {
+			sl = (op->src.length - op->consumed);
+			flush = fin_flush;
+		}
+
+	} while (1);
+def_end:
+	if (op->op_type == RTE_COMP_OP_STATELESS)
+		deflateReset(strm);
+}
+
+static void
+process_zlib_inflate(struct rte_comp_op *op, z_stream *strm)
+{
+	int ret, flush;
+	uint8_t *src, *dst;
+	uint32_t sl, dl, have;
+	struct rte_mbuf *mbuf_src = op->m_src;
+	struct rte_mbuf *mbuf_dst = op->m_dst;
+
+	src = rte_pktmbuf_mtod_offset(mbuf_src, uint8_t *, op->src.offset);
+
+	sl = rte_pktmbuf_data_len(mbuf_src) - op->src.offset;
+
+	dst = rte_pktmbuf_mtod_offset(mbuf_dst, unsigned char *,
+			op->dst.offset);
+
+	dl = rte_pktmbuf_data_len(mbuf_dst) - op->dst.offset;
+
+	if (unlikely(!src || !dst || !strm)) {
+		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
+		ZLIB_LOG_ERR("\nInvalid source or destination buffers");
+		return;
+	}
+	if (op->src.length <= sl)
+		sl = op->src.length;
+
+	/** Ignoring flush value provided from application for decompression */
+	flush = Z_NO_FLUSH;
+	/* initialize status to SUCCESS */
+	op->status = RTE_COMP_OP_STATUS_SUCCESS;
+
+	do {
+		/** Update z_stream with the inputs provided by application */
+		strm->avail_in = sl;
+		strm->next_in = src;
+		do {
+			strm->avail_out = dl;
+			strm->next_out = dst;
+
+			ret = inflate(strm, flush);
+
+			switch (ret) {
+			case Z_NEED_DICT:
+				ret = Z_DATA_ERROR;     /* and fall through */
+			case Z_DATA_ERROR:
+			case Z_MEM_ERROR:
+			case Z_STREAM_ERROR:
+				op->status = RTE_COMP_OP_STATUS_ERROR;
+				goto inf_end;
+			default:
+				/** Update op stats */
+				op->produced += dl - strm->avail_out;
+				op->consumed += sl - strm->avail_in;
+
+			}
+		/* Break if Z_STREAM_END is encountered or dst mbuf gets over */
+		} while (!(ret == Z_STREAM_END) && (strm->avail_out == 0) &&
+				COMPUTE_DST_BUF(mbuf_dst, dst, dl));
+
+		/** Compress till the end of compressed blocks provided
+		 * or till Z_STREAM_END.
+		 * Exit if op->status is not SUCCESS.
+		 */
+		if ((op->status != RTE_COMP_OP_STATUS_SUCCESS) ||
+				(ret == Z_STREAM_END) ||
+				op->consumed == op->src.length) {
+			goto inf_end;
+		}
+		/** Adjust previous output buffer with respect to avail_out */
+		have = dl - strm->avail_out;
+		dst += have;
+		dl = strm->avail_out;
+		/** Read next input buffer to be processed */
+		mbuf_src = mbuf_src->next;
+		src = rte_pktmbuf_mtod(mbuf_src, uint8_t *);
+		sl = rte_pktmbuf_data_len(mbuf_src);
+		if ((op->src.length - op->consumed) < sl)
+			sl = (op->src.length - op->consumed);
+	} while (1);
+inf_end:
+	if (op->op_type == RTE_COMP_OP_STATELESS)
+		inflateReset(strm);
+}
+
+/** Process comp operation for mbuf */
+static inline int
+process_zlib_op(struct zlib_qp *qp, struct rte_comp_op *op)
+{
+	struct zlib_stream *stream;
+
+	if (op->src.offset > rte_pktmbuf_data_len(op->m_src) ||
+			op->dst.offset > rte_pktmbuf_data_len(op->m_dst)) {
+		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
+		ZLIB_LOG_ERR("\nInvalid source or destination buffers");
+		goto comp_err;
+	}
+
+	if (op->op_type == RTE_COMP_OP_STATELESS)
+		stream = &((struct zlib_priv_xform *)op->private_xform)->stream;
+	else if (op->op_type == RTE_COMP_OP_STATEFUL)
+		stream = (struct zlib_stream *)op->stream;
+	else {
+		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
+		ZLIB_LOG_ERR("\nInvalid operation type");
+		goto comp_err;
+	}
+	stream->comp(op, &stream->strm);
+comp_err:
+	/* whatever is out of op, put it into completion queue with
+	 * its status
+	 */
+	return rte_ring_enqueue(qp->processed_pkts, (void *)op);
+}
 
 /** Parse comp xform and set private xform/Stream parameters */
 int
@@ -118,6 +350,43 @@ zlib_set_stream_parameters(const struct rte_comp_xform *xform,
 	return 0;
 }
 
+static uint16_t
+zlib_pmd_enqueue_burst(void *queue_pair,
+			struct rte_comp_op **ops, uint16_t nb_ops)
+{
+	struct zlib_qp *qp = queue_pair;
+	int ret, i;
+	int enqd = 0;
+	for (i = 0; i < nb_ops; i++) {
+		ret = process_zlib_op(qp, ops[i]);
+		if (unlikely(ret < 0)) {
+			/* increment count if failed to push to completion
+			 * queue
+			 */
+			qp->qp_stats.enqueue_err_count++;
+		} else {
+			qp->qp_stats.enqueued_count++;
+			enqd++;
+		}
+	}
+	return enqd;
+}
+
+static uint16_t
+zlib_pmd_dequeue_burst(void *queue_pair,
+			struct rte_comp_op **ops, uint16_t nb_ops)
+{
+	struct zlib_qp *qp = queue_pair;
+
+	unsigned int nb_dequeued = 0;
+
+	nb_dequeued = rte_ring_dequeue_burst(qp->processed_pkts,
+			(void **)ops, nb_ops, NULL);
+	qp->qp_stats.dequeued_count += nb_dequeued;
+
+	return nb_dequeued;
+}
+
 static int zlib_remove(struct rte_vdev_device *vdev);
 
 static int
@@ -138,6 +407,10 @@ zlib_create(const char *name,
 	dev->driver_id = compressdev_driver_id;
 	dev->dev_ops = rte_zlib_pmd_ops;
 
+	/* register rx/tx burst functions for data path */
+	dev->dequeue_burst = zlib_pmd_dequeue_burst;
+	dev->enqueue_burst = zlib_pmd_enqueue_burst;
+
 	dev->feature_flags = 0;
 	dev->feature_flags |= RTE_COMP_FF_SHAREABLE_PRIV_XFORM |
 				RTE_COMP_FF_NONCOMPRESSED_BLOCKS |
-- 
2.9.5

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH v1 5/6] test: add ZLIB PMD for compressdev tests
  2018-05-15 10:32 [dpdk-dev] [PATCH v1 0/6]compress: add zlib compression PMD Shally Verma
                   ` (3 preceding siblings ...)
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 4/6] compress/zlib: add enq deq apis Shally Verma
@ 2018-05-15 10:32 ` Shally Verma
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 6/6] doc: add ZLIB PMD documentation Shally Verma
  5 siblings, 0 replies; 15+ messages in thread
From: Shally Verma @ 2018-05-15 10:32 UTC (permalink / raw)
  To: pablo.de.lara.guarch
  Cc: fiona.trahe, dev, pathreay, Sunila Sahu, Ashish Gupta

link zlib pmd library in app.mk

Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
---
 mk/rte.app.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 6807663..71b9e89 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -237,6 +237,8 @@ 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
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ZLIB) += -lrte_pmd_zlib
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ZLIB) += -lz
 endif # CONFIG_RTE_LIBRTE_COMPRESSDEV
 
 ifeq ($(CONFIG_RTE_LIBRTE_EVENTDEV),y)
-- 
2.9.5

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH v1 6/6] doc: add ZLIB PMD documentation
  2018-05-15 10:32 [dpdk-dev] [PATCH v1 0/6]compress: add zlib compression PMD Shally Verma
                   ` (4 preceding siblings ...)
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 5/6] test: add ZLIB PMD for compressdev tests Shally Verma
@ 2018-05-15 10:32 ` Shally Verma
  2018-06-15 11:09   ` Daly, Lee
  5 siblings, 1 reply; 15+ messages in thread
From: Shally Verma @ 2018-05-15 10:32 UTC (permalink / raw)
  To: pablo.de.lara.guarch
  Cc: fiona.trahe, dev, pathreay, Sunila Sahu, Ashish Gupta

add zlib pmd feature specification and overview documentation

Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
---
 doc/guides/compressdevs/features/zlib.ini | 22 ++++++++++
 doc/guides/compressdevs/zlib.rst          | 72 +++++++++++++++++++++++++++++++
 2 files changed, 94 insertions(+)

diff --git a/doc/guides/compressdevs/features/zlib.ini b/doc/guides/compressdevs/features/zlib.ini
new file mode 100644
index 0000000..10e758b
--- /dev/null
+++ b/doc/guides/compressdevs/features/zlib.ini
@@ -0,0 +1,22 @@
+;
+; Refer to default.ini for the full list of available PMD features.
+;
+; Supported features of 'ZLIB' compression driver.
+;
+[Features]
+HW Accelerated =
+CPU SSE        =
+CPU AVX        =
+CPU AVX2       =
+CPU AVX512     =
+CPU NEON       =
+Stateful       =
+By-Pass        =
+Chained mbufs  =
+Deflate        = Y
+LZS            =
+Adler32        = Y
+Crc32          = Y
+Adler32&Crc32  =
+Fixed          = Y
+Dynamic        = Y
diff --git a/doc/guides/compressdevs/zlib.rst b/doc/guides/compressdevs/zlib.rst
new file mode 100644
index 0000000..130750b
--- /dev/null
+++ b/doc/guides/compressdevs/zlib.rst
@@ -0,0 +1,72 @@
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright(c) 2018 Cavium Networks.
+
+ZLIB Compression Poll Mode Driver
+==================================
+
+The ZLIB PMD (**librte_pmd_zlib**) provides poll mode compression &
+decompression driver based on SW zlib library,
+
+Features
+--------
+
+ZLIB PMD has support for:
+
+Compression/Decompression algorithm:
+
+* DEFLATE
+
+Huffman code type:
+
+* FIXED
+* DYNAMIC
+
+Checksum support:
+
+* Adler32
+* CRC32
+
+Window size support:
+
+* 32K
+
+Limitations
+-----------
+
+* Chained mbufs are not supported.
+
+Installation
+------------
+
+* To build DPDK with ZLIB library, the user is required to download the ``libz`` library.
+* Use following command for installation.
+
+*  For Fedora users ::
+  yum install zlib-devel
+*  For ubuntu users ::
+  apt-get install zlib1g-dev
+
+* Once downloaded, the user needs to build the library.
+
+* make can  be used to install the library on their system, before building DPDK::
+
+    make
+    sudo make install
+
+Initialization
+--------------
+
+In order to enable this virtual compression PMD, user must:
+
+* Set ``CONFIG_RTE_LIBRTE_PMD_ZLIB=y`` in config/common_base.
+
+To use the PMD in an application, user must:
+
+* Call ``rte_vdev_init("compress_zlib")`` within the application.
+
+* Use ``--vdev="compress_zlib"`` in the EAL options, which will call ``rte_vdev_init()`` internally.
+
+The following parameter (optional) can be provided in the previous two calls:
+
+* ``socket_id:`` Specify the socket where the memory for the device is going to be allocated
+  (by default, socket_id will be the socket where the core that is creating the PMD is running on).
-- 
2.9.5

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v1 1/6] compress/zlib: add ZLIB PMD support
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 1/6] compress/zlib: add ZLIB PMD support Shally Verma
@ 2018-06-15 11:08   ` Daly, Lee
  0 siblings, 0 replies; 15+ messages in thread
From: Daly, Lee @ 2018-06-15 11:08 UTC (permalink / raw)
  To: 'Shally Verma'
  Cc: Trahe, Fiona, dev, pathreay, Sunila Sahu, Ashish Gupta,
	De Lara Guarch, Pablo

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 <pablo.de.lara.guarch@intel.com>
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; dev@dpdk.org;
> pathreay@caviumnetworks.com; Sunila Sahu
> <sunila.sahu@caviumnetworks.com>; Ashish Gupta
> <ashish.gupta@caviumnetworks.com>
> 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=n
> CONFIG_RTE_LIBRTE_PMD_ISAL=n
> 
>  #
> +# Compile PMD for ZLIB compression device #
> +CONFIG_RTE_LIBRTE_PMD_ZLIB=n
> CONFIG_RTE_LIBRTE_PMD_ZLIB_DEBUG=n
[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=y
> 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
> 
>  DIRS-$(CONFIG_RTE_LIBRTE_PMD_ISAL) += isal
> +DIRS-$(CONFIG_RTE_LIBRTE_PMD_ZLIB) += zlib
> 
>  include $(RTE_SDK)/mk/rte.subdir.mk
> diff --git a/drivers/compress/zlib/Makefile b/drivers/compress/zlib/Makefile
> 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 = librte_pmd_zlib.a
> +
> +# build flags
> +CFLAGS += -O3
> +CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
> +
> +# library version
> +LIBABIVER := 1
> +
> +# versioning export map
> +EXPORT_MAP := rte_pmd_zlib_version.map
> +
> +# external library dependencies
> +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring -lz LDLIBS +=
> +-lrte_compressdev LDLIBS += -lrte_bus_vdev
> +
> +# library source files
> +SRCS-$(CONFIG_RTE_LIBRTE_PMD_ZLIB) += zlib_pmd.c
> +SRCS-$(CONFIG_RTE_LIBRTE_PMD_ZLIB) += zlib_pmd_ops.c
> +
> +# export include files
> +SYMLINK-y-include +=
> +
[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 <rte_common.h>
> +#include <rte_hexdump.h>
> +#include <rte_comp.h>
> +#include <rte_compressdev.h>
> +#include <rte_compressdev_pmd.h>
> +#include <rte_bus_vdev.h>
> +#include <rte_malloc.h>
> +#include <rte_cpuflags.h>
> +#include <rte_byteorder.h>
> +
> +#include <math.h>
> +#include <assert.h>
> +#include "zlib_pmd_private.h"
> +
> +static uint8_t compressdev_driver_id;
[Lee] The current API no longer has rte_compressdev->driver_id anymore therefor 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 = rte_compressdev_pmd_create(name, &vdev->device,
> +			sizeof(struct zlib_private), init_params);
> +	if (dev == NULL) {
> +		ZLIB_LOG_ERR("driver %s: create failed", init_params-
> >name);
> +		return -ENODEV;
> +	}
> +
> +	dev->driver_id = compressdev_driver_id;
[Lee] See above comment.

> +	dev->dev_ops = rte_zlib_pmd_ops;
> +
> +	dev->feature_flags = 0;
> +	dev->feature_flags |= RTE_COMP_FF_SHAREABLE_PRIV_XFORM |
> +				RTE_COMP_FF_NONCOMPRESSED_BLOCKS |
> +				RTE_COMP_FF_ADLER32_CHECKSUM;

Thanks,
Lee.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v1 2/6] compress/zlib: add device setup PMD ops
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 2/6] compress/zlib: add device setup PMD ops Shally Verma
@ 2018-06-15 11:08   ` Daly, Lee
  2018-06-22 13:21     ` Verma, Shally
  0 siblings, 1 reply; 15+ messages in thread
From: Daly, Lee @ 2018-06-15 11:08 UTC (permalink / raw)
  To: 'Shally Verma'
  Cc: Trahe, Fiona, dev, pathreay, Sunila Sahu, Ashish Gupta,
	De Lara Guarch, Pablo

Hi Shally,
Comments inline.


> -----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 <pablo.de.lara.guarch@intel.com>
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; dev@dpdk.org;
> pathreay@caviumnetworks.com; Sunila Sahu
> <sunila.sahu@caviumnetworks.com>; Ashish Gupta
> <ashish.gupta@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH v1 2/6] compress/zlib: add device setup PMD
> ops
> 
>diff --git a/drivers/compress/zlib/zlib_pmd_ops.c b/drivers/compress/zlib/zlib_pmd_ops.c
>new file mode 100644
>index 0000000..0bd42f3
>--- /dev/null
>+++ b/drivers/compress/zlib/zlib_pmd_ops.c
>@@ -0,0 +1,238 @@ 
>+/* SPDX-License-Identifier: BSD-3-Clause
>+ * Copyright(c) 2018 Cavium Networks
>+ */
>+
>+#include <string.h>
>+
>+#include <rte_common.h>
>+#include <rte_malloc.h>
>+#include <rte_compressdev_pmd.h>
>+
>+#include "zlib_pmd_private.h"
>+
>+static const struct rte_compressdev_capabilities zlib_pmd_capabilities[] = {
>+	{   /* Deflate */
>+		.algo = RTE_COMP_ALGO_DEFLATE,
>+		.comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM,
[Lee] The priv_xform structure in this case is not shareable, as it contains your zlib_stream structure, which contains zlibs own zstream struct. This is not read only, the contents of this zstream will be written to, which means it is not shareable across queue pairs or devices.

>+		.window_size = {
>+			.min = 8,
>+			.max = 15,
>+			.increment = 2
>+		},
>+	},
>+
>+	RTE_COMP_END_OF_CAPABILITIES_LIST()
>+
>+};
> +/** Configure device */
> +static int
> +zlib_pmd_config(struct rte_compressdev *dev,
> +		struct rte_compressdev_config *config) {
> +	struct rte_mempool *mp;
> +
> +	struct zlib_private *internals = dev->data->dev_private;
> +	snprintf(internals->mp_name, RTE_MEMPOOL_NAMESIZE,
> +			"stream_mp_%u", dev->data->dev_id);
> +	mp = rte_mempool_create(internals->mp_name,
> +			config->max_nb_priv_xforms + config-
> >max_nb_streams,
> +			sizeof(struct zlib_priv_xform),
> +			0, 0, NULL, NULL, NULL,
> +			NULL, config->socket_id,
> +			0);
[Lee] Could you add a mempool_lookup here to ensure its not already created please.

> +	if (mp == NULL) {
> +		ZLIB_LOG_ERR("Cannot create private xform pool on socket
> %d\n",
> +				config->socket_id);
> +		return -ENOMEM;
> +	}
> +	return 0;
> +}
> +
> +/** Start device */
> +static int
> +zlib_pmd_start(__rte_unused struct rte_compressdev *dev) {
> +	return 0;
> +}
> +
> +/** Stop device */
> +static void
> +zlib_pmd_stop(struct rte_compressdev *dev) {
> +	struct zlib_private *internals = dev->data->dev_private;
> +	struct rte_mempool *mp = rte_mempool_lookup(internals-
> >mp_name);
> +	rte_mempool_free(mp);
> +}
> +
[Lee] I believe it would be better to have the freeing functionality in the pmd_close function, as a user may want to stop a device, without freeing its memory, especially since the start function does nothing here. i.e. if the user stops device then starts again, memory needed has been free'd but not realloc'ed. Hope this makes sense.

> +/** Close device */
> +static int
> +zlib_pmd_close(__rte_unused struct rte_compressdev *dev) {
> +	return 0;
> +}

<...>
> diff --git a/drivers/compress/zlib/zlib_pmd_private.h
> b/drivers/compress/zlib/zlib_pmd_private.h
> new file mode 100644
> index 0000000..d29dc59
> --- /dev/null
> +++ b/drivers/compress/zlib/zlib_pmd_private.h
> @@ -0,0 +1,77 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2017-2018 Cavium Networks  */
> +
> +#ifndef _RTE_ZLIB_PMD_PRIVATE_H_
> +#define _RTE_ZLIB_PMD_PRIVATE_H_
> +
> +#include <zlib.h>
> +#include <rte_comp.h>
> +#include <rte_compressdev.h>
> +#include <rte_compressdev_pmd.h>
> +
> +#define COMPRESSDEV_NAME_ZLIB_PMD	compress_zlib
> +/**< ZLIB PMD device name */
> +
> +#define ZLIB_PMD_MAX_NB_QUEUE_PAIRS	1
> +/**< ZLIB PMD specified queue pairs */
[Lee] Doesn't look like this macro is being used anywhere, may be better to remove this altogether as there is no limit in software for queue pairs.

> +
> +#define DEF_MEM_LEVEL			8
> +
> +int zlib_logtype_driver;
> +#define ZLIB_LOG(level, fmt, args...) \
> +	rte_log(RTE_LOG_ ## level, zlib_logtype_driver, "%s(): "fmt "\n", \
> +			__func__, ##args)
> +
> +#define ZLIB_LOG_INFO(fmt, args...) \
> +	ZLIB_LOG(INFO, fmt, ## args)
> +#define ZLIB_LOG_ERR(fmt, args...) \
> +	ZLIB_LOG(ERR, fmt, ## args)
> +#define ZLIB_LOG_WARN(fmt, args...) \
> +	ZLIB_LOG(WARNING, fmt, ## args)
[Lee] See previous comments re/ static logging.

> +
> +struct zlib_private {
> +	uint32_t max_nb_queue_pairs;
> +	char mp_name[RTE_MEMPOOL_NAMESIZE];
> +};
> +
Thanks,
Lee.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v1 3/6] compress/zlib: add xform and stream create support
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 3/6] compress/zlib: add xform and stream create support Shally Verma
@ 2018-06-15 11:09   ` Daly, Lee
  0 siblings, 0 replies; 15+ messages in thread
From: Daly, Lee @ 2018-06-15 11:09 UTC (permalink / raw)
  To: Shally Verma
  Cc: Trahe, Fiona, dev, pathreay, Sunila Sahu, Ashish Gupta,
	De Lara Guarch, Pablo

Comment Inline.

> -----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 <pablo.de.lara.guarch@intel.com>
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; dev@dpdk.org;
> pathreay@caviumnetworks.com; Sunila Sahu
> <sunila.sahu@caviumnetworks.com>; Ashish Gupta
> <ashish.gupta@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH v1 3/6] compress/zlib: add xform and stream
> create support
> 
> Implement private xform and stream create ops
> 

<...>
>  struct rte_compressdev_ops zlib_pmd_ops = {
>  		.dev_configure		= zlib_pmd_config,
>  		.dev_start		= zlib_pmd_start,
> @@ -228,11 +304,11 @@ struct rte_compressdev_ops zlib_pmd_ops = {
>  		.queue_pair_setup	= zlib_pmd_qp_setup,
>  		.queue_pair_release	= zlib_pmd_qp_release,
> 
> -		.private_xform_create	= NULL,
> -		.private_xform_free	= NULL,
> +		.private_xform_create	= zlib_pmd_private_xform_create,
> +		.private_xform_free		=
> zlib_pmd_private_xform_free,
[Lee] Quick fix of formatting here please.

> 
> -		.stream_create	= NULL,
> -		.stream_free	= NULL
> +		.stream_create	= zlib_pmd_stream_create,
> +		.stream_free	= zlib_pmd_stream_free
>  };
> 
>  struct rte_compressdev_ops *rte_zlib_pmd_ops = &zlib_pmd_ops;
> --
> 2.9.5
Thanks,
Lee.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v1 4/6] compress/zlib: add enq deq apis
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 4/6] compress/zlib: add enq deq apis Shally Verma
@ 2018-06-15 11:09   ` Daly, Lee
  0 siblings, 0 replies; 15+ messages in thread
From: Daly, Lee @ 2018-06-15 11:09 UTC (permalink / raw)
  To: Shally Verma
  Cc: Trahe, Fiona, dev, pathreay, Sunila Sahu, Ashish Gupta,
	De Lara Guarch, Pablo

Comments inline.

> -----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 <pablo.de.lara.guarch@intel.com>
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; dev@dpdk.org;
> pathreay@caviumnetworks.com; Sunila Sahu
> <sunila.sahu@caviumnetworks.com>; Ashish Gupta
> <ashish.gupta@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH v1 4/6] compress/zlib: add enq deq apis
> 
> implement enqueue and dequeue apis

<...>
> diff --git a/drivers/compress/zlib/meson.build
> b/drivers/compress/zlib/meson.build
> new file mode 100644
> index 0000000..d66de95
> --- /dev/null
> +++ b/drivers/compress/zlib/meson.build
> @@ -0,0 +1,11 @@
> +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Cavium
> +Networks
> +
> +dep = dependency('zlib', required: false) if not dep.found()
> +	build = false
> +endif
> +deps += 'bus_vdev'
> +sources = files('zlib_pmd.c', 'zlib_pmd_ops.c') ext_deps += dep
> +pkgconfig_extra_libs += '-lz'
[Lee] You have added "allow_experimental_apis" tag to the zlib/Makefile, better to add to the meson as well.
With the tag; allow_experimental_apis = true.

> diff --git a/drivers/compress/zlib/zlib_pmd.c
> b/drivers/compress/zlib/zlib_pmd.c
> index 3dc71ec..e2681a7 100644
> --- a/drivers/compress/zlib/zlib_pmd.c
> +++ b/drivers/compress/zlib/zlib_pmd.c
> @@ -17,7 +17,239 @@
>  #include "zlib_pmd_private.h"
> 
>  static uint8_t compressdev_driver_id;
> -int zlib_logtype_driver;
> +
> +/** compute the next mbuf in list and assign dst buffer and dlen,
> + * set op->status to appropriate flag if we run out of mbuf  */
> +#define COMPUTE_DST_BUF(mbuf, dst, dlen)		\
> +	((mbuf = mbuf->next) ?
> 	\
> +		(dst = rte_pktmbuf_mtod(mbuf, uint8_t *)),		\
> +		dlen = rte_pktmbuf_data_len(mbuf) :			\
> +			!(op->status =					\
> +			((op->op_type == RTE_COMP_OP_STATELESS) ?
> 	\
[Lee] Clever & useful macro.

> +
> 	RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED :	\
> +
> 	RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE)))
> +
> +static void
> +process_zlib_deflate(struct rte_comp_op *op, z_stream *strm) {
> +	int ret, flush, fin_flush;
> +	uint8_t *src, *dst;
> +	uint32_t sl, dl, have;
> +	struct rte_mbuf *mbuf_src = op->m_src;
> +	struct rte_mbuf *mbuf_dst = op->m_dst;
> +
> +	src = rte_pktmbuf_mtod_offset(mbuf_src, uint8_t *, op-
> >src.offset);
> +
> +	sl = rte_pktmbuf_data_len(mbuf_src) - op->src.offset;
> +
> +	dst = rte_pktmbuf_mtod_offset(mbuf_dst, unsigned char *,
> +			op->dst.offset);
> +
> +	dl = rte_pktmbuf_data_len(mbuf_dst) - op->dst.offset;
> +
> +	if (unlikely(!src || !dst || !strm)) {
> +		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
> +		ZLIB_LOG_ERR("\nInvalid source or destination buffers");
> +		return;
> +	}
> +	switch (op->flush_flag) {
> +	case RTE_COMP_FLUSH_NONE:
> +		fin_flush = Z_NO_FLUSH;
> +		break;
> +	case RTE_COMP_FLUSH_SYNC:
> +		fin_flush = Z_SYNC_FLUSH;
> +		break;
> +	case RTE_COMP_FLUSH_FULL:
> +		fin_flush = Z_FULL_FLUSH;
> +		break;
> +	case RTE_COMP_FLUSH_FINAL:
> +		fin_flush = Z_FINISH;
> +		break;
> +	default:
> +		op->status = RTE_COMP_OP_STATUS_ERROR;
> +		goto def_end;
> +	}
> +	if (op->src.length <= sl) {
> +		sl = op->src.length;
> +		flush = fin_flush;
> +	} else {
> +		/* if there're more than one mbufs in input,
> +		 * process intermediate with NO_FLUSH
> +		 */
> +		flush = Z_NO_FLUSH;
> +	}
> +	/* initialize status to SUCCESS */
> +	op->status = RTE_COMP_OP_STATUS_SUCCESS;
> +
> +	do {
> +		/* Update z_stream with the inputs provided by application
> */
> +		strm->next_in = src;
> +		strm->avail_in = sl;
> +
> +		do {
> +			strm->avail_out = dl;
> +			strm->next_out = dst;
> +			ret = deflate(strm, flush);
> +			if (unlikely(ret == Z_STREAM_ERROR)) {
> +				/* error return, do not process further */
> +				op->status =
> RTE_COMP_OP_STATUS_ERROR;
> +				goto def_end;
> +			}
> +			/* Update op stats */
> +			op->produced += dl - strm->avail_out;
> +			op->consumed += sl - strm->avail_in;
[Lee] strm struct has a total_in & total_out field which can be used here and will save these cycles doing the calculation each iteration.

> +		/* Break if Z_STREAM_END is encountered or dst mbuf gets
> over */
> +		} while (!(ret == Z_STREAM_END) && (strm->avail_out == 0)
> &&
> +				COMPUTE_DST_BUF(mbuf_dst, dst, dl));
> +
> +		/** Compress till the end of compressed blocks provided
> +		 * or till Z_FINISH
> +		 * Exit if op->status is not SUCCESS.
> +		 */
> +		if ((op->status != RTE_COMP_OP_STATUS_SUCCESS) ||
> +			(ret == Z_STREAM_END) ||
> +			op->consumed == op->src.length)
> +			goto def_end;
> +
> +		/** Update last output buffer with respect to availed space
> */
> +		have = dl - strm->avail_out;
> +		dst += have;
> +		dl = strm->avail_out;
[Lee] From what I can see this assignment isn't doing anything, in the while condition macro dl gets reassigned and inside the above while loop "strm->avail_out = dl", but I may be missing something.
 
> +		/** Update source buffer to next mbuf*/
> +		mbuf_src = mbuf_src->next;
> +		src = rte_pktmbuf_mtod(mbuf_src, uint8_t *);
> +		sl = rte_pktmbuf_data_len(mbuf_src);
> +
> +		/** Last block to be compressed
> +		 * Update flush with value provided by app for last block,
> +		 * For stateless flush should be always Z_FINISH
> +		 */
> +
> +		if ((op->src.length - op->consumed) <= sl) {
> +			sl = (op->src.length - op->consumed);
> +			flush = fin_flush;
[Lee] Just a clarification of my understanding please, this assignment of fin_flush to flush is what will cause the last return from the zlib deflate to be Z_STREAM_END, only if fin_flush is set to Z_FINISH. fin_flush is passed from the application, if the application doesn't pass Z_FINISH as the flush flag (I See your comment above.), this means there will never be a Z_STREAM_END return from deflate, and eventually deflate will just return an error. I believe a check could be done long before this point to ensure the flush flag is Z_FINAL, since the PMD only supports stateful at the moment. This will save cycles compressing data that we only find out at the end of the op is not valid.

> +		}
> +
> +	} while (1);
[Lee] This will be to be rewritten as to not use an infinite while loop. Undefined behaviour may lead to system hanging, so we don't use them in DPDK.

> +def_end:
> +	if (op->op_type == RTE_COMP_OP_STATELESS)
> +		deflateReset(strm);
> +}
> +
> +static void
> +process_zlib_inflate(struct rte_comp_op *op, z_stream *strm) {
> +	int ret, flush;
> +	uint8_t *src, *dst;
> +	uint32_t sl, dl, have;
> +	struct rte_mbuf *mbuf_src = op->m_src;
> +	struct rte_mbuf *mbuf_dst = op->m_dst;
> +
[Lee] same comments apply for inflate as deflate.
Thanks,
Lee.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v1 6/6] doc: add ZLIB PMD documentation
  2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 6/6] doc: add ZLIB PMD documentation Shally Verma
@ 2018-06-15 11:09   ` Daly, Lee
  0 siblings, 0 replies; 15+ messages in thread
From: Daly, Lee @ 2018-06-15 11:09 UTC (permalink / raw)
  To: Shally Verma
  Cc: Trahe, Fiona, dev, pathreay, Sunila Sahu, Ashish Gupta,
	De Lara Guarch, Pablo

Hi, Comments inline.

> -----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 <pablo.de.lara.guarch@intel.com>
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; dev@dpdk.org;
> pathreay@caviumnetworks.com; Sunila Sahu
> <sunila.sahu@caviumnetworks.com>; Ashish Gupta
> <ashish.gupta@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH v1 6/6] doc: add ZLIB PMD documentation
> 
> add zlib pmd feature specification and overview documentation
> 
> Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
> Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
> Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
> ---
>  doc/guides/compressdevs/features/zlib.ini | 22 ++++++++++
>  doc/guides/compressdevs/zlib.rst          | 72
> +++++++++++++++++++++++++++++++
>  2 files changed, 94 insertions(+)
> 
> diff --git a/doc/guides/compressdevs/features/zlib.ini
> b/doc/guides/compressdevs/features/zlib.ini
> new file mode 100644
> index 0000000..10e758b
> --- /dev/null
> +++ b/doc/guides/compressdevs/features/zlib.ini
> @@ -0,0 +1,22 @@
> +;
> +; Refer to default.ini for the full list of available PMD features.
> +;
> +; Supported features of 'ZLIB' compression driver.
> +;
> +[Features]
> +HW Accelerated =
> +CPU SSE        =
> +CPU AVX        =
> +CPU AVX2       =
> +CPU AVX512     =
> +CPU NEON       =
> +Stateful       =
> +By-Pass        =
> +Chained mbufs  =
> +Deflate        = Y
> +LZS            =
> +Adler32        = Y
> +Crc32          = Y
[Lee] here you say you support both adler and crc checksums, in the feature flags of the PMD it is says only adler32, but I see no implementation of any checksums in the PMD? 
Note* the checksum of the data will need to be put in the op->input_chksum & op->output_chksum.

> +Adler32&Crc32  =
> +Fixed          = Y
> +Dynamic        = Y
> diff --git a/doc/guides/compressdevs/zlib.rst
> b/doc/guides/compressdevs/zlib.rst
> new file mode 100644
> index 0000000..130750b
> --- /dev/null
> +++ b/doc/guides/compressdevs/zlib.rst
> @@ -0,0 +1,72 @@
> +..  SPDX-License-Identifier: BSD-3-Clause
> +    Copyright(c) 2018 Cavium Networks.
> +
> +ZLIB Compression Poll Mode Driver
> +==================================
> +
> +The ZLIB PMD (**librte_pmd_zlib**) provides poll mode compression &
> +decompression driver based on SW zlib library,
> +
> +Features
> +--------
> +
> +ZLIB PMD has support for:
> +
> +Compression/Decompression algorithm:
> +
> +* DEFLATE
> +
> +Huffman code type:
> +
> +* FIXED
> +* DYNAMIC
> +
> +Checksum support:
> +
> +* Adler32
> +* CRC32
[Lee] see comment above.

> +
> +Window size support:
> +
> +* 32K
[Lee] Say only 32K window size support here but in the capabilities of the PMD you have a window_size ranging from 8(256) to 15(32k). You also have increments of 2, which wouldn't allow 15 as max.

Thanks for the work,
Lee.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v1 2/6] compress/zlib: add device setup PMD ops
  2018-06-15 11:08   ` Daly, Lee
@ 2018-06-22 13:21     ` Verma, Shally
  2018-06-25 10:05       ` Daly, Lee
  0 siblings, 1 reply; 15+ messages in thread
From: Verma, Shally @ 2018-06-22 13:21 UTC (permalink / raw)
  To: Daly, Lee
  Cc: Trahe, Fiona, dev, pathreay, Sahu, Sunila, Gupta, Ashish,
	De Lara Guarch, Pablo

Hi Lee


>-----Original Message-----
>From: Daly, Lee [mailto:lee.daly@intel.com]
>Sent: 15 June 2018 16:39
>To: Verma, Shally <Shally.Verma@cavium.com>
>Cc: Trahe, Fiona <fiona.trahe@intel.com>; dev@dpdk.org; pathreay@caviumnetworks.com; Sahu, Sunila <Sunila.Sahu@cavium.com>;
>Gupta, Ashish <Ashish.Gupta@cavium.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
>Subject: RE: [dpdk-dev] [PATCH v1 2/6] compress/zlib: add device setup PMD ops
>
>External Email
>
>Hi Shally,
>Comments inline.
>
>
>> -----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 <pablo.de.lara.guarch@intel.com>
>> Cc: Trahe, Fiona <fiona.trahe@intel.com>; dev@dpdk.org;
>> pathreay@caviumnetworks.com; Sunila Sahu
>> <sunila.sahu@caviumnetworks.com>; Ashish Gupta
>> <ashish.gupta@caviumnetworks.com>
>> Subject: [dpdk-dev] [PATCH v1 2/6] compress/zlib: add device setup PMD
>> ops
>>
>>diff --git a/drivers/compress/zlib/zlib_pmd_ops.c b/drivers/compress/zlib/zlib_pmd_ops.c
>>new file mode 100644
>>index 0000000..0bd42f3
>>--- /dev/null
>>+++ b/drivers/compress/zlib/zlib_pmd_ops.c
>>@@ -0,0 +1,238 @@
>>+/* SPDX-License-Identifier: BSD-3-Clause
>>+ * Copyright(c) 2018 Cavium Networks
>>+ */
>>+
>>+#include <string.h>
>>+
>>+#include <rte_common.h>
>>+#include <rte_malloc.h>
>>+#include <rte_compressdev_pmd.h>
>>+
>>+#include "zlib_pmd_private.h"
>>+
>>+static const struct rte_compressdev_capabilities zlib_pmd_capabilities[] = {
>>+      {   /* Deflate */
>>+              .algo = RTE_COMP_ALGO_DEFLATE,
>>+              .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM,
>[Lee] The priv_xform structure in this case is not shareable, as it contains your zlib_stream structure, which contains zlibs own zstream
>struct. This is not read only, the contents of this zstream will be written to, which means it is not shareable across queue pairs or
>devices.
>
[Shally] Per my understanding, SHAREABLE_PRIV_XFORM here means xform is shareable by all ops in one single enqueue_burst() but not across devices or qps by multiple threads in parallel. Does your implementation support such usage of shareable priv_xforms?

Thanks for review.
Shally

>>+              .window_size = {
>>+                      .min = 8,
>>+                      .max = 15,
>>+                      .increment = 2
>>+              },
>>+      },
>>+
>>+      RTE_COMP_END_OF_CAPABILITIES_LIST()
>>+
>>+};
>> +/** Configure device */
>> +static int
>> +zlib_pmd_config(struct rte_compressdev *dev,
>> +             struct rte_compressdev_config *config) {
>> +     struct rte_mempool *mp;
>> +
>> +     struct zlib_private *internals = dev->data->dev_private;
>> +     snprintf(internals->mp_name, RTE_MEMPOOL_NAMESIZE,
>> +                     "stream_mp_%u", dev->data->dev_id);
>> +     mp = rte_mempool_create(internals->mp_name,
>> +                     config->max_nb_priv_xforms + config-
>> >max_nb_streams,
>> +                     sizeof(struct zlib_priv_xform),
>> +                     0, 0, NULL, NULL, NULL,
>> +                     NULL, config->socket_id,
>> +                     0);
>[Lee] Could you add a mempool_lookup here to ensure its not already created please.
>
>> +     if (mp == NULL) {
>> +             ZLIB_LOG_ERR("Cannot create private xform pool on socket
>> %d\n",
>> +                             config->socket_id);
>> +             return -ENOMEM;
>> +     }
>> +     return 0;
>> +}
>> +
>> +/** Start device */
>> +static int
>> +zlib_pmd_start(__rte_unused struct rte_compressdev *dev) {
>> +     return 0;
>> +}
>> +
>> +/** Stop device */
>> +static void
>> +zlib_pmd_stop(struct rte_compressdev *dev) {
>> +     struct zlib_private *internals = dev->data->dev_private;
>> +     struct rte_mempool *mp = rte_mempool_lookup(internals-
>> >mp_name);
>> +     rte_mempool_free(mp);
>> +}
>> +
>[Lee] I believe it would be better to have the freeing functionality in the pmd_close function, as a user may want to stop a device,
>without freeing its memory, especially since the start function does nothing here. i.e. if the user stops device then starts again,
>memory needed has been free'd but not realloc'ed. Hope this makes sense.
>
>> +/** Close device */
>> +static int
>> +zlib_pmd_close(__rte_unused struct rte_compressdev *dev) {
>> +     return 0;
>> +}
>
><...>
>> diff --git a/drivers/compress/zlib/zlib_pmd_private.h
>> b/drivers/compress/zlib/zlib_pmd_private.h
>> new file mode 100644
>> index 0000000..d29dc59
>> --- /dev/null
>> +++ b/drivers/compress/zlib/zlib_pmd_private.h
>> @@ -0,0 +1,77 @@
>> +/* SPDX-License-Identifier: BSD-3-Clause
>> + * Copyright(c) 2017-2018 Cavium Networks  */
>> +
>> +#ifndef _RTE_ZLIB_PMD_PRIVATE_H_
>> +#define _RTE_ZLIB_PMD_PRIVATE_H_
>> +
>> +#include <zlib.h>
>> +#include <rte_comp.h>
>> +#include <rte_compressdev.h>
>> +#include <rte_compressdev_pmd.h>
>> +
>> +#define COMPRESSDEV_NAME_ZLIB_PMD    compress_zlib
>> +/**< ZLIB PMD device name */
>> +
>> +#define ZLIB_PMD_MAX_NB_QUEUE_PAIRS  1
>> +/**< ZLIB PMD specified queue pairs */
>[Lee] Doesn't look like this macro is being used anywhere, may be better to remove this altogether as there is no limit in software for
>queue pairs.
>
>> +
>> +#define DEF_MEM_LEVEL                        8
>> +
>> +int zlib_logtype_driver;
>> +#define ZLIB_LOG(level, fmt, args...) \
>> +     rte_log(RTE_LOG_ ## level, zlib_logtype_driver, "%s(): "fmt "\n", \
>> +                     __func__, ##args)
>> +
>> +#define ZLIB_LOG_INFO(fmt, args...) \
>> +     ZLIB_LOG(INFO, fmt, ## args)
>> +#define ZLIB_LOG_ERR(fmt, args...) \
>> +     ZLIB_LOG(ERR, fmt, ## args)
>> +#define ZLIB_LOG_WARN(fmt, args...) \
>> +     ZLIB_LOG(WARNING, fmt, ## args)
>[Lee] See previous comments re/ static logging.
>
>> +
>> +struct zlib_private {
>> +     uint32_t max_nb_queue_pairs;
>> +     char mp_name[RTE_MEMPOOL_NAMESIZE];
>> +};
>> +
>Thanks,
>Lee.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v1 2/6] compress/zlib: add device setup PMD ops
  2018-06-22 13:21     ` Verma, Shally
@ 2018-06-25 10:05       ` Daly, Lee
  2018-06-25 10:07         ` Verma, Shally
  0 siblings, 1 reply; 15+ messages in thread
From: Daly, Lee @ 2018-06-25 10:05 UTC (permalink / raw)
  To: Verma, Shally
  Cc: Trahe, Fiona, dev, pathreay, Sahu, Sunila, Gupta, Ashish,
	De Lara Guarch, Pablo

> >
> >> -----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 <pablo.de.lara.guarch@intel.com>
> >> Cc: Trahe, Fiona <fiona.trahe@intel.com>; dev@dpdk.org;
> >> pathreay@caviumnetworks.com; Sunila Sahu
> >> <sunila.sahu@caviumnetworks.com>; Ashish Gupta
> >> <ashish.gupta@caviumnetworks.com>
> >> Subject: [dpdk-dev] [PATCH v1 2/6] compress/zlib: add device setup
> >> PMD ops
> >>
> >>diff --git a/drivers/compress/zlib/zlib_pmd_ops.c
> >>b/drivers/compress/zlib/zlib_pmd_ops.c
> >>new file mode 100644
> >>index 0000000..0bd42f3
> >>--- /dev/null
> >>+++ b/drivers/compress/zlib/zlib_pmd_ops.c
> >>@@ -0,0 +1,238 @@
> >>+/* SPDX-License-Identifier: BSD-3-Clause
> >>+ * Copyright(c) 2018 Cavium Networks
> >>+ */
> >>+
> >>+#include <string.h>
> >>+
> >>+#include <rte_common.h>
> >>+#include <rte_malloc.h>
> >>+#include <rte_compressdev_pmd.h>
> >>+
> >>+#include "zlib_pmd_private.h"
> >>+
> >>+static const struct rte_compressdev_capabilities zlib_pmd_capabilities[]
> = {
> >>+      {   /* Deflate */
> >>+              .algo = RTE_COMP_ALGO_DEFLATE,
> >>+              .comp_feature_flags =
> RTE_COMP_FF_SHAREABLE_PRIV_XFORM,
> >[Lee] The priv_xform structure in this case is not shareable, as it
> >contains your zlib_stream structure, which contains zlibs own zstream
> >struct. This is not read only, the contents of this zstream will be written to,
> which means it is not shareable across queue pairs or devices.
> >
> [Shally] Per my understanding, SHAREABLE_PRIV_XFORM here means xform
> is shareable by all ops in one single enqueue_burst() but not across devices
> or qps by multiple threads in parallel. Does your implementation support
> such usage of shareable priv_xforms?
> 
> Thanks for review.
> Shally
[Lee]
Hey Shally, I have just clarified this with Fiona and Pablo and the intended use of Shareable priv xforms is to allow a xform to be shared across devices & qps not just all the ops in a burst, yes the ISA-L PMD has a shareable private xform due to all its contents being read only. 

> 
> >>+              .window_size = {
> >>+                      .min = 8,
> >>+                      .max = 15,
> >>+                      .increment = 2
> >>+              },
> >>+      },
> >>+
> >>+      RTE_COMP_END_OF_CAPABILITIES_LIST()
> >>+

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v1 2/6] compress/zlib: add device setup PMD ops
  2018-06-25 10:05       ` Daly, Lee
@ 2018-06-25 10:07         ` Verma, Shally
  0 siblings, 0 replies; 15+ messages in thread
From: Verma, Shally @ 2018-06-25 10:07 UTC (permalink / raw)
  To: Daly, Lee
  Cc: Trahe, Fiona, dev, pathreay, Sahu, Sunila, Gupta, Ashish,
	De Lara Guarch, Pablo

HI Lee

>-----Original Message-----
>From: Daly, Lee [mailto:lee.daly@intel.com]
>Sent: 25 June 2018 15:35
>To: Verma, Shally <Shally.Verma@cavium.com>
>Cc: Trahe, Fiona <fiona.trahe@intel.com>; dev@dpdk.org; pathreay@caviumnetworks.com; Sahu, Sunila <Sunila.Sahu@cavium.com>;
>Gupta, Ashish <Ashish.Gupta@cavium.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
>Subject: RE: [dpdk-dev] [PATCH v1 2/6] compress/zlib: add device setup PMD ops
>
//snip

>> >>+static const struct rte_compressdev_capabilities zlib_pmd_capabilities[]
>> = {
>> >>+      {   /* Deflate */
>> >>+              .algo = RTE_COMP_ALGO_DEFLATE,
>> >>+              .comp_feature_flags =
>> RTE_COMP_FF_SHAREABLE_PRIV_XFORM,
>> >[Lee] The priv_xform structure in this case is not shareable, as it
>> >contains your zlib_stream structure, which contains zlibs own zstream
>> >struct. This is not read only, the contents of this zstream will be written to,
>> which means it is not shareable across queue pairs or devices.
>> >
>> [Shally] Per my understanding, SHAREABLE_PRIV_XFORM here means xform
>> is shareable by all ops in one single enqueue_burst() but not across devices
>> or qps by multiple threads in parallel. Does your implementation support
>> such usage of shareable priv_xforms?
>>
>> Thanks for review.
>> Shally
>[Lee]
>Hey Shally, I have just clarified this with Fiona and Pablo and the intended use of Shareable priv xforms is to allow a xform to be shared
>across devices & qps not just all the ops in a burst, yes the ISA-L PMD has a shareable private xform due to all its contents being read
>only.
>
[Shally] Ok. Got that. Will change it accordingly.

Thanks
Shally

>>
>> >>+              .window_size = {
>> >>+                      .min = 8,
>> >>+                      .max = 15,
>> >>+                      .increment = 2
>> >>+              },
>> >>+      },
>> >>+
>> >>+      RTE_COMP_END_OF_CAPABILITIES_LIST()
>> >>+

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-06-25 10:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-15 10:32 [dpdk-dev] [PATCH v1 0/6]compress: add zlib compression PMD Shally Verma
2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 1/6] compress/zlib: add ZLIB PMD support Shally Verma
2018-06-15 11:08   ` Daly, Lee
2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 2/6] compress/zlib: add device setup PMD ops Shally Verma
2018-06-15 11:08   ` Daly, Lee
2018-06-22 13:21     ` Verma, Shally
2018-06-25 10:05       ` Daly, Lee
2018-06-25 10:07         ` Verma, Shally
2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 3/6] compress/zlib: add xform and stream create support Shally Verma
2018-06-15 11:09   ` Daly, Lee
2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 4/6] compress/zlib: add enq deq apis Shally Verma
2018-06-15 11:09   ` Daly, Lee
2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 5/6] test: add ZLIB PMD for compressdev tests Shally Verma
2018-05-15 10:32 ` [dpdk-dev] [PATCH v1 6/6] doc: add ZLIB PMD documentation Shally Verma
2018-06-15 11:09   ` Daly, Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).