DPDK patches and discussions
 help / color / mirror / Atom feed
From: Michael Baum <michaelba@nvidia.com>
To: Akhil Goyal <gakhil@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>,
	Mahipal Challa <mchalla@marvell.com>,
	Fan Zhang <fanzhang.oss@gmail.com>,
	Ashish Gupta <ashishg@marvell.com>
Cc: Matan Azrad <matan@nvidia.com>,
	Fiona Trahe <fiona.trahe@intel.com>,
	"NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>
Subject: RE: [EXT] [PATCH 1/4] compressdev: add LZ4 algorithm support
Date: Mon, 30 Jan 2023 20:36:58 +0000	[thread overview]
Message-ID: <DM5PR12MB46616C8D3A1FFE55F5D9B981CCD39@DM5PR12MB4661.namprd12.prod.outlook.com> (raw)
In-Reply-To: <CO6PR18MB44845E78B9FB3610F285522ED8D39@CO6PR18MB4484.namprd18.prod.outlook.com>

On Mon, Jan 30, 2023 at 20:35 PM Akhil Goyal <gakhil@marvell.com> wrote: 
> 
> > +/**
> > + * Block checksum flag.
> > + * If this flag is set, each data block will be followed by a 4-bytes checksum,
> > + * calculated by using the xxHash-32 algorithm on the raw (compressed) data
> > + * block. The intention is to detect data corruption (storage or transmission
> > + * errors) immediately, before decoding. Block checksum usage is optional.
> > + */
> > +#define RTE_COMP_LZ4_FLAG_BLOCK_CHECKSUM (1 << 4)
> > +
> > +/**
> > + * Block Independence flag.
> > + * If this flag is set to 1, blocks are independent.
> > + * If this flag is set to 0, each block depends on previous ones (up to LZ4
> > + * window size, which is 64 KB). In such case, it is necessary to decode all
> > + * blocks in sequence.
> > + * Block dependency improves compression ratio, especially for small blocks.
> > On
> > + * the other hand, it makes random access or multi-threaded decoding
> > impossible.
> > + */
> > +#define RTE_COMP_LZ4_FLAG_BLOCK_INDEPENDENCE (1 << 5)
> 
> Why did you start with 4th and 5th bit of the flags? Why not first two bits?

I didn't choose the values by myself, I took them from LZ4 standard:
https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md#frame-descriptor

> 
> ++ more people for review.

  reply	other threads:[~2023-01-30 20:37 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09  7:45 [PATCH 0/4] compressdev: add LZ4 support Michael Baum
2023-01-09  7:45 ` [PATCH 1/4] compressdev: add LZ4 algorithm support Michael Baum
2023-01-30 18:35   ` [EXT] " Akhil Goyal
2023-01-30 20:36     ` Michael Baum [this message]
2023-01-31  6:29       ` Akhil Goyal
2023-01-09  7:45 ` [PATCH 2/4] app/test-compress-perf: allow test single compress operation Michael Baum
2023-01-09  7:45 ` [PATCH 3/4] app/test-compress-perf: add algo option Michael Baum
2023-01-09  7:45 ` [PATCH 4/4] app/test-compress-perf: add LZ4 support Michael Baum
2023-02-02  9:13 ` [PATCH v2 0/4] compressdev: " Michael Baum
2023-02-02  9:13   ` [PATCH v2 1/4] compressdev: add LZ4 algorithm support Michael Baum
2023-02-05 17:20     ` [EXT] " Akhil Goyal
2023-02-02  9:13   ` [PATCH v2 2/4] app/test-compress-perf: allow test single compress operation Michael Baum
2023-02-02  9:13   ` [PATCH v2 3/4] app/test-compress-perf: add algo option Michael Baum
2023-02-02  9:13   ` [PATCH v2 4/4] app/test-compress-perf: add LZ4 support Michael Baum
2023-02-13  6:11   ` [PATCH v3 0/4] compressdev: " Michael Baum
2023-02-13  6:11     ` [PATCH v3 1/4] compressdev: add LZ4 algorithm support Michael Baum
2023-02-13  6:11     ` [PATCH v3 2/4] app/test-compress-perf: allow test single compress operation Michael Baum
2023-02-13  7:23       ` [EXT] " Akhil Goyal
2023-02-14 16:37         ` Michael Baum
2023-02-13  6:11     ` [PATCH v3 3/4] app/test-compress-perf: add algo option Michael Baum
2023-02-13  7:29       ` [EXT] " Akhil Goyal
2023-02-14 16:32         ` Michael Baum
2023-02-13  6:11     ` [PATCH v3 4/4] app/test-compress-perf: add LZ4 support Michael Baum
2023-02-13 15:47     ` [PATCH v3 0/4] compressdev: " Zhang, Fan
2023-02-13 15:56       ` Michael Baum
2023-02-14 17:40     ` [PATCH v4 " Michael Baum
2023-02-14 17:40       ` [PATCH v4 1/4] compressdev: add LZ4 algorithm support Michael Baum
2023-02-14 17:40       ` [PATCH v4 2/4] app/test-compress-perf: fix some typos Michael Baum
2023-02-14 17:40       ` [PATCH v4 3/4] app/test-compress-perf: fix missing test single compress op Michael Baum
2023-02-14 17:40       ` [PATCH v4 4/4] app/test-compress-perf: add algo option Michael Baum
2023-02-16  8:01       ` [EXT] [PATCH v4 0/4] compressdev: add LZ4 support Akhil Goyal

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=DM5PR12MB46616C8D3A1FFE55F5D9B981CCD39@DM5PR12MB4661.namprd12.prod.outlook.com \
    --to=michaelba@nvidia.com \
    --cc=ashishg@marvell.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=fiona.trahe@intel.com \
    --cc=gakhil@marvell.com \
    --cc=matan@nvidia.com \
    --cc=mchalla@marvell.com \
    --cc=thomas@monjalon.net \
    /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).