> -----Original Message-----
> From: Shally Verma [mailto:shally.ve...@caviumnetworks.com]
> Sent: Monday, July 2, 2018 5:57 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.gua...@intel.com>
> Cc: dev@dpdk.org; pathr...@caviumnetworks.com;
> mcha...@caviumnetworks.com; Ashish Gupta
> <ashish.gu...@caviumnetworks.com>; Sunila Sahu
> <sunila.s...@caviumnetworks.com>
> Subject: [PATCH v2 2/5] compress/zlib: add device setup PMD ops
>
> From: Ashish Gupta <ashish.gu...@caviumnetworks.com>
>
> Implement device configure and PMD ops
>
> Signed-off-by: Sunila Sahu <sunila.s...@caviumnetworks.com>
> Signed-off-by: Shally Verma <shally.ve...@caviumnetworks.com>
> Signed-off-by: Ashish Gupta <ashish.gu...@caviumnetworks.com>
...
> b/drivers/compress/zlib/zlib_pmd_ops.c
> new file mode 100644
> index 0000000..03b6da5
> --- /dev/null
> +++ b/drivers/compress/zlib/zlib_pmd_ops.c
> @@ -0,0 +1,236 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2018 Cavium Networks
> + */
> +
> +#include <string.h>
> +
> +#include <rte_common.h>
> +#include <rte_malloc.h>
> +
> +#include "zlib_pmd_private.h"
> +
> +static const struct rte_compressdev_capabilities zlib_pmd_capabilities[] = {
> + { /* Deflate */
> + .algo = RTE_COMP_ALGO_DEFLATE,
> + .window_size = {
> + .min = 8,
> + .max = 15,
> + .increment = 1
> + },
> + },
Add comp_feature_flags here, including the new FIXED and DYNAMIC flags.
> +
> + RTE_COMP_END_OF_CAPABILITIES_LIST()
> +
> +};
> +
...
> +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);
I think you can use rte_ring_free(qp->processed_pkts) here directly.
> + 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
Typo: "its"
...
> +
> +struct rte_compressdev_ops zlib_pmd_ops = {
...
> +
> + .private_xform_create = NULL,
> + .private_xform_free = NULL,
Remove extra indentation here.
> +
> + .stream_create = NULL,
> + .stream_free = NULL
> +};
> +
> +struct rte_compressdev_ops *rte_zlib_pmd_ops = &zlib_pmd_ops;