DPDK patches and discussions
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: Shally Verma <shally.verma@caviumnetworks.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"pathreya@caviumnetworks.com" <pathreya@caviumnetworks.com>,
	"mchalla@caviumnetworks.com" <mchalla@caviumnetworks.com>,
	Sunila Sahu <ssahu@caviumnetworks.com>,
	"Sunila Sahu" <sunila.sahu@caviumnetworks.com>,
	Ashish Gupta <ashish.gupta@caviumnetworks.com>
Subject: Re: [dpdk-dev] [PATCH v2 3/5] compress/zlib: add xform and stream create support
Date: Wed, 11 Jul 2018 12:26:35 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8977F8F7839@IRSMSX107.ger.corp.intel.com> (raw)
In-Reply-To: <1530550631-22841-4-git-send-email-shally.verma@caviumnetworks.com>



> -----Original Message-----
> From: Shally Verma [mailto:shally.verma@caviumnetworks.com]
> Sent: Monday, July 2, 2018 5:57 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; pathreya@caviumnetworks.com;
> mchalla@caviumnetworks.com; Sunila Sahu <ssahu@caviumnetworks.com>;
> Sunila Sahu <sunila.sahu@caviumnetworks.com>; Ashish Gupta
> <ashish.gupta@caviumnetworks.com>
> Subject: [PATCH v2 3/5] compress/zlib: add xform and stream create support

Retitle to "compress/zlib: support xform and stream creation"

About stateful, since it looks like it is not supported for the moment,
I think stream_create/stream_free functions should fail or should not be implemented.

More comments inline.

> 
> From: Sunila Sahu <ssahu@caviumnetworks.com>
> 
> 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         | 93
> ++++++++++++++++++++++++++++++++
>  drivers/compress/zlib/zlib_pmd_ops.c     | 83 ++++++++++++++++++++++++++--
>  drivers/compress/zlib/zlib_pmd_private.h |  4 ++
>  3 files changed, 176 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
> index c4f67bb..7c2614e 100644
> --- a/drivers/compress/zlib/zlib_pmd.c
> +++ b/drivers/compress/zlib/zlib_pmd.c

...

> +		case RTE_COMP_HUFFMAN_DYNAMIC:
> +			strategy = Z_HUFFMAN_ONLY;

I don't think this is the suitable value for dynamic compression.
Z_HUFFMAN_ONLY does not do LZ77. I think the strategy for this case is Z_DEFAULT_STRATEGY.

> +			break;
> +		default:
> +			ZLIB_PMD_ERR("Compression strategy not
> supported\n");
> +			return -1;
> +		}

...

> +++ b/drivers/compress/zlib/zlib_pmd_ops.c

...

> +	struct rte_mempool *mp = rte_mempool_lookup(internals->mp_name);

As said in other email, you can directly get the mempool pointer from internals.

> +	if (rte_mempool_get(mp, zstream)) {
> +		ZLIB_PMD_ERR(
> +				"Couldn't get object from session mempool");

This can be in the same line.

...

> +/** 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;

This can be written like "return zlib_pmd_stream_create(...);

...

> +		.private_xform_create	= zlib_pmd_private_xform_create,
> +		.private_xform_free		=
> zlib_pmd_private_xform_free,

Fix indentation here.

> 
> -		.stream_create	= NULL,
> -		.stream_free	= NULL
> +		.stream_create	= zlib_pmd_stream_create,
> +		.stream_free	= zlib_pmd_stream_free
>  };

  reply	other threads:[~2018-07-11 12:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-02 16:57 [dpdk-dev] [PATCH v2 0/5] compress: add ZLIB compression PMD Shally Verma
2018-07-02 16:57 ` [dpdk-dev] [PATCH v2 1/5] compress/zlib: add ZLIB PMD support Shally Verma
2018-07-11 10:29   ` De Lara Guarch, Pablo
2018-07-11 12:06   ` De Lara Guarch, Pablo
2018-07-11 12:14   ` De Lara Guarch, Pablo
2018-07-11 12:40     ` Verma, Shally
2018-07-13 15:57       ` De Lara Guarch, Pablo
2018-07-02 16:57 ` [dpdk-dev] [PATCH v2 2/5] compress/zlib: add device setup PMD ops Shally Verma
2018-07-11 11:10   ` De Lara Guarch, Pablo
2018-07-02 16:57 ` [dpdk-dev] [PATCH v2 3/5] compress/zlib: add xform and stream create support Shally Verma
2018-07-11 12:26   ` De Lara Guarch, Pablo [this message]
2018-07-11 14:01     ` Verma, Shally
2018-07-02 16:57 ` [dpdk-dev] [PATCH v2 4/5] compress/zlib: add enq deq apis Shally Verma
2018-07-11 13:25   ` De Lara Guarch, Pablo
2018-07-12  5:46     ` Verma, Shally
2018-07-13 15:55       ` De Lara Guarch, Pablo
2018-07-02 16:57 ` [dpdk-dev] [PATCH v2 5/5] doc: add ZLIB PMD documentation Shally Verma
2018-07-11 14:02   ` De Lara Guarch, Pablo
2018-07-11 17:16     ` Verma, Shally
2018-07-11 20:56       ` De Lara Guarch, Pablo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E115CCD9D858EF4F90C690B0DCB4D8977F8F7839@IRSMSX107.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=ashish.gupta@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=mchalla@caviumnetworks.com \
    --cc=pathreya@caviumnetworks.com \
    --cc=shally.verma@caviumnetworks.com \
    --cc=ssahu@caviumnetworks.com \
    --cc=sunila.sahu@caviumnetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).