NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
DOCA Erasure Coding Engine

Typedefs

typedef void(* doca_ec_task_galois_mul_completion_cb_t) (struct doca_ec_task_galois_mul *task, union doca_data task_user_data, union doca_data ctx_user_data)
 Function to execute on completion of a Galois multiplication task. More...
 
typedef void(* doca_ec_task_create_completion_cb_t) (struct doca_ec_task_create *task, union doca_data task_user_data, union doca_data ctx_user_data)
 Function to execute on completion of a create task. More...
 
typedef void(* doca_ec_task_update_completion_cb_t) (struct doca_ec_task_update *task, union doca_data task_user_data, union doca_data ctx_user_data)
 Function to execute on completion of an update task. More...
 
typedef void(* doca_ec_task_recover_completion_cb_t) (struct doca_ec_task_recover *task, union doca_data task_user_data, union doca_data ctx_user_data)
 Function to execute on completion of a recover task. More...
 

Enumerations

enum  doca_ec_matrix_type { DOCA_EC_MATRIX_TYPE_CAUCHY = 1 , DOCA_EC_MATRIX_TYPE_VANDERMONDE = 2 }
 Types of coding matrix used for erasure codes. More...
 

Functions

DOCA_EXPERIMENTAL doca_error_t doca_ec_cap_task_galois_mul_is_supported (const struct doca_devinfo *devinfo)
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_task_galois_mul_set_conf (struct doca_ec *ec, doca_ec_task_galois_mul_completion_cb_t successful_task_completion_cb, doca_ec_task_galois_mul_completion_cb_t error_task_completion_cb, uint32_t num_tasks)
 This method sets the Galois multiplication tasks configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_task_galois_mul_allocate_init (struct doca_ec *ec, const struct doca_ec_matrix *coding_matrix, const struct doca_buf *src_buf, struct doca_buf *dst_buf, union doca_data user_data, struct doca_ec_task_galois_mul **task)
 This method allocates and initializes a Galois multiplication task. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_ec_task_galois_mul_as_task (struct doca_ec_task_galois_mul *task)
 This method converts an EC Galois multiplication task to a doca_task. More...
 
DOCA_EXPERIMENTAL void doca_ec_task_galois_mul_set_coding_matrix (struct doca_ec_task_galois_mul *task, const struct doca_ec_matrix *coding_matrix)
 This method sets the coding_matrix of a Galois multiplication task. More...
 
DOCA_EXPERIMENTAL const struct doca_ec_matrix * doca_ec_task_galois_mul_get_coding_matrix (const struct doca_ec_task_galois_mul *task)
 This method gets the coding matrix of a Galois multiplication task. More...
 
DOCA_EXPERIMENTAL void doca_ec_task_galois_mul_set_src_buf (struct doca_ec_task_galois_mul *task, const struct doca_buf *src_buf)
 This method sets the source buffer of a Galois multiplication task. More...
 
DOCA_EXPERIMENTAL const struct doca_buf * doca_ec_task_galois_mul_get_src_buf (const struct doca_ec_task_galois_mul *task)
 This method gets the source buffer of a Galois multiplication task. More...
 
DOCA_EXPERIMENTAL void doca_ec_task_galois_mul_set_dst_buf (struct doca_ec_task_galois_mul *task, struct doca_buf *dst_buf)
 This method sets the destination buffer of a Galois multiplication task. More...
 
DOCA_EXPERIMENTAL struct doca_buf * doca_ec_task_galois_mul_get_dst_buf (const struct doca_ec_task_galois_mul *task)
 This method gets the destination buffer of a Galois multiplication task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_cap_task_create_is_supported (const struct doca_devinfo *devinfo)
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_task_create_set_conf (struct doca_ec *ec, doca_ec_task_create_completion_cb_t successful_task_completion_cb, doca_ec_task_create_completion_cb_t error_task_completion_cb, uint32_t num_tasks)
 This method sets the create tasks configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_task_create_allocate_init (struct doca_ec *ec, const struct doca_ec_matrix *coding_matrix, const struct doca_buf *original_data_blocks, struct doca_buf *rdnc_blocks, union doca_data user_data, struct doca_ec_task_create **task)
 This method allocates and initializes a create task. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_ec_task_create_as_task (struct doca_ec_task_create *task)
 This method converts an EC create task to a doca_task. More...
 
DOCA_EXPERIMENTAL void doca_ec_task_create_set_coding_matrix (struct doca_ec_task_create *task, const struct doca_ec_matrix *coding_matrix)
 This method sets the coding_matrix of a create task. More...
 
DOCA_EXPERIMENTAL const struct doca_ec_matrix * doca_ec_task_create_get_coding_matrix (const struct doca_ec_task_create *task)
 This method gets the coding matrix of a create task. More...
 
DOCA_EXPERIMENTAL void doca_ec_task_create_set_original_data_blocks (struct doca_ec_task_create *task, const struct doca_buf *original_data_blocks)
 This method sets the original_data_blocks buffer of a create task. More...
 
DOCA_EXPERIMENTAL const struct doca_buf * doca_ec_task_create_get_original_data_blocks (const struct doca_ec_task_create *task)
 This method gets the original_data_blocks buffer of a create task. The original_data_blocks buffer is a source buffer with data - A sequence containing all original data blocks - block_1, block_2 ,... More...
 
DOCA_EXPERIMENTAL void doca_ec_task_create_set_rdnc_blocks (struct doca_ec_task_create *task, struct doca_buf *rdnc_blocks)
 This method sets the rdnc_blocks buffer of a create task. More...
 
DOCA_EXPERIMENTAL struct doca_buf * doca_ec_task_create_get_rdnc_blocks (const struct doca_ec_task_create *task)
 This method gets the rdnc_blocks buffer of a create task. The rdnc_blocks buffer is a destination buffer for the redundancy blocks. On successful completion of this task, will hold a sequence containing all redundancy blocks - rdnc_block_1, rdnc_block_2 ,... More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_cap_task_update_is_supported (const struct doca_devinfo *devinfo)
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_task_update_set_conf (struct doca_ec *ec, doca_ec_task_update_completion_cb_t successful_task_completion_cb, doca_ec_task_update_completion_cb_t error_task_completion_cb, uint32_t num_tasks)
 This method sets the update tasks configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_task_update_allocate_init (struct doca_ec *ec, const struct doca_ec_matrix *update_matrix, const struct doca_buf *original_updated_and_rdnc_blocks, struct doca_buf *updated_rdnc_blocks, union doca_data user_data, struct doca_ec_task_update **task)
 This method allocates and initializes an update task. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_ec_task_update_as_task (struct doca_ec_task_update *task)
 This method converts an EC update task to a doca_task. More...
 
DOCA_EXPERIMENTAL void doca_ec_task_update_set_update_matrix (struct doca_ec_task_update *task, const struct doca_ec_matrix *update_matrix)
 This method sets the update_matrix of an update task. More...
 
DOCA_EXPERIMENTAL const struct doca_ec_matrix * doca_ec_task_update_get_update_matrix (const struct doca_ec_task_update *task)
 This method gets the update_matrix of an update task. More...
 
DOCA_EXPERIMENTAL void doca_ec_task_update_set_original_updated_and_rdnc_blocks (struct doca_ec_task_update *task, const struct doca_buf *original_updated_and_rdnc_blocks)
 This method sets the original_updated_and_rdnc_blocks buffer of an update task. More...
 
DOCA_EXPERIMENTAL const struct doca_buf * doca_ec_task_update_get_original_updated_and_rdnc_blocks (const struct doca_ec_task_update *task)
 This method gets the original_updated_and_rdnc_blocks buffer of an update task. The original_data_blocks buffer is a source buffer with data - A sequence containing the original data block and it's updated data block, for each block that was updated, followed by the old redundancy blocks - old_data_block_i, updated_data_block_i, old_data_block_j, updated_data_block_j ,... ,rdnc_block_1, rdnc_block_2 ,... More...
 
DOCA_EXPERIMENTAL void doca_ec_task_update_set_updated_rdnc_blocks (struct doca_ec_task_update *task, struct doca_buf *updated_rdnc_blocks)
 This method sets the updated_rdnc_blocks buffer of an update task. More...
 
DOCA_EXPERIMENTAL struct doca_buf * doca_ec_task_update_get_updated_rdnc_blocks (const struct doca_ec_task_update *task)
 This method gets the updated_rdnc_blocks buffer of an update task. The rdnc_blocks buffer is a destination buffer for the redundancy blocks. On successful completion of this task, will hold a sequence containing all redundancy blocks - rdnc_block_1, rdnc_block_2 ,... More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_cap_task_recover_is_supported (const struct doca_devinfo *devinfo)
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_task_recover_set_conf (struct doca_ec *ec, doca_ec_task_recover_completion_cb_t successful_task_completion_cb, doca_ec_task_recover_completion_cb_t error_task_completion_cb, uint32_t num_tasks)
 This method sets the recover tasks configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_task_recover_allocate_init (struct doca_ec *ec, const struct doca_ec_matrix *recover_matrix, const struct doca_buf *available_blocks, struct doca_buf *recovered_data_blocks, union doca_data user_data, struct doca_ec_task_recover **task)
 This method allocates and initializes a recover task. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_ec_task_recover_as_task (struct doca_ec_task_recover *task)
 This method converts an EC recover task to a doca_task. More...
 
DOCA_EXPERIMENTAL void doca_ec_task_recover_set_recover_matrix (struct doca_ec_task_recover *task, const struct doca_ec_matrix *recover_matrix)
 This method sets the recover_matrix of a recover task. More...
 
DOCA_EXPERIMENTAL const struct doca_ec_matrix * doca_ec_task_recover_get_recover_matrix (const struct doca_ec_task_recover *task)
 This method gets the recover_matrix of a recover task. More...
 
DOCA_EXPERIMENTAL void doca_ec_task_recover_set_available_blocks (struct doca_ec_task_recover *task, const struct doca_buf *available_blocks)
 This method sets the available_blocks buffer of a recover task. More...
 
DOCA_EXPERIMENTAL const struct doca_buf * doca_ec_task_recover_get_available_blocks (const struct doca_ec_task_recover *task)
 This method gets the available_blocks buffer of a recover task. The available_blocks buffer is a source buffer with data - A sequence containing all available data blocks and redundancy blocks - data_block_a, data_block_b, data_block_c ,... ,rdnc_block_x, rdnc_block_y ,... More...
 
DOCA_EXPERIMENTAL void doca_ec_task_recover_set_recovered_data_blocks (struct doca_ec_task_recover *task, struct doca_buf *recovered_data_blocks)
 This method sets the recovered_data_blocks buffer of a recover task. More...
 
DOCA_EXPERIMENTAL struct doca_buf * doca_ec_task_recover_get_recovered_data (const struct doca_ec_task_recover *task)
 This method gets the recovered_data buffer of a recover task. The recovered_data buffer is a destination buffer for the recovered data blocks. On successful completion of this task, will hold a sequence containing all the recovered data blocks - data_block_i, data_block_j ,... More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_create (struct doca_dev *dev, struct doca_ec **ec)
 Create a DOCA EC instance. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_destroy (struct doca_ec *ec)
 Destroy a DOCA EC instance. More...
 
DOCA_EXPERIMENTAL struct doca_ctx * doca_ec_as_ctx (struct doca_ec *ec)
 Convert EC instance into context. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_cap_get_max_block_size (const struct doca_devinfo *devinfo, uint64_t *max_block_size)
 Get maximum block size supported for DOCA EC tasks. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_cap_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 used for EC tasks. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_matrix_create (struct doca_ec *ec, enum doca_ec_matrix_type type, size_t data_block_count, size_t rdnc_block_count, struct doca_ec_matrix **matrix)
 Generate coding matrix for Erasure Code encode i.e. most basic encode matrix. This is necessary for executing create tasks. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_matrix_create_from_raw (struct doca_ec *ec, uint8_t *data, size_t data_block_count, size_t rdnc_block_count, struct doca_ec_matrix **matrix)
 Create coding matrix for Erasure Code encode i.e. most basic encode matrix from char array. This is substitute for doca_ec_matrix_create which converts a char array to an DOCA EC matrix that can be used to execute different EC tasks. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_matrix_create_update (struct doca_ec *ec, const struct doca_ec_matrix *coding_matrix, uint32_t update_indices[], size_t n_updates, struct doca_ec_matrix **matrix)
 Generate coding matrix for Erasure Code update. To use this function must call doca_ec_matrix_create() or doca_ec_matrix_create_from_raw() before. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_matrix_create_recover (struct doca_ec *ec, const struct doca_ec_matrix *coding_matrix, uint32_t missing_indices[], size_t n_missing, struct doca_ec_matrix **matrix)
 Generate coding matrix for Erasure Code recovery from failure. To use this function must call doca_ec_matrix_create() or doca_ec_matrix_create_from_raw() before. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ec_matrix_destroy (struct doca_ec_matrix *matrix)
 Destroy coding matrix. More...
 

Detailed Description

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

Typedef Documentation

◆ doca_ec_task_create_completion_cb_t

typedef void(* doca_ec_task_create_completion_cb_t) (struct doca_ec_task_create *task, union doca_data task_user_data, union doca_data ctx_user_data)

Function to execute on completion of a create task.

This function is called by doca_pe_progress() when a create task is successfully identified as completed. When this function is called the ownership of the task object passes from DOCA back to user. Inside this callback the user may decide on the task object:

Any failure/error inside this function should be handled internally or deferred; Since this function is nested in the execution of doca_pe_progress(), this callback doesn't return an error.

Note
This callback type is utilized for both successful & failed task completions.
Parameters
[in]taskThe completed create task.
Note
The implementation can assume this value is not NULL.
Parameters
[in]task_user_dataThe doca_data supplied to the task by the application (during task allocation or by a setter).
[in]ctx_user_dataThe doca_data supplied to the doca_ctx by the application (using a setter).

Definition at line 311 of file doca_erasure_coding.h.

◆ doca_ec_task_galois_mul_completion_cb_t

typedef void(* doca_ec_task_galois_mul_completion_cb_t) (struct doca_ec_task_galois_mul *task, union doca_data task_user_data, union doca_data ctx_user_data)

Function to execute on completion of a Galois multiplication task.

This function is called by doca_pe_progress() when a Galois multiplication task is successfully identified as completed. When this function is called the ownership of the task object passes from DOCA back to user. Inside this callback the user may decide on the task object:

Any failure/error inside this function should be handled internally or deferred; Since this function is nested in the execution of doca_pe_progress(), this callback doesn't return an error.

Note
This callback type is utilized for both successful & failed task completions.
Parameters
[in]taskThe completed Galois multiplication task.
Note
The implementation can assume this value is not NULL.
Parameters
[in]task_user_dataThe doca_data supplied to the task by the application (during task allocation or by a setter).
[in]ctx_user_dataThe doca_data supplied to the doca_ctx by the application (using a setter).

Definition at line 92 of file doca_erasure_coding.h.

◆ doca_ec_task_recover_completion_cb_t

typedef void(* doca_ec_task_recover_completion_cb_t) (struct doca_ec_task_recover *task, union doca_data task_user_data, union doca_data ctx_user_data)

Function to execute on completion of a recover task.

This function is called by doca_pe_progress() when a recover task is successfully identified as completed. When this function is called the ownership of the task object passes from DOCA back to user. Inside this callback the user may decide on the task object:

Any failure/error inside this function should be handled internally or deferred; Since this function is nested in the execution of doca_pe_progress(), this callback doesn't return an error.

Note
This callback type is utilized for both successful & failed task completions.
Parameters
[in]taskThe completed recover task.
Note
The implementation can assume this value is not NULL.
Parameters
[in]task_user_dataThe doca_data supplied to the task by the application (during task allocation or by a setter).
[in]ctx_user_dataThe doca_data supplied to the doca_ctx by the application (using a setter).

Definition at line 772 of file doca_erasure_coding.h.

◆ doca_ec_task_update_completion_cb_t

typedef void(* doca_ec_task_update_completion_cb_t) (struct doca_ec_task_update *task, union doca_data task_user_data, union doca_data ctx_user_data)

Function to execute on completion of an update task.

This function is called by doca_pe_progress() when an update task is successfully identified as completed. When this function is called the ownership of the task object passes from DOCA back to user. Inside this callback the user may decide on the task object:

Any failure/error inside this function should be handled internally or deferred; Since this function is nested in the execution of doca_pe_progress(), this callback doesn't return an error.

Note
This callback type is utilized for both successful & failed task completions.
Parameters
[in]taskThe completed update task.
Note
The implementation can assume this value is not NULL.
Parameters
[in]task_user_dataThe doca_data supplied to the task by the application (during task allocation or by a setter).
[in]ctx_user_dataThe doca_data supplied to the doca_ctx by the application (using a setter).

Definition at line 538 of file doca_erasure_coding.h.

Enumeration Type Documentation

◆ doca_ec_matrix_type

Types of coding matrix used for erasure codes.

Enumerator
DOCA_EC_MATRIX_TYPE_CAUCHY 

Cauchy matrix of coding.

Cauchy matrix guarantees any sub-matrix will be invertible. The matrix is constructed in the following form: a_i_j = 1/(x_i + y_j) where 0 <= i < number of data blocks, 0 <= j < number of redundancy blocks, x_i = i, y_j = j + number of data blocks

This is the recommended type to use.

DOCA_EC_MATRIX_TYPE_VANDERMONDE 

Vandermonde matrix of coding.

Vandermonde matrix does not guarantee every sub-matrix will be invertible. The matrix is constructed in the following form: a_i_j = (i + 1)^j where 0 <= i < number of data blocks, 0 <= j < number of redundancy blocks

Because this matrix does not guarantee invertible it is less recommended to use.

Definition at line 1067 of file doca_erasure_coding.h.

Function Documentation

◆ doca_ec_as_ctx()

DOCA_EXPERIMENTAL struct doca_ctx* doca_ec_as_ctx ( struct doca_ec *  ec)

Convert EC instance into context.

Parameters
[in]ecEC instance. This must remain valid until after the context is no longer required.
Returns
On success doca_ctx object, otherwise NULL.

◆ doca_ec_cap_get_max_block_size()

DOCA_EXPERIMENTAL doca_error_t doca_ec_cap_get_max_block_size ( const struct doca_devinfo *  devinfo,
uint64_t *  max_block_size 
)

Get maximum block size supported for DOCA EC tasks.

Parameters
[in]devinfoThe DOCA device information that should be queried.
[out]max_block_sizeThe max block size for DOCA EC operation in bytes.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - failed to query device capabilities or provided devinfo does not support EC.

◆ doca_ec_cap_get_max_buf_list_len()

DOCA_EXPERIMENTAL doca_error_t doca_ec_cap_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 used for EC tasks.

Parameters
[in]devinfoThe DOCA device information that should be queried.
[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 - received invalid input.

◆ doca_ec_cap_task_create_is_supported()

DOCA_EXPERIMENTAL doca_error_t doca_ec_cap_task_create_is_supported ( const struct doca_devinfo *  devinfo)

Check if a given device supports executing a create task.

Parameters
[in]devinfoThe DOCA device information that should be queried.
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 - provided devinfo does not support the task.

◆ doca_ec_cap_task_galois_mul_is_supported()

DOCA_EXPERIMENTAL doca_error_t doca_ec_cap_task_galois_mul_is_supported ( const struct doca_devinfo *  devinfo)

Check if a given device supports executing a Galois multiplication task.

Parameters
[in]devinfoThe DOCA device information that should be queried.
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 - provided devinfo does not support the task.

◆ doca_ec_cap_task_recover_is_supported()

DOCA_EXPERIMENTAL doca_error_t doca_ec_cap_task_recover_is_supported ( const struct doca_devinfo *  devinfo)

Check if a given device supports executing a recover task.

Parameters
[in]devinfoThe DOCA device information that should be queried.
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 - provided devinfo does not support the task.

◆ doca_ec_cap_task_update_is_supported()

DOCA_EXPERIMENTAL doca_error_t doca_ec_cap_task_update_is_supported ( const struct doca_devinfo *  devinfo)

Check if a given device supports executing an update task.

Parameters
[in]devinfoThe DOCA device information that should be queried.
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 - provided devinfo does not support the task.

◆ doca_ec_create()

DOCA_EXPERIMENTAL doca_error_t doca_ec_create ( struct doca_dev *  dev,
struct doca_ec **  ec 
)

Create a DOCA EC instance.

Parameters
[in]devThe device to attach to the EC instance.
[out]ecPointer to pointer to be set to point to the created doca_ec instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - ec argument is a NULL pointer.
  • DOCA_ERROR_NO_MEMORY - failed to allocate sufficient memory for doca_ec.

◆ doca_ec_destroy()

DOCA_EXPERIMENTAL doca_error_t doca_ec_destroy ( struct doca_ec *  ec)

Destroy a DOCA EC instance.

Parameters
[in]ecPointer to instance to be destroyed.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_BAD_STATE - EC context is not idle.

◆ doca_ec_matrix_create()

DOCA_EXPERIMENTAL doca_error_t doca_ec_matrix_create ( struct doca_ec *  ec,
enum doca_ec_matrix_type  type,
size_t  data_block_count,
size_t  rdnc_block_count,
struct doca_ec_matrix **  matrix 
)

Generate coding matrix for Erasure Code encode i.e. most basic encode matrix. This is necessary for executing create tasks.

Parameters
[in]ecEC instance.
[in]typeProvided in enum doca_ec_matrix_type, the type will be consistent in recovery/update process.
[in]data_block_countThe number of original data blocks.
[in]rdnc_block_countThe number of redundancy blocks.
[out]matrixThe coding matrix.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_ec_matrix_create_from_raw()

DOCA_EXPERIMENTAL doca_error_t doca_ec_matrix_create_from_raw ( struct doca_ec *  ec,
uint8_t *  data,
size_t  data_block_count,
size_t  rdnc_block_count,
struct doca_ec_matrix **  matrix 
)

Create coding matrix for Erasure Code encode i.e. most basic encode matrix from char array. This is substitute for doca_ec_matrix_create which converts a char array to an DOCA EC matrix that can be used to execute different EC tasks.

Parameters
[in]ecEC instance.
[in]dataThe data of a coding matrix with size data_block_count * rdnc_block_count.
[in]data_block_countThe number of original data blocks.
[in]rdnc_block_countThe number of redundancy blocks.
[out]matrixThe coding matrix.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_ec_matrix_create_recover()

DOCA_EXPERIMENTAL doca_error_t doca_ec_matrix_create_recover ( struct doca_ec *  ec,
const struct doca_ec_matrix *  coding_matrix,
uint32_t  missing_indices[],
size_t  n_missing,
struct doca_ec_matrix **  matrix 
)

Generate coding matrix for Erasure Code recovery from failure. To use this function must call doca_ec_matrix_create() or doca_ec_matrix_create_from_raw() before.

Parameters
[in]ecEC instance.
[in]coding_matrixA coding matrix as it was created by doca_ec_matrix_create() or doca_ec_matrix_create_from_raw().
[in]missing_indicesAn array specifying the indices of the missing data blocks.
Note
The indices need to be in ascending order.
The indices should match the order of the data blocks in the matrix creation function.
Parameters
[in]n_missingmissing_indices count.
[out]matrixThe recover coding matrix.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_ec_matrix_create_update()

DOCA_EXPERIMENTAL doca_error_t doca_ec_matrix_create_update ( struct doca_ec *  ec,
const struct doca_ec_matrix *  coding_matrix,
uint32_t  update_indices[],
size_t  n_updates,
struct doca_ec_matrix **  matrix 
)

Generate coding matrix for Erasure Code update. To use this function must call doca_ec_matrix_create() or doca_ec_matrix_create_from_raw() before.

Parameters
[in]ecEC instance.
[in]coding_matrixA coding matrix as it was created by doca_ec_matrix_create() or doca_ec_matrix_create_from_raw().
[in]update_indicesAn array specifying the indices of the updated data blocks.
Note
The indices need to be in ascending order.
The indices should match the order of the data blocks in the matrix creation function.
Parameters
[in]n_updatesupdate_indices count.
[out]matrixThe update coding matrix.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_ec_matrix_destroy()

DOCA_EXPERIMENTAL doca_error_t doca_ec_matrix_destroy ( struct doca_ec_matrix *  matrix)

Destroy coding matrix.

Parameters
[in]matrixA coding matrix as it was created by doca_ec_matrix_create() or doca_ec_matrix_create_from_raw().
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_ec_task_create_allocate_init()

DOCA_EXPERIMENTAL doca_error_t doca_ec_task_create_allocate_init ( struct doca_ec *  ec,
const struct doca_ec_matrix *  coding_matrix,
const struct doca_buf *  original_data_blocks,
struct doca_buf *  rdnc_blocks,
union doca_data  user_data,
struct doca_ec_task_create **  task 
)

This method allocates and initializes a create task.

Parameters
[in]ecThe EC instance to allocate the task for.
[in]coding_matrixA coding matrix as it was create by doca_ec_matrix_create() or doca_ec_matrix_create_from_raw().
[in]original_data_blocksA source buffer with data - A sequence containing all original data blocks - block_1, block_2 ,...
[in]rdnc_blocksA destination buffer for the redundancy blocks. On successful completion of this task, will hold a sequence containing all redundancy blocks - rdnc_block_1, rdnc_block_2 ,...
[in]user_datadoca_data to attach to the task.
[out]taskOn success, an allocated and initialized create task.
Note
The data length of original_data_blocks and the minimal available memory in rdnc_blocks should be in multiplication of block size. For example, for a given coding matrix that is 10x4 (10 original blocks, 4 redundancy blocks) - original_data_blocks data length should be: 10x64KB = 640KB. rdnc_blocks available memory should be at least: 4x64KB = 256KB.

They also should be aligned to 64B and with a minimum size of 64B. For example: 500B size should be padded to be 512B.

Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NO_MEMORY - no more tasks to allocate.

◆ doca_ec_task_create_as_task()

DOCA_EXPERIMENTAL struct doca_task* doca_ec_task_create_as_task ( struct doca_ec_task_create *  task)

This method converts an EC create task to a doca_task.

Parameters
[in]taskThe task that should be converted.
Returns
doca_task

◆ doca_ec_task_create_get_coding_matrix()

DOCA_EXPERIMENTAL const struct doca_ec_matrix* doca_ec_task_create_get_coding_matrix ( const struct doca_ec_task_create *  task)

This method gets the coding matrix of a create task.

Parameters
[in]taskThe task that should be queried.
Returns
The task's coding_matrix.

◆ doca_ec_task_create_get_original_data_blocks()

DOCA_EXPERIMENTAL const struct doca_buf* doca_ec_task_create_get_original_data_blocks ( const struct doca_ec_task_create *  task)

This method gets the original_data_blocks buffer of a create task. The original_data_blocks buffer is a source buffer with data - A sequence containing all original data blocks - block_1, block_2 ,...

Parameters
[in]taskThe task that should be queried.
Returns
The task's original_data_blocks buffer.

◆ doca_ec_task_create_get_rdnc_blocks()

DOCA_EXPERIMENTAL struct doca_buf* doca_ec_task_create_get_rdnc_blocks ( const struct doca_ec_task_create *  task)

This method gets the rdnc_blocks buffer of a create task. The rdnc_blocks buffer is a destination buffer for the redundancy blocks. On successful completion of this task, will hold a sequence containing all redundancy blocks - rdnc_block_1, rdnc_block_2 ,...

Parameters
[in]taskThe task that should be queried.
Returns
The task's rdnc_blocks buffer.

◆ doca_ec_task_create_set_coding_matrix()

DOCA_EXPERIMENTAL void doca_ec_task_create_set_coding_matrix ( struct doca_ec_task_create *  task,
const struct doca_ec_matrix *  coding_matrix 
)

This method sets the coding_matrix of a create task.

Parameters
[in]taskThe task to set.
[in]coding_matrixA coding matrix as it was create by doca_ec_matrix_create() or doca_ec_matrix_create_from_raw().

◆ doca_ec_task_create_set_conf()

DOCA_EXPERIMENTAL doca_error_t doca_ec_task_create_set_conf ( struct doca_ec *  ec,
doca_ec_task_create_completion_cb_t  successful_task_completion_cb,
doca_ec_task_create_completion_cb_t  error_task_completion_cb,
uint32_t  num_tasks 
)

This method sets the create tasks configuration.

Parameters
[in]ecThe EC instance to config.
[in]successful_task_completion_cbA callback function for create tasks that were completed successfully.
[in]error_task_completion_cbA callback function for create tasks that were completed with an error.
[in]num_tasksNumber of create tasks.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_ec_task_create_set_original_data_blocks()

DOCA_EXPERIMENTAL void doca_ec_task_create_set_original_data_blocks ( struct doca_ec_task_create *  task,
const struct doca_buf *  original_data_blocks 
)

This method sets the original_data_blocks buffer of a create task.

Parameters
[in]taskThe task to set.
[in]original_data_blocksA source buffer with data - A sequence containing all original data blocks - block_1, block_2 ,...
Note
The data length of original_data_blocks should be in multiplication of block size. For example, for a given coding matrix that is 10x4 (10 original blocks, 4 redundancy blocks) - original_data_blocks data length should be: 10x64KB = 640KB.

The data length should also be aligned to 64B and with a minimum size of 64B. For example: 500B size should be padded to be 512B.

◆ doca_ec_task_create_set_rdnc_blocks()

DOCA_EXPERIMENTAL void doca_ec_task_create_set_rdnc_blocks ( struct doca_ec_task_create *  task,
struct doca_buf *  rdnc_blocks 
)

This method sets the rdnc_blocks buffer of a create task.

Parameters
[in]taskThe task to set.
[in]rdnc_blocksA destination buffer for the redundancy blocks. On successful completion of this task, will hold a sequence containing all redundancy blocks - rdnc_block_1, rdnc_block_2 ,...
Note
The minimal available memory in rdnc_blocks should be in multiplication of block size. For example, for a given coding matrix that is 10x4 (10 original blocks, 4 redundancy blocks) - rdnc_blocks available memory should be at least: 4x64KB = 256KB.

The minimal available memory should also be aligned to 64B and at least 64B. For example: 500B size should be padded to be 512B at the least.

◆ doca_ec_task_galois_mul_allocate_init()

DOCA_EXPERIMENTAL doca_error_t doca_ec_task_galois_mul_allocate_init ( struct doca_ec *  ec,
const struct doca_ec_matrix *  coding_matrix,
const struct doca_buf *  src_buf,
struct doca_buf *  dst_buf,
union doca_data  user_data,
struct doca_ec_task_galois_mul **  task 
)

This method allocates and initializes a Galois multiplication task.

Parameters
[in]ecThe EC instance to allocate the task for.
[in]coding_matrixA coding matrix as it was create by doca_ec_matrix_create() or doca_ec_matrix_create_from_raw().
[in]src_bufA source buffer with data - A sequence containing data blocks - block_1, block_2 ,...
[in]dst_bufDestination data buffer. On successful completion of this task, will hold a sequence containing all multiplication outcome blocks - dst_block_1, dst_block_2 ,...
[in]user_datadoca_data to attach to the task.
[out]taskOn success, an allocated and initialized Galois multiplication task.
Note
The data length of src_buf and the minimal available memory in dst_buf should be in multiplication of block size. For example, for a given coding matrix that is 10x4 (10 original blocks, 4 redundancy blocks) - src_buf data length should be: 10x64KB = 640KB. dst_buf available memory should be at least: 4x64KB = 256KB.

They also should be aligned to 64B and with a minimum size of 64B. For example: 500B size should be padded to be 512B.

Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NO_MEMORY - no more tasks to allocate.

◆ doca_ec_task_galois_mul_as_task()

DOCA_EXPERIMENTAL struct doca_task* doca_ec_task_galois_mul_as_task ( struct doca_ec_task_galois_mul *  task)

This method converts an EC Galois multiplication task to a doca_task.

Parameters
[in]taskThe task that should be converted.
Returns
doca_task

◆ doca_ec_task_galois_mul_get_coding_matrix()

DOCA_EXPERIMENTAL const struct doca_ec_matrix* doca_ec_task_galois_mul_get_coding_matrix ( const struct doca_ec_task_galois_mul *  task)

This method gets the coding matrix of a Galois multiplication task.

Parameters
[in]taskThe task that should be queried.
Returns
The task's coding_matrix.

◆ doca_ec_task_galois_mul_get_dst_buf()

DOCA_EXPERIMENTAL struct doca_buf* doca_ec_task_galois_mul_get_dst_buf ( const struct doca_ec_task_galois_mul *  task)

This method gets the destination buffer of a Galois multiplication task.

Parameters
[in]taskThe task that should be queried.
Returns
The task's dst_buf.

◆ doca_ec_task_galois_mul_get_src_buf()

DOCA_EXPERIMENTAL const struct doca_buf* doca_ec_task_galois_mul_get_src_buf ( const struct doca_ec_task_galois_mul *  task)

This method gets the source buffer of a Galois multiplication task.

Parameters
[in]taskThe task that should be queried.
Returns
The task's src_buf.

◆ doca_ec_task_galois_mul_set_coding_matrix()

DOCA_EXPERIMENTAL void doca_ec_task_galois_mul_set_coding_matrix ( struct doca_ec_task_galois_mul *  task,
const struct doca_ec_matrix *  coding_matrix 
)

This method sets the coding_matrix of a Galois multiplication task.

Parameters
[in]taskThe task to set.
[in]coding_matrixA coding matrix as it was create by doca_ec_matrix_create() or doca_ec_matrix_create_from_raw().

◆ doca_ec_task_galois_mul_set_conf()

DOCA_EXPERIMENTAL doca_error_t doca_ec_task_galois_mul_set_conf ( struct doca_ec *  ec,
doca_ec_task_galois_mul_completion_cb_t  successful_task_completion_cb,
doca_ec_task_galois_mul_completion_cb_t  error_task_completion_cb,
uint32_t  num_tasks 
)

This method sets the Galois multiplication tasks configuration.

Parameters
[in]ecThe EC instance to config.
[in]successful_task_completion_cbA callback function for Galois multiplication tasks that were completed successfully.
[in]error_task_completion_cbA callback function for Galois multiplication tasks that were completed with an error.
[in]num_tasksNumber of Galois multiplication tasks.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_ec_task_galois_mul_set_dst_buf()

DOCA_EXPERIMENTAL void doca_ec_task_galois_mul_set_dst_buf ( struct doca_ec_task_galois_mul *  task,
struct doca_buf *  dst_buf 
)

This method sets the destination buffer of a Galois multiplication task.

Parameters
[in]taskThe task to set.
[in]dst_bufDestination data buffer. On successful completion of this task, will hold a sequence containing all multiplication outcome blocks - dst_block_1, dst_block_2 ,...
Note
The minimal available memory in dst_buf should be in multiplication of block * size. For example, for a given coding matrix that is 10x4 (10 original blocks, 4 redundancy blocks) - dst_buf available memory should be at least: 4x64KB = 256KB.

The minimal available memory should also be aligned to 64B and at least 64B. For example: 500B size should be padded to be 512B at the least.

◆ doca_ec_task_galois_mul_set_src_buf()

DOCA_EXPERIMENTAL void doca_ec_task_galois_mul_set_src_buf ( struct doca_ec_task_galois_mul *  task,
const struct doca_buf *  src_buf 
)

This method sets the source buffer of a Galois multiplication task.

Parameters
[in]taskThe task to set.
[in]src_bufA source buffer with data - A sequence containing all original data blocks - block_1, block_2 ,...
Note
The data length of src_buf should be in multiplication of block size. For example, for a given coding matrix that is 10x4 (10 original blocks, 4 redundancy blocks) - src_buf data length should be: 10x64KB = 640KB.

The data length should also be aligned to 64B and with a minimum size of 64B. For example: 500B size should be padded to be 512B.

◆ doca_ec_task_recover_allocate_init()

DOCA_EXPERIMENTAL doca_error_t doca_ec_task_recover_allocate_init ( struct doca_ec *  ec,
const struct doca_ec_matrix *  recover_matrix,
const struct doca_buf *  available_blocks,
struct doca_buf *  recovered_data_blocks,
union doca_data  user_data,
struct doca_ec_task_recover **  task 
)

This method allocates and initializes a recover task.

Parameters
[in]ecThe EC instance to allocate the task for.
[in]recover_matrixThe recover coding matrix as it was created by doca_ec_matrix_create_recover() or doca_ec_matrix_create_from_raw().
[in]available_blocksA source buffer with data - A sequence containing available data blocks and redundancy blocks - data_block_a, data_block_b, data_block_c ,... ,rdnc_block_x, rdnc_block_y ,... The total number of blocks given in this buffer should be equal to the original number data blocks.
[in]recovered_data_blocksA destination buffer for the recovered data blocks. On successful completion of this task, will hold a sequence containing all the recovered data blocks - data_block_i, data_block_j ,...
[in]user_datadoca_data to attach to the task.
[out]taskOn success, an allocated and initialized recover task.
Note
The data length of available_blocks and the minimal available memory in recovered_data_blocks should be in multiplication of block size. For example, for a given recover_matrix based on an original 10x4 coding matrix (10 original blocks, 4 redundancy blocks) - 10 available blocks should be given in total (for example 7 data blocks and 3 redundancy blocks) and available_blocks data length should be: 10x64KB = 640KB. recovered_data_blocks minimal available memory should be according to the amount of missing data blocks: in this example, 3x64KB = 192KB.

They also should be aligned to 64B and with a minimum size of 64B. For example: 500B size should be padded to be 512B.

Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NO_MEMORY - no more tasks to allocate.

◆ doca_ec_task_recover_as_task()

DOCA_EXPERIMENTAL struct doca_task* doca_ec_task_recover_as_task ( struct doca_ec_task_recover *  task)

This method converts an EC recover task to a doca_task.

Parameters
[in]taskThe task that should be converted.
Returns
doca_task

◆ doca_ec_task_recover_get_available_blocks()

DOCA_EXPERIMENTAL const struct doca_buf* doca_ec_task_recover_get_available_blocks ( const struct doca_ec_task_recover *  task)

This method gets the available_blocks buffer of a recover task. The available_blocks buffer is a source buffer with data - A sequence containing all available data blocks and redundancy blocks - data_block_a, data_block_b, data_block_c ,... ,rdnc_block_x, rdnc_block_y ,...

Parameters
[in]taskThe task that should be queried.
Returns
The task's available_blocks buffer.

◆ doca_ec_task_recover_get_recover_matrix()

DOCA_EXPERIMENTAL const struct doca_ec_matrix* doca_ec_task_recover_get_recover_matrix ( const struct doca_ec_task_recover *  task)

This method gets the recover_matrix of a recover task.

Parameters
[in]taskThe task that should be queried.
Returns
The task's recover_matrix.

◆ doca_ec_task_recover_get_recovered_data()

DOCA_EXPERIMENTAL struct doca_buf* doca_ec_task_recover_get_recovered_data ( const struct doca_ec_task_recover *  task)

This method gets the recovered_data buffer of a recover task. The recovered_data buffer is a destination buffer for the recovered data blocks. On successful completion of this task, will hold a sequence containing all the recovered data blocks - data_block_i, data_block_j ,...

Parameters
[in]taskThe task that should be queried.
Returns
The task's recovered_data buffer.

◆ doca_ec_task_recover_set_available_blocks()

DOCA_EXPERIMENTAL void doca_ec_task_recover_set_available_blocks ( struct doca_ec_task_recover *  task,
const struct doca_buf *  available_blocks 
)

This method sets the available_blocks buffer of a recover task.

Parameters
[in]taskThe task to set.
[in]available_blocksA source buffer with data - A sequence containing available data blocks and redundancy blocks - data_block_a, data_block_b, data_block_c ,... ,rdnc_block_x, rdnc_block_y ,... The total number of blocks given in this buffer should be equal to the original number data blocks.
Note
The data length of available_blocks should be in multiplication of block size. For example, for a given recover_matrix based on an original 10x4 coding matrix (10 original blocks, 4 redundancy blocks) - 10 available blocks should be given in total (i data blocks and j redundancy blocks) and available_blocks data length should be: 10x64KB = 640KB.

The data length should also be aligned to 64B and with a minimum size of 64B. For example: 500B size should be padded to be 512B.

◆ doca_ec_task_recover_set_conf()

DOCA_EXPERIMENTAL doca_error_t doca_ec_task_recover_set_conf ( struct doca_ec *  ec,
doca_ec_task_recover_completion_cb_t  successful_task_completion_cb,
doca_ec_task_recover_completion_cb_t  error_task_completion_cb,
uint32_t  num_tasks 
)

This method sets the recover tasks configuration.

Parameters
[in]ecThe EC instance to config.
[in]successful_task_completion_cbA callback function for recover tasks that were completed successfully.
[in]error_task_completion_cbA callback function for recover tasks that were completed with an error.
[in]num_tasksNumber of recover tasks.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_ec_task_recover_set_recover_matrix()

DOCA_EXPERIMENTAL void doca_ec_task_recover_set_recover_matrix ( struct doca_ec_task_recover *  task,
const struct doca_ec_matrix *  recover_matrix 
)

This method sets the recover_matrix of a recover task.

Parameters
[in]taskThe task to set.
[in]recover_matrixThe recover coding matrix as it was created by doca_ec_matrix_create_recover() or doca_ec_matrix_create_from_raw().

◆ doca_ec_task_recover_set_recovered_data_blocks()

DOCA_EXPERIMENTAL void doca_ec_task_recover_set_recovered_data_blocks ( struct doca_ec_task_recover *  task,
struct doca_buf *  recovered_data_blocks 
)

This method sets the recovered_data_blocks buffer of a recover task.

Parameters
[in]taskThe task to set.
[in]recovered_data_blocksA destination buffer for the recovered data blocks. On successful completion of this task, will hold a sequence containing all the recovered data blocks - data_block_i, data_block_j ,...
Note
The minimal available memory in recovered_data_blocks should be in multiplication of block size. For example, for a given recover_matrix based on an original 10x4 coding matrix (10 original blocks, 4 redundancy blocks), in which 3 data blocks need to be recovered - recovered_data_blocks minimal available memory should be according to the amount of missing data blocks: in this example, 3x64KB = 192KB.

The minimal available memory should also be aligned to 64B and at least 64B. For example: 500B size should be padded to be 512B at the least.

◆ doca_ec_task_update_allocate_init()

DOCA_EXPERIMENTAL doca_error_t doca_ec_task_update_allocate_init ( struct doca_ec *  ec,
const struct doca_ec_matrix *  update_matrix,
const struct doca_buf *  original_updated_and_rdnc_blocks,
struct doca_buf *  updated_rdnc_blocks,
union doca_data  user_data,
struct doca_ec_task_update **  task 
)

This method allocates and initializes an update task.

Parameters
[in]ecThe EC instance to allocate the task for.
[in]update_matrixThe update coding matrix as it was created by doca_ec_matrix_create_update() or doca_ec_matrix_create_from_raw().
[in]original_updated_and_rdnc_blocksA source buffer with data - A sequence containing the original data block and it's updated data block, for each block that was updated, followed by the old redundancy blocks - old_data_block_i, updated_data_block_i, old_data_block_j, updated_data_block_j ,... ,rdnc_block_1, rdnc_block_2 ,...
[in]updated_rdnc_blocksA destination buffer for the updated redundancy blocks. On successful completion of this task, will hold a sequence containing all updated redundancy blocks - rdnc_block_1, rdnc_block_2 ,...
[in]user_datadoca_data to attach to the task.
[out]taskOn success, an allocated and initialized update task.
Note
The data length of original_updated_and_rdnc_blocks and the minimal available memory in updated_rdnc_blocks should be in multiplication of block size. For example, for a given update_matrix that has 4 redundancy blocks, in which 3 data block were updated - original_updated_and_rdnc_blocks data length should be: (3+3+4=10)x64KB = 640KB. (3 original data blocks and their updated data block, and 4 redundancy blocks). updated_rdnc_blocks available memory should be at least: 4x64KB = 256KB.

They also should be aligned to 64B and with a minimum size of 64B. For example: 500B size should be padded to be 512B.

Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NO_MEMORY - no more tasks to allocate.

◆ doca_ec_task_update_as_task()

DOCA_EXPERIMENTAL struct doca_task* doca_ec_task_update_as_task ( struct doca_ec_task_update *  task)

This method converts an EC update task to a doca_task.

Parameters
[in]taskThe task that should be converted.
Returns
doca_task

◆ doca_ec_task_update_get_original_updated_and_rdnc_blocks()

DOCA_EXPERIMENTAL const struct doca_buf* doca_ec_task_update_get_original_updated_and_rdnc_blocks ( const struct doca_ec_task_update *  task)

This method gets the original_updated_and_rdnc_blocks buffer of an update task. The original_data_blocks buffer is a source buffer with data - A sequence containing the original data block and it's updated data block, for each block that was updated, followed by the old redundancy blocks - old_data_block_i, updated_data_block_i, old_data_block_j, updated_data_block_j ,... ,rdnc_block_1, rdnc_block_2 ,...

Parameters
[in]taskThe task that should be queried.
Returns
The task's original_updated_and_rdnc_blocks buffer.

◆ doca_ec_task_update_get_update_matrix()

DOCA_EXPERIMENTAL const struct doca_ec_matrix* doca_ec_task_update_get_update_matrix ( const struct doca_ec_task_update *  task)

This method gets the update_matrix of an update task.

Parameters
[in]taskThe task that should be queried.
Returns
The task's update_matrix.

◆ doca_ec_task_update_get_updated_rdnc_blocks()

DOCA_EXPERIMENTAL struct doca_buf* doca_ec_task_update_get_updated_rdnc_blocks ( const struct doca_ec_task_update *  task)

This method gets the updated_rdnc_blocks buffer of an update task. The rdnc_blocks buffer is a destination buffer for the redundancy blocks. On successful completion of this task, will hold a sequence containing all redundancy blocks - rdnc_block_1, rdnc_block_2 ,...

Parameters
[in]taskThe task that should be queried.
Returns
The task's updated_rdnc_blocks buffer.

◆ doca_ec_task_update_set_conf()

DOCA_EXPERIMENTAL doca_error_t doca_ec_task_update_set_conf ( struct doca_ec *  ec,
doca_ec_task_update_completion_cb_t  successful_task_completion_cb,
doca_ec_task_update_completion_cb_t  error_task_completion_cb,
uint32_t  num_tasks 
)

This method sets the update tasks configuration.

Parameters
[in]ecThe EC instance to config.
[in]successful_task_completion_cbA callback function for update tasks that were completed successfully.
[in]error_task_completion_cbA callback function for update tasks that were completed with an error.
[in]num_tasksNumber of update tasks.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_ec_task_update_set_original_updated_and_rdnc_blocks()

DOCA_EXPERIMENTAL void doca_ec_task_update_set_original_updated_and_rdnc_blocks ( struct doca_ec_task_update *  task,
const struct doca_buf *  original_updated_and_rdnc_blocks 
)

This method sets the original_updated_and_rdnc_blocks buffer of an update task.

Parameters
[in]taskThe task to set.
[in]original_updated_and_rdnc_blocksA source buffer with data - A sequence containing the original data block and it's updated data block, for each block that was updated, followed by the old redundancy blocks - old_data_block_i, updated_data_block_i, old_data_block_j, updated_data_block_j ,... ,rdnc_block_1, rdnc_block_2 ,...
Note
The data length of original_updated_and_rdnc_blocks should be in multiplication of block size. For example, for a given update_matrix that has 4 redundancy blocks, in which 3 data block were updated - original_updated_and_rdnc_blocks data length should be: (3+3+4=10)x64KB = 640KB. (3 original data blocks and their updated data block, and 4 redundancy blocks).

The data length should also be aligned to 64B and with a minimum size of 64B. For example: 500B size should be padded to be 512B.

◆ doca_ec_task_update_set_update_matrix()

DOCA_EXPERIMENTAL void doca_ec_task_update_set_update_matrix ( struct doca_ec_task_update *  task,
const struct doca_ec_matrix *  update_matrix 
)

This method sets the update_matrix of an update task.

Parameters
[in]taskThe task to set.
[in]update_matrixThe update coding matrix as it was created by doca_ec_matrix_create_update() or doca_ec_matrix_create_from_raw().

◆ doca_ec_task_update_set_updated_rdnc_blocks()

DOCA_EXPERIMENTAL void doca_ec_task_update_set_updated_rdnc_blocks ( struct doca_ec_task_update *  task,
struct doca_buf *  updated_rdnc_blocks 
)

This method sets the updated_rdnc_blocks buffer of an update task.

Parameters
[in]taskThe task to set.
[in]updated_rdnc_blocksA destination buffer for the updated redundancy blocks. On successful completion of this task, will hold a sequence containing all updated redundancy blocks - rdnc_block_1, rdnc_block_2 ,...
Note
The minimal available memory in updated_rdnc_blocks should be in multiplication of block size. For example, for a given update_matrix that has 4 redundancy blocks, in which 3 data block were updated - updated_rdnc_blocks available memory should be at least: 4x64KB = 256KB.

The minimal available memory should also be aligned to 64B and at least 64B. For example: 500B size should be padded to be 512B at the least.