API Reference Manual 1.51.0
Loading...
Searching...
No Matches
api/spec/comp.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2018 Linaro Limited
3 */
4
11#ifndef ODP_API_SPEC_COMP_H_
12#define ODP_API_SPEC_COMP_H_
13
14#include <odp/visibility_begin.h>
15
16#include <odp/api/event_types.h>
18#include <odp/api/queue_types.h>
19#include <odp/api/std_types.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
60
71
85
103
117
123 struct {
125 uint32_t none : 1;
126
128 uint32_t sha1 : 1;
129
131 uint32_t sha256 : 1;
132
134
140 uint32_t all_bits;
142
146typedef union odp_comp_algos_t {
148 struct {
150 uint32_t null : 1;
151
153 uint32_t deflate : 1;
154
156 uint32_t zlib : 1;
157
159 uint32_t lzs : 1;
161
166 uint32_t all_bits;
168
188
196
224
238
265
279
332
350
377
389
403
417
427
442
455
493int odp_comp_op(const odp_packet_t pkt_in[], odp_packet_t pkt_out[],
494 int num_pkt, const odp_comp_packet_op_param_t param[]);
495
543int odp_comp_op_enq(const odp_packet_t pkt_in[], odp_packet_t pkt_out[],
544 int num_pkt, const odp_comp_packet_op_param_t param[]);
545
562
579
589
602
607#ifdef __cplusplus
608}
609#endif
610
611#include <odp/visibility_end.h>
612#endif
613
ODP event API type definitions.
ODP packet.
ODP queue.
Standard C language types and definitions for ODP.
int odp_comp_session_destroy(odp_comp_session_t session)
Compression session destroy.
odp_comp_session_t odp_comp_session_create(const odp_comp_session_param_t *param)
Compression session creation.
odp_comp_hash_alg_t
Compression hash algorithms.
uint64_t odp_comp_session_to_u64(odp_comp_session_t hdl)
Get printable value for an odp_comp_session_t.
enum odp_comp_huffman_code odp_comp_huffman_code_t
Compression Huffman type.
odp_packet_t odp_comp_packet_from_event(odp_event_t event)
Convert compression processed packet event to packet handle.
odp_comp_huffman_code
Compression Huffman type.
int odp_comp_result(odp_comp_packet_result_t *result, odp_packet_t packet)
Get compression operation results from processed packet.
int odp_comp_op_enq(const odp_packet_t pkt_in[], odp_packet_t pkt_out[], int num_pkt, const odp_comp_packet_op_param_t param[])
Asynchronous packet compression operation.
int odp_comp_capability(odp_comp_capability_t *capa)
Query compression capabilities.
int odp_comp_alg_capability(odp_comp_alg_t comp, odp_comp_alg_capability_t *capa)
Query supported compression algorithm capabilities.
odp_comp_op_mode_t
Compression operation mode.
odp_comp_status_t
Compression operation status codes.
odp_event_t odp_comp_packet_to_event(odp_packet_t pkt)
Convert processed packet handle to event.
void odp_comp_session_param_init(odp_comp_session_param_t *param)
Initialize compression session parameters.
odp_comp_alg_t
Compression algorithms.
int odp_comp_hash_alg_capability(odp_comp_hash_alg_t hash, odp_comp_hash_alg_capability_t *capa)
Query supported hash algorithm capabilities.
struct odp_comp_deflate_param odp_comp_deflate_param_t
Compression DEFLATEe algorithm parameters.
int odp_comp_op(const odp_packet_t pkt_in[], odp_packet_t pkt_out[], int num_pkt, const odp_comp_packet_op_param_t param[])
Synchronous packet compression operation.
odp_comp_op_t
Compression operation type.
@ ODP_COMP_HASH_ALG_SHA256
SHA-2 hash algorithm 256-bit digest length.
@ ODP_COMP_HASH_ALG_NONE
No hash algorithm selected.
@ ODP_COMP_HASH_ALG_SHA1
SHA-1 hash algorithm.
@ ODP_COMP_HUFFMAN_DYNAMIC
Dynamic Huffman code.
@ ODP_COMP_HUFFMAN_FIXED
Fixed Huffman code.
@ ODP_COMP_HUFFMAN_DEFAULT
Default huffman code selected by implementation.
@ ODP_COMP_OP_MODE_ASYNC
Asynchronous Compression operation.
@ ODP_COMP_OP_MODE_SYNC
Synchronous Compression operation.
@ ODP_COMP_STATUS_OUT_OF_SPACE_TERM
Operation terminated due to insufficient output buffer.
@ ODP_COMP_STATUS_SUCCESS
Operation completed successfully.
@ ODP_COMP_STATUS_FAILURE
Operation failure.
@ ODP_COMP_ALG_NULL
No algorithm specified.
@ ODP_COMP_ALG_DEFLATE
DEFLATE - RFC1951.
@ ODP_COMP_ALG_ZLIB
ZLIB - RFC1950.
@ ODP_COMP_ALG_LZS
LZS.
@ ODP_COMP_OP_COMPRESS
Operation type - Compress.
@ ODP_COMP_OP_DECOMPRESS
Operation type - Decompress.
bool odp_bool_t
Boolean type.
odp_support_t
ODP support.
uint32_t odp_percent_t
Percentage type.
Compression algorithm capabilities.
odp_comp_hash_algos_t hash_algo
Supported hash algorithms.
uint32_t max_level
Maximum compression level supported by implementation of this algorithm.
odp_percent_t compression_ratio
Compression ratio Optimal compression operation ratio for this algorithm.
Compression Interface Capabilities.
odp_support_t sync
Synchronous compression mode support (ODP_COMP_OP_MODE_SYNC)
uint32_t max_sessions
Maximum number of sessions.
odp_support_t async
Asynchronous compression mode support (ODP_COMP_OP_MODE_ASYNC)
odp_comp_hash_algos_t hash_algos
Supported hash algorithms.
odp_comp_algos_t comp_algos
Supported compression algorithms.
Compression DEFLATEe algorithm parameters.
odp_comp_huffman_code_t huffman_code
huffman code to use
uint32_t comp_level
Compression level.
Hash algorithm capabilities.
uint32_t digest_len
Digest length in bytes.
Compression per packet operation parameters.
odp_packet_data_range_t in_data_range
Input data range to process.
odp_packet_data_range_t out_data_range
Output packet data range.
odp_comp_session_t session
Session handle.
Compression packet operation result.
odp_packet_t pkt_in
Input packet handle.
odp_packet_data_range_t output_data_range
Output packet data range Specifies offset and length of data resulting from compression operation.
odp_comp_status_t status
Operation status code.
Compression session creation parameters.
odp_comp_alg_param_t alg_param
parameters specific to compression
odp_comp_op_t op
Compression operation type Compress vs Decompress.
odp_comp_op_mode_t mode
Compression operation mode.
odp_queue_t compl_queue
Destination queue for compression operations result.
odp_comp_hash_alg_t hash_algo
Hash algorithm.
odp_comp_alg_t comp_algo
Compression algorithm.
odp_bool_t packet_order
Session packet enqueue ordering Boolean to indicate if packet enqueue ordering is required per sessio...
Packet API data range specifier.
Compression algorithm specific parameters.
odp_comp_deflate_param_t deflate
deflate parameter
struct odp_comp_alg_param_t::@23 zlib
Struct for defining zlib algorithm parameters.
Compression algorithms in a bit field structure.
uint32_t null
ODP_COMP_ALG_NULL.
uint32_t lzs
ODP_COMP_ALG_LZS.
uint32_t zlib
ODP_COMP_ALG_ZLIB.
uint32_t all_bits
All bits of the bit field structure This field can be used to set/clear all flags,...
uint32_t deflate
ODP_COMP_ALG_DEFLATE.
struct odp_comp_algos_t::@22 bit
Compression algorithms.
Hash algorithms in a bit field structure.
uint32_t sha1
ODP_COMP_HASH_ALG_SHA1.
struct odp_comp_hash_algos_t::@21 bit
hash algorithms
uint32_t sha256
ODP_COMP_HASH_ALG_SHA256.
uint32_t all_bits
All bits of the bit field structure.
uint32_t none
ODP_COMP_HASH_ALG_NONE.