[EXTERNAL] [PATCH v3 1/4] compressdev: support for dictionaries and PDCP checksum
Akhil Goyal
gakhil at marvell.com
Mon Oct 6 20:45:33 CEST 2025
> Adds definitions for PDCP checksums and apis to pass in
> dictionaries
>
> Signed-off-by: Sameer Vaze <svaze at qti.qualcomm.com>
> ---
> v3:
> * Renamed checksum validation enum
> * Added missed comments for window size enum
>
> lib/compressdev/rte_comp.h | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/lib/compressdev/rte_comp.h b/lib/compressdev/rte_comp.h
> index 96d9b276dd..c5ff708a4c 100644
> --- a/lib/compressdev/rte_comp.h
> +++ b/lib/compressdev/rte_comp.h
> @@ -101,6 +101,10 @@ enum rte_comp_op_status {
> * is not an error case. Output data up to op.produced can be used and
> * next op in the stream should continue on from op.consumed+1.
> */
> + RTE_COMP_OP_STATUS_CHECKSUM_VALIDATION_FAILED,
> + /**< Checksum validation failed. Either calculated does checksum not
> match
> + * the one provided or there was an error calculating the checksum
> + */
> };
>
> /** Compression Algorithms */
> @@ -166,6 +170,10 @@ enum rte_comp_checksum_type {
> /**< Generates a xxHash-32 checksum, as used by LZ4.
> * https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__github.com_Cyan4973_xxHash_blob_dev_doc_xxhash-
> 5Fspec.md&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=DnL7Si2wl_PRwpZ9TW
> ey3eu68gBzn7DkPwuqhd6WNyo&m=JUBqRhO-XSQ-
> mz_lXDM4V3YRrlXdANK9pyciT5ke2p6iFDq3oD79zDGWAWxBBKeD&s=C_5g5pZW
> vL-flM67RrwS1FCb95wlqZcHgaq7ZJgVhxY&e=
> */
> + RTE_COMP_CHECKSUM_3GPP_PDCP_UDC,
> + /**< Generates checksum as defined under Uplink Data Compression
> + * checksum as defined in the 3GPP PDCP specification
> + */
> };
>
> /** Compression Huffman Type - used by DEFLATE algorithm */
> @@ -201,6 +209,11 @@ enum rte_comp_flush_flag {
> */
> };
>
> +#define DEFLATE_MAX_WINDOW_SIZE (1ULL << 15)
> +/** Max window size supported by deflate. Used when setting or getting pre
> + * defined dictionaries
> + */
I see that the namespace of this macro is not corrected.
But do we need this? Isn't this specific to PMD or is it defined in Deflate specification?
If it is not defined in specification, shouldn't it be coming as capability parameter?
> +
> /** Compression transform types */
> enum rte_comp_xform_type {
> RTE_COMP_COMPRESS,
> @@ -228,6 +241,18 @@ enum rte_comp_op_type {
> struct rte_comp_deflate_params {
> enum rte_comp_huffman huffman;
> /**< Compression huffman encoding type */
> + uint8_t *dictionary;
> + /**< Pointer to memory containing dictionary to be used for deflate
> operations */
> + uint16_t dictionary_len;
> + /**< Length of dictionary to be used */
> +};
> +
> +/** Parameters specific to the inflate algorithm */
> +struct rte_comp_inflate_params {
> + uint8_t *dictionary;
> + /**< Pointer to memory containing dictionary to be used for inflate
> operations */
> + uint16_t dictionary_len;
> + /**< Length of dictionary to be used */
> };
>
> /**
> @@ -321,6 +346,8 @@ struct rte_comp_decompress_xform {
> * setup of stream or private_xform should fail.
> */
> union {
> + struct rte_comp_inflate_params inflate;
> + /**< Parameters specific to the deflate algorithm */
> struct rte_comp_lz4_params lz4;
> /**< Parameters specific to the LZ4 algorithm */
> }; /**< Algorithm specific parameters */
> --
> 2.31.1
More information about the dev
mailing list