NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
DOCA Compress Engine

Typedefs

typedef void(* doca_compress_task_compress_deflate_completion_cb_t) (struct doca_compress_task_compress_deflate *task, union doca_data task_user_data, union doca_data ctx_user_data)
 Function to execute on compress deflate task completion. More...
 
typedef void(* doca_compress_task_decompress_deflate_completion_cb_t) (struct doca_compress_task_decompress_deflate *task, union doca_data task_user_data, union doca_data ctx_user_data)
 Function to execute on decompress deflate task completion. More...
 
typedef void(* doca_compress_task_decompress_lz4_stream_completion_cb_t) (struct doca_compress_task_decompress_lz4_stream *task, union doca_data task_user_data, union doca_data ctx_user_data)
 Function to execute on decompress LZ4 stream task completion. More...
 
typedef void(* doca_compress_task_decompress_lz4_block_completion_cb_t) (struct doca_compress_task_decompress_lz4_block *task, union doca_data task_user_data, union doca_data ctx_user_data)
 Function to execute on decompress LZ4 block task completion. More...
 

Functions

DOCA_EXPERIMENTAL doca_error_t doca_compress_create (struct doca_dev *dev, struct doca_compress **compress)
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_destroy (struct doca_compress *compress)
 
DOCA_EXPERIMENTAL struct doca_ctx * doca_compress_as_ctx (struct doca_compress *compress)
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_get_max_num_tasks (struct doca_compress *compress, uint32_t *max_num_tasks)
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_compress_deflate_is_supported (const struct doca_devinfo *devinfo)
 Check if a compress deflate task is supported by a device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_compress_deflate_get_max_buf_size (const struct doca_devinfo *devinfo, uint64_t *max_buffer_size)
 Get compress deflate max size. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_compress_deflate_get_max_buf_list_len (const struct doca_devinfo *devinfo, uint32_t *max_buf_list_len)
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_task_compress_deflate_set_conf (struct doca_compress *compress, doca_compress_task_compress_deflate_completion_cb_t task_completion_cb, doca_compress_task_compress_deflate_completion_cb_t task_error_cb, uint32_t num_tasks)
 This method sets the compress deflate task configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_task_compress_deflate_alloc_init (struct doca_compress *compress, struct doca_buf const *src_buff, struct doca_buf *dst_buff, union doca_data user_data, struct doca_compress_task_compress_deflate **task)
 Allocate compress deflate task. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_compress_task_compress_deflate_as_task (struct doca_compress_task_compress_deflate *task)
 convert compress deflate task to doca_task More...
 
DOCA_EXPERIMENTAL void doca_compress_task_compress_deflate_set_src (struct doca_compress_task_compress_deflate *task, struct doca_buf const *src_buff)
 set compress deflate task source More...
 
DOCA_EXPERIMENTAL struct doca_buf const * doca_compress_task_compress_deflate_get_src (const struct doca_compress_task_compress_deflate *task)
 get compress deflate task source More...
 
DOCA_EXPERIMENTAL void doca_compress_task_compress_deflate_set_dst (struct doca_compress_task_compress_deflate *task, struct doca_buf *dst_buff)
 set compress deflate task destination More...
 
DOCA_EXPERIMENTAL struct doca_buf * doca_compress_task_compress_deflate_get_dst (const struct doca_compress_task_compress_deflate *task)
 get compress deflate task destination More...
 
DOCA_EXPERIMENTAL uint32_t doca_compress_task_compress_deflate_get_crc_cs (const struct doca_compress_task_compress_deflate *task)
 get compress deflate task CRC checksum More...
 
DOCA_EXPERIMENTAL uint32_t doca_compress_task_compress_deflate_get_adler_cs (const struct doca_compress_task_compress_deflate *task)
 get compress deflate task adler checksum More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_deflate_is_supported (const struct doca_devinfo *devinfo)
 Check if a decompress deflate task is supported by a device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_deflate_get_max_buf_size (const struct doca_devinfo *devinfo, uint64_t *max_buffer_size)
 Get decompress deflate max size. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_deflate_get_max_buf_list_len (const struct doca_devinfo *devinfo, uint32_t *max_buf_list_len)
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_task_decompress_deflate_set_conf (struct doca_compress *compress, doca_compress_task_decompress_deflate_completion_cb_t task_completion_cb, doca_compress_task_decompress_deflate_completion_cb_t task_error_cb, uint32_t num_tasks)
 This method sets the decompress deflate task configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_task_decompress_deflate_alloc_init (struct doca_compress *compress, struct doca_buf const *src_buff, struct doca_buf *dst_buff, union doca_data user_data, struct doca_compress_task_decompress_deflate **task)
 Allocate decompress deflate task. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_compress_task_decompress_deflate_as_task (struct doca_compress_task_decompress_deflate *task)
 convert decompress deflate task to doca_task More...
 
DOCA_EXPERIMENTAL void doca_compress_task_decompress_deflate_set_src (struct doca_compress_task_decompress_deflate *task, struct doca_buf const *src_buff)
 set decompress deflate task source More...
 
DOCA_EXPERIMENTAL struct doca_buf const * doca_compress_task_decompress_deflate_get_src (const struct doca_compress_task_decompress_deflate *task)
 get decompress deflate task source More...
 
DOCA_EXPERIMENTAL void doca_compress_task_decompress_deflate_set_dst (struct doca_compress_task_decompress_deflate *task, struct doca_buf *dst_buff)
 set decompress deflate task destination More...
 
DOCA_EXPERIMENTAL struct doca_buf * doca_compress_task_decompress_deflate_get_dst (const struct doca_compress_task_decompress_deflate *task)
 get decompress deflate task destination More...
 
DOCA_EXPERIMENTAL uint32_t doca_compress_task_decompress_deflate_get_crc_cs (const struct doca_compress_task_decompress_deflate *task)
 get decompress deflate task CRC checksum More...
 
DOCA_EXPERIMENTAL uint32_t doca_compress_task_decompress_deflate_get_adler_cs (const struct doca_compress_task_decompress_deflate *task)
 get decompress deflate task adler checksum More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_lz4_stream_is_supported (const struct doca_devinfo *devinfo)
 Check if a decompress LZ4 stream task is supported by a device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_lz4_stream_get_max_buf_size (const struct doca_devinfo *devinfo, uint64_t *max_buffer_size)
 Get decompress LZ4 stream max size. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_lz4_stream_get_max_buf_list_len (const struct doca_devinfo *devinfo, uint32_t *max_buf_list_len)
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_task_decompress_lz4_stream_set_conf (struct doca_compress *compress, doca_compress_task_decompress_lz4_stream_completion_cb_t task_completion_cb, doca_compress_task_decompress_lz4_stream_completion_cb_t task_error_cb, uint32_t num_tasks)
 This method sets the decompress LZ4 stream task configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_task_decompress_lz4_stream_alloc_init (struct doca_compress *compress, uint8_t has_block_checksum, uint8_t are_blocks_independent, struct doca_buf const *src_buff, struct doca_buf *dst_buff, union doca_data user_data, struct doca_compress_task_decompress_lz4_stream **task)
 Allocate decompress LZ4 stream task. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_compress_task_decompress_lz4_stream_as_task (struct doca_compress_task_decompress_lz4_stream *task)
 convert decompress LZ4 stream task to doca_task More...
 
DOCA_EXPERIMENTAL void doca_compress_task_decompress_lz4_stream_set_has_block_checksum (struct doca_compress_task_decompress_lz4_stream *task, uint8_t has_block_checksum)
 set decompress LZ4 stream task has_block_checksum flag More...
 
DOCA_EXPERIMENTAL uint8_t doca_compress_task_decompress_lz4_stream_get_has_block_checksum (const struct doca_compress_task_decompress_lz4_stream *task)
 get decompress LZ4 stream task has_block_checksum flag More...
 
DOCA_EXPERIMENTAL void doca_compress_task_decompress_lz4_stream_set_are_blocks_independent (struct doca_compress_task_decompress_lz4_stream *task, uint8_t are_blocks_independent)
 set decompress LZ4 stream task are_blocks_independent flag More...
 
DOCA_EXPERIMENTAL uint8_t doca_compress_task_decompress_lz4_stream_get_are_blocks_independent (const struct doca_compress_task_decompress_lz4_stream *task)
 get decompress LZ4 stream task are_blocks_independent flag More...
 
DOCA_EXPERIMENTAL void doca_compress_task_decompress_lz4_stream_set_src (struct doca_compress_task_decompress_lz4_stream *task, struct doca_buf const *src_buff)
 set decompress LZ4 stream task source More...
 
DOCA_EXPERIMENTAL struct doca_buf const * doca_compress_task_decompress_lz4_stream_get_src (const struct doca_compress_task_decompress_lz4_stream *task)
 get decompress LZ4 stream task source More...
 
DOCA_EXPERIMENTAL void doca_compress_task_decompress_lz4_stream_set_dst (struct doca_compress_task_decompress_lz4_stream *task, struct doca_buf *dst_buff)
 set decompress LZ4 stream task destination More...
 
DOCA_EXPERIMENTAL struct doca_buf * doca_compress_task_decompress_lz4_stream_get_dst (const struct doca_compress_task_decompress_lz4_stream *task)
 get decompress LZ4 stream task destination More...
 
DOCA_EXPERIMENTAL uint32_t doca_compress_task_decompress_lz4_stream_get_crc_cs (const struct doca_compress_task_decompress_lz4_stream *task)
 get decompress LZ4 stream task CRC checksum More...
 
DOCA_EXPERIMENTAL uint32_t doca_compress_task_decompress_lz4_stream_get_xxh_cs (const struct doca_compress_task_decompress_lz4_stream *task)
 get decompress LZ4 stream task xxHash-32 checksum More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_lz4_block_is_supported (const struct doca_devinfo *devinfo)
 Check if a decompress LZ4 block task is supported by a device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_lz4_block_get_max_buf_size (const struct doca_devinfo *devinfo, uint64_t *max_buffer_size)
 Get decompress LZ4 block max size. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_lz4_block_get_max_buf_list_len (const struct doca_devinfo *devinfo, uint32_t *max_buf_list_len)
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_task_decompress_lz4_block_set_conf (struct doca_compress *compress, doca_compress_task_decompress_lz4_block_completion_cb_t task_completion_cb, doca_compress_task_decompress_lz4_block_completion_cb_t task_error_cb, uint32_t num_tasks)
 This method sets the decompress LZ4 block task configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_compress_task_decompress_lz4_block_alloc_init (struct doca_compress *compress, struct doca_buf const *src_buff, struct doca_buf *dst_buff, union doca_data user_data, struct doca_compress_task_decompress_lz4_block **task)
 Allocate decompress LZ4 block task. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_compress_task_decompress_lz4_block_as_task (struct doca_compress_task_decompress_lz4_block *task)
 convert decompress LZ4 block task to doca_task More...
 
DOCA_EXPERIMENTAL void doca_compress_task_decompress_lz4_block_set_src (struct doca_compress_task_decompress_lz4_block *task, struct doca_buf const *src_buff)
 set decompress LZ4 block task source More...
 
DOCA_EXPERIMENTAL struct doca_buf const * doca_compress_task_decompress_lz4_block_get_src (const struct doca_compress_task_decompress_lz4_block *task)
 get decompress LZ4 block task source More...
 
DOCA_EXPERIMENTAL void doca_compress_task_decompress_lz4_block_set_dst (struct doca_compress_task_decompress_lz4_block *task, struct doca_buf *dst_buff)
 set decompress LZ4 block task destination More...
 
DOCA_EXPERIMENTAL struct doca_buf * doca_compress_task_decompress_lz4_block_get_dst (const struct doca_compress_task_decompress_lz4_block *task)
 get decompress LZ4 block task destination More...
 
DOCA_EXPERIMENTAL uint32_t doca_compress_task_decompress_lz4_block_get_crc_cs (const struct doca_compress_task_decompress_lz4_block *task)
 get decompress LZ4 block task CRC checksum More...
 
DOCA_EXPERIMENTAL uint32_t doca_compress_task_decompress_lz4_block_get_xxh_cs (const struct doca_compress_task_decompress_lz4_block *task)
 get decompress LZ4 block task xxHash-32 checksum More...
 

Detailed Description

DOCA COMPRESS library. For more details please refer to the user guide on DOCA devzone.

Typedef Documentation

◆ doca_compress_task_compress_deflate_completion_cb_t

typedef void(* doca_compress_task_compress_deflate_completion_cb_t) (struct doca_compress_task_compress_deflate *task, union doca_data task_user_data, union doca_data ctx_user_data)

Function to execute on compress deflate task completion.

Parameters
[in]taskcompress deflate task. The implementation can assume this value is not NULL.
[in]task_user_datatask user data
[in]ctx_user_datadoca_ctx user data

Definition at line 137 of file doca_compress.h.

◆ doca_compress_task_decompress_deflate_completion_cb_t

typedef void(* doca_compress_task_decompress_deflate_completion_cb_t) (struct doca_compress_task_decompress_deflate *task, union doca_data task_user_data, union doca_data ctx_user_data)

Function to execute on decompress deflate task completion.

Parameters
[in]taskdecompress deflate task. The implementation can assume this value is not NULL.
[in]task_user_datatask user data
[in]ctx_user_datadoca_ctx user data

Definition at line 357 of file doca_compress.h.

◆ doca_compress_task_decompress_lz4_block_completion_cb_t

typedef void(* doca_compress_task_decompress_lz4_block_completion_cb_t) (struct doca_compress_task_decompress_lz4_block *task, union doca_data task_user_data, union doca_data ctx_user_data)

Function to execute on decompress LZ4 block task completion.

Parameters
[in]taskdecompress LZ4 block task. The implementation can assume this value is not NULL.
[in]task_user_datatask user data
[in]ctx_user_datadoca_ctx user data

Definition at line 862 of file doca_compress.h.

◆ doca_compress_task_decompress_lz4_stream_completion_cb_t

typedef void(* doca_compress_task_decompress_lz4_stream_completion_cb_t) (struct doca_compress_task_decompress_lz4_stream *task, union doca_data task_user_data, union doca_data ctx_user_data)

Function to execute on decompress LZ4 stream task completion.

Parameters
[in]taskdecompress LZ4 stream task. The implementation can assume this value is not NULL.
[in]task_user_datatask user data
[in]ctx_user_datadoca_ctx user data

Definition at line 579 of file doca_compress.h.

Function Documentation

◆ doca_compress_as_ctx()

DOCA_EXPERIMENTAL struct doca_ctx* doca_compress_as_ctx ( struct doca_compress *  compress)

Adapt doca_compress instance into a generalized context for use with doca core objects.

Parameters
[in]compressCompress instance. This must remain valid until after the context is no longer required.
Returns
Non NULL upon success, NULL otherwise.

◆ doca_compress_cap_get_max_num_tasks()

DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_get_max_num_tasks ( struct doca_compress *  compress,
uint32_t *  max_num_tasks 
)

Get the maximum number of tasks

This method retrieves the maximum number of tasks for a device. Sum of num tasks should not exceed this number.

Parameters
[in]compressCompress context to get max number of tasks from
[out]max_num_tasksSum of num tasks should not exceed this number (
See also
doca_compress_task_compress_deflate_set_conf, doca_compress_task_decompress_deflate_set_conf, doca_compress_task_decompress_lz4_set_conf)
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case of invalid input.

◆ doca_compress_cap_task_compress_deflate_get_max_buf_list_len()

DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_compress_deflate_get_max_buf_list_len ( const struct doca_devinfo *  devinfo,
uint32_t *  max_buf_list_len 
)

Get the maximum supported number of elements in DOCA linked-list buffer for compress deflate task.

Parameters
[in]devinfoThe DOCA device information.
[out]max_buf_list_lenThe maximum supported number of elements in DOCA linked-list buffer. The value 1 indicates that only a single element is supported.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case of invalid input.

◆ doca_compress_cap_task_compress_deflate_get_max_buf_size()

DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_compress_deflate_get_max_buf_size ( const struct doca_devinfo *  devinfo,
uint64_t *  max_buffer_size 
)

Get compress deflate max size.

This method retrieves a compress deflate max size for a device

Parameters
[in]devinfodoca device info to check
[out]max_buffer_sizeThe max buffer size for compress deflate operation in bytes.
Returns
DOCA_SUCCESS - in case device supports the task Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - devinfo does not support the task.

◆ doca_compress_cap_task_compress_deflate_is_supported()

DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_compress_deflate_is_supported ( const struct doca_devinfo *  devinfo)

Check if a compress deflate task is supported by a device.

This method checks if a compress deflate task is supported by a device

Parameters
[in]devinfodoca device info to check
Returns
DOCA_SUCCESS - in case device supports the task Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - failed to query the device for its capabilities.
  • DOCA_ERROR_NOT_SUPPORTED - devinfo does not support the task.

◆ doca_compress_cap_task_decompress_deflate_get_max_buf_list_len()

DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_deflate_get_max_buf_list_len ( const struct doca_devinfo *  devinfo,
uint32_t *  max_buf_list_len 
)

Get the maximum supported number of elements in DOCA linked-list buffer for decompress deflate task.

Parameters
[in]devinfoThe DOCA device information.
[out]max_buf_list_lenThe maximum supported number of elements in DOCA linked-list buffer. The value 1 indicates that only a single element is supported.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case of invalid input.

◆ doca_compress_cap_task_decompress_deflate_get_max_buf_size()

DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_deflate_get_max_buf_size ( const struct doca_devinfo *  devinfo,
uint64_t *  max_buffer_size 
)

Get decompress deflate max size.

This method retrieves decompress deflate max size

Parameters
[in]devinfodoca device info to check
[out]max_buffer_sizeThe max buffer size for decompress deflate operation in bytes.
Returns
DOCA_SUCCESS - in case device supports the task Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - devinfo does not support the task.

◆ doca_compress_cap_task_decompress_deflate_is_supported()

DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_deflate_is_supported ( const struct doca_devinfo *  devinfo)

Check if a decompress deflate task is supported by a device.

This method checks if a decompress deflate task is supported by a device

Parameters
[in]devinfodoca device info to check
Returns
DOCA_SUCCESS - in case device supports the task Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - failed to query the device for its capabilities.
  • DOCA_ERROR_NOT_SUPPORTED - devinfo does not support the task.

◆ doca_compress_cap_task_decompress_lz4_block_get_max_buf_list_len()

DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_lz4_block_get_max_buf_list_len ( const struct doca_devinfo *  devinfo,
uint32_t *  max_buf_list_len 
)

Get the maximum supported number of elements in DOCA linked-list buffer for decompress LZ4 block task.

Parameters
[in]devinfoThe DOCA device information.
[out]max_buf_list_lenThe maximum supported number of elements in DOCA linked-list buffer. The value 1 indicates that only a single element is supported.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case of invalid input.

◆ doca_compress_cap_task_decompress_lz4_block_get_max_buf_size()

DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_lz4_block_get_max_buf_size ( const struct doca_devinfo *  devinfo,
uint64_t *  max_buffer_size 
)

Get decompress LZ4 block max size.

This method retrieves decompress LZ4 block max size

Parameters
[in]devinfodoca device info to check
[out]max_buffer_sizeThe max buffer size for decompress LZ4 block operation in bytes.
Returns
DOCA_SUCCESS - in case device supports the task Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - devinfo does not support the task.

◆ doca_compress_cap_task_decompress_lz4_block_is_supported()

DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_lz4_block_is_supported ( const struct doca_devinfo *  devinfo)

Check if a decompress LZ4 block task is supported by a device.

This method checks if a decompress LZ4 block task is supported by a device

Parameters
[in]devinfodoca device info to check
Returns
DOCA_SUCCESS - in case device supports the task Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - failed to query the device for its capabilities.
  • DOCA_ERROR_NOT_SUPPORTED - devinfo does not support the task.

◆ doca_compress_cap_task_decompress_lz4_stream_get_max_buf_list_len()

DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_lz4_stream_get_max_buf_list_len ( const struct doca_devinfo *  devinfo,
uint32_t *  max_buf_list_len 
)

Get the maximum supported number of elements in DOCA linked-list buffer for decompress LZ4 stream task

Parameters
[in]devinfoThe DOCA device information.
[out]max_buf_list_lenThe maximum supported number of elements in DOCA linked-list buffer. The value 1 indicates that only a single element is supported.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case of invalid input.

◆ doca_compress_cap_task_decompress_lz4_stream_get_max_buf_size()

DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_lz4_stream_get_max_buf_size ( const struct doca_devinfo *  devinfo,
uint64_t *  max_buffer_size 
)

Get decompress LZ4 stream max size.

This method retrieves decompress LZ4 stream max size

Parameters
[in]devinfodoca device info to check
[out]max_buffer_sizeThe max buffer size for decompress LZ4 stream operation in bytes.
Returns
DOCA_SUCCESS - in case device supports the task Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - devinfo does not support the task.

◆ doca_compress_cap_task_decompress_lz4_stream_is_supported()

DOCA_EXPERIMENTAL doca_error_t doca_compress_cap_task_decompress_lz4_stream_is_supported ( const struct doca_devinfo *  devinfo)

Check if a decompress LZ4 stream task is supported by a device.

This method checks if a decompress LZ4 stream task is supported by a device

Parameters
[in]devinfodoca device info to check
Returns
DOCA_SUCCESS - in case device supports the task Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - failed to query the device for its capabilities.
  • DOCA_ERROR_NOT_SUPPORTED - devinfo does not support the task.

◆ doca_compress_create()

DOCA_EXPERIMENTAL doca_error_t doca_compress_create ( struct doca_dev *  dev,
struct doca_compress **  compress 
)

Create a DOCA COMPRESS instance.

Parameters
[in]devThe device to attach to the compress context
[out]compressPointer to pointer to be set to point to the created doca_compress instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - one or more of the arguments is null.
  • DOCA_ERROR_NO_MEMORY - failed to alloc doca_compress.
  • DOCA_ERROR_INITIALIZATION - failed to initialize a mutex.

◆ doca_compress_destroy()

DOCA_EXPERIMENTAL doca_error_t doca_compress_destroy ( struct doca_compress *  compress)

Destroy a DOCA COMPRESS instance.

Parameters
[in]compressPointer to instance to be destroyed.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_IN_USE - if unable to gain exclusive access to the compress instance

◆ doca_compress_task_compress_deflate_alloc_init()

DOCA_EXPERIMENTAL doca_error_t doca_compress_task_compress_deflate_alloc_init ( struct doca_compress *  compress,
struct doca_buf const *  src_buff,
struct doca_buf *  dst_buff,
union doca_data  user_data,
struct doca_compress_task_compress_deflate **  task 
)

Allocate compress deflate task.

This method allocates and initializes a compress deflate task. Task parameters can be set later on by setters.

Parameters
[in]compressThe compress context to allocate the task from
[in]src_buffSource buffer
[in]dst_buffDestination buffer
[in]user_datadoca_data that can be retrieved from the task (usually when the task is completed).
[out]taskThe allocated task
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NO_MEMORY - all compress deflate tasks are already allocated.
  • DOCA_ERROR_INVALID_VALUE - can not initialize source HW resources.

◆ doca_compress_task_compress_deflate_as_task()

DOCA_EXPERIMENTAL struct doca_task* doca_compress_task_compress_deflate_as_task ( struct doca_compress_task_compress_deflate *  task)

convert compress deflate task to doca_task

Parameters
[in]taskThe task to convert
Returns
doca_task

◆ doca_compress_task_compress_deflate_get_adler_cs()

DOCA_EXPERIMENTAL uint32_t doca_compress_task_compress_deflate_get_adler_cs ( const struct doca_compress_task_compress_deflate *  task)

get compress deflate task adler checksum

Note
Valid only on successful completion of the task. Otherwise, undefined behavior.
Parameters
[in]taskTask to get the destination from
Returns
adler

◆ doca_compress_task_compress_deflate_get_crc_cs()

DOCA_EXPERIMENTAL uint32_t doca_compress_task_compress_deflate_get_crc_cs ( const struct doca_compress_task_compress_deflate *  task)

get compress deflate task CRC checksum

Note
Valid only on successful completion of the task. Otherwise, undefined behavior.
Parameters
[in]taskTask to get the destination from
Returns
CRC

◆ doca_compress_task_compress_deflate_get_dst()

DOCA_EXPERIMENTAL struct doca_buf* doca_compress_task_compress_deflate_get_dst ( const struct doca_compress_task_compress_deflate *  task)

get compress deflate task destination

Parameters
[in]taskTask to get the destination from
Returns
destination buffer

◆ doca_compress_task_compress_deflate_get_src()

DOCA_EXPERIMENTAL struct doca_buf const* doca_compress_task_compress_deflate_get_src ( const struct doca_compress_task_compress_deflate *  task)

get compress deflate task source

Parameters
[in]taskTask to get the source from
Returns
source buffer

◆ doca_compress_task_compress_deflate_set_conf()

DOCA_EXPERIMENTAL doca_error_t doca_compress_task_compress_deflate_set_conf ( struct doca_compress *  compress,
doca_compress_task_compress_deflate_completion_cb_t  task_completion_cb,
doca_compress_task_compress_deflate_completion_cb_t  task_error_cb,
uint32_t  num_tasks 
)

This method sets the compress deflate task configuration.

Parameters
[in]compressThe compress context to config
[in]task_completion_cbTask completion callback
[in]task_error_cbTask error callback
[in]num_tasksNumber of compress deflate tasks that the context can allocate
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_compress_task_compress_deflate_set_dst()

DOCA_EXPERIMENTAL void doca_compress_task_compress_deflate_set_dst ( struct doca_compress_task_compress_deflate *  task,
struct doca_buf *  dst_buff 
)

set compress deflate task destination

Parameters
[in]taskTask to set the destination to
[in]dst_buffdestination buffer to set

◆ doca_compress_task_compress_deflate_set_src()

DOCA_EXPERIMENTAL void doca_compress_task_compress_deflate_set_src ( struct doca_compress_task_compress_deflate *  task,
struct doca_buf const *  src_buff 
)

set compress deflate task source

Parameters
[in]taskTask to set the source to
[in]src_buffSource buffer to set

◆ doca_compress_task_decompress_deflate_alloc_init()

DOCA_EXPERIMENTAL doca_error_t doca_compress_task_decompress_deflate_alloc_init ( struct doca_compress *  compress,
struct doca_buf const *  src_buff,
struct doca_buf *  dst_buff,
union doca_data  user_data,
struct doca_compress_task_decompress_deflate **  task 
)

Allocate decompress deflate task.

This method allocates and initializes a decompress deflate task. Task parameters can be set later on by setters.

Parameters
[in]compressThe compress context to allocate the task from
[in]src_buffSource buffer
[in]dst_buffDestination buffer
[in]user_datadoca_data that can be retrieved from the task (usually when the task is completed).
[out]taskThe allocated task
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NO_MEMORY - all compress deflate tasks are already allocated.

◆ doca_compress_task_decompress_deflate_as_task()

DOCA_EXPERIMENTAL struct doca_task* doca_compress_task_decompress_deflate_as_task ( struct doca_compress_task_decompress_deflate *  task)

convert decompress deflate task to doca_task

Parameters
[in]taskThe task to convert
Returns
doca_task

◆ doca_compress_task_decompress_deflate_get_adler_cs()

DOCA_EXPERIMENTAL uint32_t doca_compress_task_decompress_deflate_get_adler_cs ( const struct doca_compress_task_decompress_deflate *  task)

get decompress deflate task adler checksum

Note
Valid only on successful completion of the task. Otherwise, undefined behavior.
Parameters
[in]taskTask to get the destination from
Returns
adler

◆ doca_compress_task_decompress_deflate_get_crc_cs()

DOCA_EXPERIMENTAL uint32_t doca_compress_task_decompress_deflate_get_crc_cs ( const struct doca_compress_task_decompress_deflate *  task)

get decompress deflate task CRC checksum

Note
Valid only on successful completion of the task. Otherwise, undefined behavior.
Parameters
[in]taskTask to get the destination from
Returns
CRC

◆ doca_compress_task_decompress_deflate_get_dst()

DOCA_EXPERIMENTAL struct doca_buf* doca_compress_task_decompress_deflate_get_dst ( const struct doca_compress_task_decompress_deflate *  task)

get decompress deflate task destination

Parameters
[in]taskTask to get the destination from
Returns
destination buffer

◆ doca_compress_task_decompress_deflate_get_src()

DOCA_EXPERIMENTAL struct doca_buf const* doca_compress_task_decompress_deflate_get_src ( const struct doca_compress_task_decompress_deflate *  task)

get decompress deflate task source

Parameters
[in]taskTask to get the source from
Returns
source buffer

◆ doca_compress_task_decompress_deflate_set_conf()

DOCA_EXPERIMENTAL doca_error_t doca_compress_task_decompress_deflate_set_conf ( struct doca_compress *  compress,
doca_compress_task_decompress_deflate_completion_cb_t  task_completion_cb,
doca_compress_task_decompress_deflate_completion_cb_t  task_error_cb,
uint32_t  num_tasks 
)

This method sets the decompress deflate task configuration.

Parameters
[in]compressThe compress context to config
[in]task_completion_cbTask completion callback
[in]task_error_cbTask error callback
[in]num_tasksNumber of decompress deflate tasks that the context can allocate
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_INVALID_VALUE - can not initialize source HW resources.

◆ doca_compress_task_decompress_deflate_set_dst()

DOCA_EXPERIMENTAL void doca_compress_task_decompress_deflate_set_dst ( struct doca_compress_task_decompress_deflate *  task,
struct doca_buf *  dst_buff 
)

set decompress deflate task destination

Parameters
[in]taskTask to set the destination to
[in]dst_buffdestination buffer to set

◆ doca_compress_task_decompress_deflate_set_src()

DOCA_EXPERIMENTAL void doca_compress_task_decompress_deflate_set_src ( struct doca_compress_task_decompress_deflate *  task,
struct doca_buf const *  src_buff 
)

set decompress deflate task source

Parameters
[in]taskTask to set the source to
[in]src_buffSource buffer to set

◆ doca_compress_task_decompress_lz4_block_alloc_init()

DOCA_EXPERIMENTAL doca_error_t doca_compress_task_decompress_lz4_block_alloc_init ( struct doca_compress *  compress,
struct doca_buf const *  src_buff,
struct doca_buf *  dst_buff,
union doca_data  user_data,
struct doca_compress_task_decompress_lz4_block **  task 
)

Allocate decompress LZ4 block task.

This method allocates and initializes a decompress LZ4 block task. Task parameters can be set later on by setters.

Parameters
[in]compressThe compress context to allocate the task from
[in]src_buffSource buffer
[in]dst_buffDestination buffer
[in]user_datadoca_data that can be retrieved from the task (usually when the task is completed).
[out]taskThe allocated task
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NO_MEMORY - all decompress LZ4 block tasks are already allocated.
  • DOCA_ERROR_INVALID_VALUE - can not initialize source HW resources.

◆ doca_compress_task_decompress_lz4_block_as_task()

DOCA_EXPERIMENTAL struct doca_task* doca_compress_task_decompress_lz4_block_as_task ( struct doca_compress_task_decompress_lz4_block *  task)

convert decompress LZ4 block task to doca_task

Parameters
[in]taskThe task to convert
Returns
doca_task

◆ doca_compress_task_decompress_lz4_block_get_crc_cs()

DOCA_EXPERIMENTAL uint32_t doca_compress_task_decompress_lz4_block_get_crc_cs ( const struct doca_compress_task_decompress_lz4_block *  task)

get decompress LZ4 block task CRC checksum

Note
Valid only on successful completion of the task. Otherwise, undefined behavior.
Parameters
[in]taskTask to get the destination from
Returns
CRC checksum of the block

◆ doca_compress_task_decompress_lz4_block_get_dst()

DOCA_EXPERIMENTAL struct doca_buf* doca_compress_task_decompress_lz4_block_get_dst ( const struct doca_compress_task_decompress_lz4_block *  task)

get decompress LZ4 block task destination

Parameters
[in]taskTask to get the destination from
Returns
destination buffer

◆ doca_compress_task_decompress_lz4_block_get_src()

DOCA_EXPERIMENTAL struct doca_buf const* doca_compress_task_decompress_lz4_block_get_src ( const struct doca_compress_task_decompress_lz4_block *  task)

get decompress LZ4 block task source

Parameters
[in]taskTask to get the source from
Returns
source buffer

◆ doca_compress_task_decompress_lz4_block_get_xxh_cs()

DOCA_EXPERIMENTAL uint32_t doca_compress_task_decompress_lz4_block_get_xxh_cs ( const struct doca_compress_task_decompress_lz4_block *  task)

get decompress LZ4 block task xxHash-32 checksum

Note
Valid only on successful completion of the task. Otherwise, undefined behavior.
Parameters
[in]taskTask to get the checksums from
Returns
xxHash-32 checksum of the block

◆ doca_compress_task_decompress_lz4_block_set_conf()

DOCA_EXPERIMENTAL doca_error_t doca_compress_task_decompress_lz4_block_set_conf ( struct doca_compress *  compress,
doca_compress_task_decompress_lz4_block_completion_cb_t  task_completion_cb,
doca_compress_task_decompress_lz4_block_completion_cb_t  task_error_cb,
uint32_t  num_tasks 
)

This method sets the decompress LZ4 block task configuration.

Parameters
[in]compressThe compress context to config
[in]task_completion_cbTask completion callback
[in]task_error_cbTask error callback
[in]num_tasksNumber of decompress LZ4 block tasks that the context can allocate
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_compress_task_decompress_lz4_block_set_dst()

DOCA_EXPERIMENTAL void doca_compress_task_decompress_lz4_block_set_dst ( struct doca_compress_task_decompress_lz4_block *  task,
struct doca_buf *  dst_buff 
)

set decompress LZ4 block task destination

Parameters
[in]taskTask to set the destination to
[in]dst_buffdestination buffer to set

◆ doca_compress_task_decompress_lz4_block_set_src()

DOCA_EXPERIMENTAL void doca_compress_task_decompress_lz4_block_set_src ( struct doca_compress_task_decompress_lz4_block *  task,
struct doca_buf const *  src_buff 
)

set decompress LZ4 block task source

Parameters
[in]taskTask to set the source to
[in]src_buffSource buffer to set

◆ doca_compress_task_decompress_lz4_stream_alloc_init()

DOCA_EXPERIMENTAL doca_error_t doca_compress_task_decompress_lz4_stream_alloc_init ( struct doca_compress *  compress,
uint8_t  has_block_checksum,
uint8_t  are_blocks_independent,
struct doca_buf const *  src_buff,
struct doca_buf *  dst_buff,
union doca_data  user_data,
struct doca_compress_task_decompress_lz4_stream **  task 
)

Allocate decompress LZ4 stream task.

This method allocates and initializes a decompress LZ4 stream task. Task parameters can be set later on by setters.

Parameters
[in]compressThe compress context to allocate the task from
[in]has_block_checksum1 if the task should expect blocks in the stream to have a checksum, 0 otherwise
[in]are_blocks_independent1 the the task should expect blocks to be independent, 0 otherwise (dependent blocks)
[in]src_buffSource buffer
[in]dst_buffDestination buffer
[in]user_datadoca_data that can be retrieved from the task (usually when the task is completed).
[out]taskThe allocated task
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NO_MEMORY - all decompress LZ4 stream tasks are already allocated.
  • DOCA_ERROR_INVALID_VALUE - can not initialize source HW resources.

◆ doca_compress_task_decompress_lz4_stream_as_task()

DOCA_EXPERIMENTAL struct doca_task* doca_compress_task_decompress_lz4_stream_as_task ( struct doca_compress_task_decompress_lz4_stream *  task)

convert decompress LZ4 stream task to doca_task

Parameters
[in]taskThe task to convert
Returns
doca_task

◆ doca_compress_task_decompress_lz4_stream_get_are_blocks_independent()

DOCA_EXPERIMENTAL uint8_t doca_compress_task_decompress_lz4_stream_get_are_blocks_independent ( const struct doca_compress_task_decompress_lz4_stream *  task)

get decompress LZ4 stream task are_blocks_independent flag

Parameters
[in]taskTask to get the are_blocks_independent flag from
Returns
1 if the task should expect blocks to be independent, 0 otherwise (dependent blocks)

◆ doca_compress_task_decompress_lz4_stream_get_crc_cs()

DOCA_EXPERIMENTAL uint32_t doca_compress_task_decompress_lz4_stream_get_crc_cs ( const struct doca_compress_task_decompress_lz4_stream *  task)

get decompress LZ4 stream task CRC checksum

Note
Valid only on successful completion of the task. Otherwise, undefined behavior.
Parameters
[in]taskTask to get the destination from
Returns
CRC checksum of the stream

◆ doca_compress_task_decompress_lz4_stream_get_dst()

DOCA_EXPERIMENTAL struct doca_buf* doca_compress_task_decompress_lz4_stream_get_dst ( const struct doca_compress_task_decompress_lz4_stream *  task)

get decompress LZ4 stream task destination

Parameters
[in]taskTask to get the destination from
Returns
destination buffer

◆ doca_compress_task_decompress_lz4_stream_get_has_block_checksum()

DOCA_EXPERIMENTAL uint8_t doca_compress_task_decompress_lz4_stream_get_has_block_checksum ( const struct doca_compress_task_decompress_lz4_stream *  task)

get decompress LZ4 stream task has_block_checksum flag

Parameters
[in]taskTask to get the has_block_checksum flag from
Returns
1 if the task should expect blocks in the stream to have a checksum, 0 otherwise

◆ doca_compress_task_decompress_lz4_stream_get_src()

DOCA_EXPERIMENTAL struct doca_buf const* doca_compress_task_decompress_lz4_stream_get_src ( const struct doca_compress_task_decompress_lz4_stream *  task)

get decompress LZ4 stream task source

Parameters
[in]taskTask to get the source from
Returns
source buffer

◆ doca_compress_task_decompress_lz4_stream_get_xxh_cs()

DOCA_EXPERIMENTAL uint32_t doca_compress_task_decompress_lz4_stream_get_xxh_cs ( const struct doca_compress_task_decompress_lz4_stream *  task)

get decompress LZ4 stream task xxHash-32 checksum

Note
Valid only on successful completion of the task. Otherwise, undefined behavior.
Parameters
[in]taskTask to get the checksums from
Returns
xxHash-32 checksum of the stream

◆ doca_compress_task_decompress_lz4_stream_set_are_blocks_independent()

DOCA_EXPERIMENTAL void doca_compress_task_decompress_lz4_stream_set_are_blocks_independent ( struct doca_compress_task_decompress_lz4_stream *  task,
uint8_t  are_blocks_independent 
)

set decompress LZ4 stream task are_blocks_independent flag

Parameters
[in]taskTask to set the source to
[in]are_blocks_independent1 the the task should expect blocks to be independent, 0 otherwise (dependent blocks)

◆ doca_compress_task_decompress_lz4_stream_set_conf()

DOCA_EXPERIMENTAL doca_error_t doca_compress_task_decompress_lz4_stream_set_conf ( struct doca_compress *  compress,
doca_compress_task_decompress_lz4_stream_completion_cb_t  task_completion_cb,
doca_compress_task_decompress_lz4_stream_completion_cb_t  task_error_cb,
uint32_t  num_tasks 
)

This method sets the decompress LZ4 stream task configuration.

Parameters
[in]compressThe compress context to config
[in]task_completion_cbTask completion callback
[in]task_error_cbTask error callback
[in]num_tasksNumber of decompress LZ4 stream tasks that the context can allocate
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_compress_task_decompress_lz4_stream_set_dst()

DOCA_EXPERIMENTAL void doca_compress_task_decompress_lz4_stream_set_dst ( struct doca_compress_task_decompress_lz4_stream *  task,
struct doca_buf *  dst_buff 
)

set decompress LZ4 stream task destination

Parameters
[in]taskTask to set the destination to
[in]dst_buffdestination buffer to set

◆ doca_compress_task_decompress_lz4_stream_set_has_block_checksum()

DOCA_EXPERIMENTAL void doca_compress_task_decompress_lz4_stream_set_has_block_checksum ( struct doca_compress_task_decompress_lz4_stream *  task,
uint8_t  has_block_checksum 
)

set decompress LZ4 stream task has_block_checksum flag

Parameters
[in]taskTask to set the source to
[in]has_block_checksum1 if the task should expect blocks in the stream to have a checksum, 0 otherwise

◆ doca_compress_task_decompress_lz4_stream_set_src()

DOCA_EXPERIMENTAL void doca_compress_task_decompress_lz4_stream_set_src ( struct doca_compress_task_decompress_lz4_stream *  task,
struct doca_buf const *  src_buff 
)

set decompress LZ4 stream task source

Parameters
[in]taskTask to set the source to
[in]src_buffSource buffer to set