DPDK 22.11.7
rte_comp.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017-2018 Intel Corporation
3 */
4
5#ifndef _RTE_COMP_H_
6#define _RTE_COMP_H_
7
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#include <rte_compat.h>
20#include <rte_mbuf.h>
21
29#define RTE_COMP_FF_STATEFUL_COMPRESSION (1ULL << 0)
31#define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1)
33#define RTE_COMP_FF_OOP_SGL_IN_SGL_OUT (1ULL << 2)
37#define RTE_COMP_FF_OOP_SGL_IN_LB_OUT (1ULL << 3)
42#define RTE_COMP_FF_OOP_LB_IN_SGL_OUT (1ULL << 4)
46#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5)
48#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6)
50#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7)
52#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8)
54#define RTE_COMP_FF_SHA1_HASH (1ULL << 9)
56#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10)
58#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11)
60#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12)
66#define RTE_COMP_FF_HUFFMAN_FIXED (1ULL << 13)
68#define RTE_COMP_FF_HUFFMAN_DYNAMIC (1ULL << 14)
93};
94
97 RTE_COMP_ALGO_UNSPECIFIED = 0,
112 RTE_COMP_ALGO_LIST_END
113};
114
123 RTE_COMP_HASH_ALGO_LIST_END
124};
125
131#define RTE_COMP_LEVEL_PMD_DEFAULT (-1)
133#define RTE_COMP_LEVEL_NONE (0)
135#define RTE_COMP_LEVEL_MIN (1)
137#define RTE_COMP_LEVEL_MAX (9)
152};
153
154
163};
164
187
194};
195
210
211
216};
217
222 union {
225 };
226 int level;
228 uint8_t window_size;
239};
240
249 uint8_t window_size;
258};
259
270 union {
275 };
276};
277
288 enum rte_comp_op_type op_type;
289 union {
295 void *stream;
304 };
305
334 struct {
335 uint32_t offset;
343 uint32_t length;
349 } src;
350 struct {
351 uint32_t offset;
360 } dst;
361 struct {
362 uint8_t *digest;
373 } hash;
378 uint64_t input_chksum;
387 uint32_t consumed;
391 uint32_t produced;
395 uint64_t debug_status;
401 uint8_t status;
410
429__rte_experimental
430struct rte_mempool *
432 unsigned int nb_elts, unsigned int cache_size,
433 uint16_t user_size, int socket_id);
434
445__rte_experimental
446struct rte_comp_op *
448
462__rte_experimental
463int
465 struct rte_comp_op **ops, uint16_t nb_ops);
466
476__rte_experimental
477void
479
491__rte_experimental
492void
493rte_comp_op_bulk_free(struct rte_comp_op **ops, uint16_t nb_ops);
494
504__rte_experimental
505const char *
507
508#ifdef __cplusplus
509}
510#endif
511
512#endif /* _RTE_COMP_H_ */
#define __rte_cache_aligned
Definition: rte_common.h:440
uint64_t rte_iova_t
Definition: rte_common.h:458
rte_comp_flush_flag
Definition: rte_comp.h:166
@ RTE_COMP_FLUSH_SYNC
Definition: rte_comp.h:172
@ RTE_COMP_FLUSH_NONE
Definition: rte_comp.h:167
@ RTE_COMP_FLUSH_FULL
Definition: rte_comp.h:177
@ RTE_COMP_FLUSH_FINAL
Definition: rte_comp.h:182
rte_comp_hash_algorithm
Definition: rte_comp.h:116
@ RTE_COMP_HASH_ALGO_NONE
Definition: rte_comp.h:117
@ RTE_COMP_HASH_ALGO_SHA1
Definition: rte_comp.h:119
@ RTE_COMP_HASH_ALGO_SHA2_256
Definition: rte_comp.h:121
rte_comp_xform_type
Definition: rte_comp.h:189
@ RTE_COMP_COMPRESS
Definition: rte_comp.h:190
@ RTE_COMP_DECOMPRESS
Definition: rte_comp.h:192
rte_comp_checksum_type
Definition: rte_comp.h:141
@ RTE_COMP_CHECKSUM_ADLER32
Definition: rte_comp.h:146
@ RTE_COMP_CHECKSUM_CRC32
Definition: rte_comp.h:144
@ RTE_COMP_CHECKSUM_CRC32_ADLER32
Definition: rte_comp.h:148
@ RTE_COMP_CHECKSUM_NONE
Definition: rte_comp.h:142
__rte_experimental void rte_comp_op_bulk_free(struct rte_comp_op **ops, uint16_t nb_ops)
rte_comp_op_status
Definition: rte_comp.h:72
@ RTE_COMP_OP_STATUS_NOT_PROCESSED
Definition: rte_comp.h:75
@ RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED
Definition: rte_comp.h:83
@ RTE_COMP_OP_STATUS_INVALID_STATE
Definition: rte_comp.h:81
@ RTE_COMP_OP_STATUS_INVALID_ARGS
Definition: rte_comp.h:77
@ RTE_COMP_OP_STATUS_ERROR
Definition: rte_comp.h:79
@ RTE_COMP_OP_STATUS_SUCCESS
Definition: rte_comp.h:73
@ RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE
Definition: rte_comp.h:88
__rte_experimental void rte_comp_op_free(struct rte_comp_op *op)
__rte_experimental const char * rte_comp_get_feature_name(uint64_t flag)
__rte_experimental int rte_comp_op_bulk_alloc(struct rte_mempool *mempool, struct rte_comp_op **ops, uint16_t nb_ops)
__rte_experimental struct rte_mempool * rte_comp_op_pool_create(const char *name, unsigned int nb_elts, unsigned int cache_size, uint16_t user_size, int socket_id)
rte_comp_op_type
Definition: rte_comp.h:197
@ RTE_COMP_OP_STATEFUL
Definition: rte_comp.h:203
@ RTE_COMP_OP_STATELESS
Definition: rte_comp.h:198
rte_comp_huffman
Definition: rte_comp.h:156
@ RTE_COMP_HUFFMAN_FIXED
Definition: rte_comp.h:159
@ RTE_COMP_HUFFMAN_DEFAULT
Definition: rte_comp.h:157
@ RTE_COMP_HUFFMAN_DYNAMIC
Definition: rte_comp.h:161
__rte_experimental struct rte_comp_op * rte_comp_op_alloc(struct rte_mempool *mempool)
rte_comp_algorithm
Definition: rte_comp.h:96
@ RTE_COMP_ALGO_DEFLATE
Definition: rte_comp.h:104
@ RTE_COMP_ALGO_NULL
Definition: rte_comp.h:99
@ RTE_COMP_ALGO_LZS
Definition: rte_comp.h:108
enum rte_comp_algorithm algo
Definition: rte_comp.h:220
enum rte_comp_checksum_type chksum
Definition: rte_comp.h:233
enum rte_comp_hash_algorithm hash_algo
Definition: rte_comp.h:235
struct rte_comp_deflate_params deflate
Definition: rte_comp.h:223
enum rte_comp_algorithm algo
Definition: rte_comp.h:245
enum rte_comp_checksum_type chksum
Definition: rte_comp.h:247
enum rte_comp_hash_algorithm hash_algo
Definition: rte_comp.h:254
enum rte_comp_huffman huffman
Definition: rte_comp.h:214
void * private_xform
Definition: rte_comp.h:290
uint32_t produced
Definition: rte_comp.h:391
uint64_t debug_status
Definition: rte_comp.h:395
uint32_t consumed
Definition: rte_comp.h:387
uint8_t * digest
Definition: rte_comp.h:362
struct rte_mempool * mempool
Definition: rte_comp.h:306
uint64_t input_chksum
Definition: rte_comp.h:378
rte_iova_t iova_addr
Definition: rte_comp.h:308
uint32_t offset
Definition: rte_comp.h:335
uint64_t output_chksum
Definition: rte_comp.h:383
struct rte_mbuf * m_dst
Definition: rte_comp.h:318
enum rte_comp_flush_flag flush_flag
Definition: rte_comp.h:374
uint8_t status
Definition: rte_comp.h:401
uint32_t length
Definition: rte_comp.h:343
struct rte_mbuf * m_src
Definition: rte_comp.h:310
void * stream
Definition: rte_comp.h:295
enum rte_comp_xform_type type
Definition: rte_comp.h:268
struct rte_comp_compress_xform compress
Definition: rte_comp.h:271
struct rte_comp_decompress_xform decompress
Definition: rte_comp.h:273
char name[RTE_MEMPOOL_NAMESIZE]
Definition: rte_mempool.h:220
uint32_t cache_size
Definition: rte_mempool.h:231