Acceleration Framework. More...
Data Structures | |
struct | spdk_accel_crypto_key_create_param |
struct | spdk_accel_opts |
struct | spdk_accel_opcode_stats |
struct | spdk_accel_operation_exec_ctx |
Context for the spdk_accel_get_buf_align() function. More... | |
Macros | |
#define | SPDK_ACCEL_AES_XTS_128_KEY_SIZE 16 |
#define | SPDK_ACCEL_AES_XTS_256_KEY_SIZE 32 |
Typedefs | |
typedef void(* | spdk_accel_completion_cb) (void *cb_arg, int status) |
Acceleration operation callback. | |
typedef void(* | spdk_accel_fini_cb) (void *cb_arg) |
Acceleration framework finish callback. | |
typedef void(* | spdk_accel_step_cb) (void *cb_arg) |
Completion callback of a single operation within a sequence. | |
Functions | |
int | spdk_accel_initialize (void) |
Initialize the acceleration framework. | |
void | spdk_accel_finish (spdk_accel_fini_cb cb_fn, void *cb_arg) |
Close the acceleration framework. | |
struct spdk_io_channel * | spdk_accel_get_io_channel (void) |
Get an I/O channel for the acceleration framework. | |
int | spdk_accel_crypto_key_create (const struct spdk_accel_crypto_key_create_param *param) |
Create a crypto key with given parameters. | |
int | spdk_accel_crypto_key_destroy (struct spdk_accel_crypto_key *key) |
Destroy a crypto key. | |
struct spdk_accel_crypto_key * | spdk_accel_crypto_key_get (const char *name) |
Find a crypto key structure by name. | |
int | spdk_accel_submit_copy (struct spdk_io_channel *ch, void *dst, void *src, uint64_t nbytes, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a copy request. | |
int | spdk_accel_submit_dualcast (struct spdk_io_channel *ch, void *dst1, void *dst2, void *src, uint64_t nbytes, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a dual cast copy request. | |
int | spdk_accel_submit_compare (struct spdk_io_channel *ch, void *src1, void *src2, uint64_t nbytes, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a compare request. | |
int | spdk_accel_submit_fill (struct spdk_io_channel *ch, void *dst, uint8_t fill, uint64_t nbytes, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a fill request. | |
int | spdk_accel_submit_crc32c (struct spdk_io_channel *ch, uint32_t *crc_dst, void *src, uint32_t seed, uint64_t nbytes, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a CRC-32C calculation request. | |
int | spdk_accel_submit_crc32cv (struct spdk_io_channel *ch, uint32_t *crc_dst, struct iovec *iovs, uint32_t iovcnt, uint32_t seed, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a chained CRC-32C calculation request. | |
int | spdk_accel_submit_copy_crc32c (struct spdk_io_channel *ch, void *dst, void *src, uint32_t *crc_dst, uint32_t seed, uint64_t nbytes, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a copy with CRC-32C calculation request. | |
int | spdk_accel_submit_copy_crc32cv (struct spdk_io_channel *ch, void *dst, struct iovec *src_iovs, uint32_t iovcnt, uint32_t *crc_dst, uint32_t seed, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a chained copy + CRC-32C calculation request. | |
int | spdk_accel_submit_compress (struct spdk_io_channel *ch, void *dst, uint64_t nbytes, struct iovec *src_iovs, size_t src_iovcnt, uint32_t *output_size, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Build and submit a memory compress request. | |
int | spdk_accel_submit_decompress (struct spdk_io_channel *ch, struct iovec *dst_iovs, size_t dst_iovcnt, struct iovec *src_iovs, size_t src_iovcnt, uint32_t *output_size, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Build and submit a memory decompress request. | |
int | spdk_accel_submit_xor (struct spdk_io_channel *ch, void *dst, void **sources, uint32_t nsrcs, uint64_t nbytes, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit an xor request. | |
int | spdk_accel_submit_encrypt (struct spdk_io_channel *ch, struct spdk_accel_crypto_key *key, struct iovec *dst_iovs, uint32_t dst_iovcnt, struct iovec *src_iovs, uint32_t src_iovcnt, uint64_t iv, uint32_t block_size, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Build and submit a data encryption request. | |
int | spdk_accel_submit_decrypt (struct spdk_io_channel *ch, struct spdk_accel_crypto_key *key, struct iovec *dst_iovs, uint32_t dst_iovcnt, struct iovec *src_iovs, uint32_t src_iovcnt, uint64_t iv, uint32_t block_size, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Build and submit a data decryption request. | |
int | spdk_accel_submit_dif_verify (struct spdk_io_channel *ch, struct iovec *iovs, size_t iovcnt, uint32_t num_blocks, const struct spdk_dif_ctx *ctx, struct spdk_dif_error *err, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a Data Integrity Field (DIF) verify request. | |
int | spdk_accel_submit_dif_verify_copy (struct spdk_io_channel *ch, struct iovec *dst_iovs, size_t dst_iovcnt, struct iovec *src_iovs, size_t src_iovcnt, uint32_t num_blocks, const struct spdk_dif_ctx *ctx, struct spdk_dif_error *err, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a Data Integrity Field (DIF) copy and verify request. | |
int | spdk_accel_submit_dif_generate (struct spdk_io_channel *ch, struct iovec *iovs, size_t iovcnt, uint32_t num_blocks, const struct spdk_dif_ctx *ctx, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a Data Integrity Field (DIF) generate request. | |
int | spdk_accel_submit_dif_generate_copy (struct spdk_io_channel *ch, struct iovec *dst_iovs, size_t dst_iovcnt, struct iovec *src_iovs, size_t src_iovcnt, uint32_t num_blocks, const struct spdk_dif_ctx *ctx, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a Data Integrity Field (DIF) copy and generate request. | |
int | spdk_accel_submit_dix_generate (struct spdk_io_channel *ch, struct iovec *iovs, size_t iovcnt, struct iovec *md_iov, uint32_t num_blocks, const struct spdk_dif_ctx *ctx, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a Data Integrity Extension (DIX) generate operation. | |
int | spdk_accel_submit_dix_verify (struct spdk_io_channel *ch, struct iovec *iovs, size_t iovcnt, struct iovec *md_iov, uint32_t num_blocks, const struct spdk_dif_ctx *ctx, struct spdk_dif_error *err, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a Data Integrity Extension (DIX) verify request. | |
int | spdk_accel_append_copy (struct spdk_accel_sequence **seq, struct spdk_io_channel *ch, struct iovec *dst_iovs, uint32_t dst_iovcnt, struct spdk_memory_domain *dst_domain, void *dst_domain_ctx, struct iovec *src_iovs, uint32_t src_iovcnt, struct spdk_memory_domain *src_domain, void *src_domain_ctx, spdk_accel_step_cb cb_fn, void *cb_arg) |
Append a copy operation to a sequence. | |
int | spdk_accel_append_fill (struct spdk_accel_sequence **seq, struct spdk_io_channel *ch, void *buf, uint64_t len, struct spdk_memory_domain *domain, void *domain_ctx, uint8_t pattern, spdk_accel_step_cb cb_fn, void *cb_arg) |
Append a fill operation to a sequence. | |
int | spdk_accel_append_decompress (struct spdk_accel_sequence **seq, struct spdk_io_channel *ch, struct iovec *dst_iovs, size_t dst_iovcnt, struct spdk_memory_domain *dst_domain, void *dst_domain_ctx, struct iovec *src_iovs, size_t src_iovcnt, struct spdk_memory_domain *src_domain, void *src_domain_ctx, spdk_accel_step_cb cb_fn, void *cb_arg) |
Append a decompress operation to a sequence. | |
int | spdk_accel_append_encrypt (struct spdk_accel_sequence **seq, struct spdk_io_channel *ch, struct spdk_accel_crypto_key *key, struct iovec *dst_iovs, uint32_t dst_iovcnt, struct spdk_memory_domain *dst_domain, void *dst_domain_ctx, struct iovec *src_iovs, uint32_t src_iovcnt, struct spdk_memory_domain *src_domain, void *src_domain_ctx, uint64_t iv, uint32_t block_size, spdk_accel_step_cb cb_fn, void *cb_arg) |
Append an encrypt operation to a sequence. | |
int | spdk_accel_append_decrypt (struct spdk_accel_sequence **seq, struct spdk_io_channel *ch, struct spdk_accel_crypto_key *key, struct iovec *dst_iovs, uint32_t dst_iovcnt, struct spdk_memory_domain *dst_domain, void *dst_domain_ctx, struct iovec *src_iovs, uint32_t src_iovcnt, struct spdk_memory_domain *src_domain, void *src_domain_ctx, uint64_t iv, uint32_t block_size, spdk_accel_step_cb cb_fn, void *cb_arg) |
Append a decrypt operation to a sequence. | |
int | spdk_accel_append_crc32c (struct spdk_accel_sequence **seq, struct spdk_io_channel *ch, uint32_t *dst, struct iovec *iovs, uint32_t iovcnt, struct spdk_memory_domain *domain, void *domain_ctx, uint32_t seed, spdk_accel_step_cb cb_fn, void *cb_arg) |
Append a crc32c operation to a sequence. | |
int | spdk_accel_append_dif_verify (struct spdk_accel_sequence **seq, struct spdk_io_channel *ch, struct iovec *iovs, size_t iovcnt, struct spdk_memory_domain *domain, void *domain_ctx, uint32_t num_blocks, const struct spdk_dif_ctx *ctx, struct spdk_dif_error *err, spdk_accel_step_cb cb_fn, void *cb_arg) |
Append a Data Integrity Field (DIF) verify operation to a sequence. | |
int | spdk_accel_append_dif_verify_copy (struct spdk_accel_sequence **seq, struct spdk_io_channel *ch, struct iovec *dst_iovs, size_t dst_iovcnt, struct spdk_memory_domain *dst_domain, void *dst_domain_ctx, struct iovec *src_iovs, size_t src_iovcnt, struct spdk_memory_domain *src_domain, void *src_domain_ctx, uint32_t num_blocks, const struct spdk_dif_ctx *ctx, struct spdk_dif_error *err, spdk_accel_step_cb cb_fn, void *cb_arg) |
Append a Data Integrity Field (DIF) copy and verify operation to a sequence. | |
int | spdk_accel_append_dif_generate (struct spdk_accel_sequence **seq, struct spdk_io_channel *ch, struct iovec *iovs, size_t iovcnt, struct spdk_memory_domain *domain, void *domain_ctx, uint32_t num_blocks, const struct spdk_dif_ctx *ctx, spdk_accel_step_cb cb_fn, void *cb_arg) |
Append a Data Integrity Field (DIF) generate operation to a sequence. | |
int | spdk_accel_append_dif_generate_copy (struct spdk_accel_sequence **seq, struct spdk_io_channel *ch, struct iovec *dst_iovs, size_t dst_iovcnt, struct spdk_memory_domain *dst_domain, void *dst_domain_ctx, struct iovec *src_iovs, size_t src_iovcnt, struct spdk_memory_domain *src_domain, void *src_domain_ctx, uint32_t num_blocks, const struct spdk_dif_ctx *ctx, spdk_accel_step_cb cb_fn, void *cb_arg) |
Submit a Data Integrity Field (DIF) copy and generate request. | |
void | spdk_accel_sequence_finish (struct spdk_accel_sequence *seq, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Finish a sequence and execute all its operations. | |
void | spdk_accel_sequence_reverse (struct spdk_accel_sequence *seq) |
Reverse a sequence, so that the last operation becomes the first and vice versa. | |
void | spdk_accel_sequence_abort (struct spdk_accel_sequence *seq) |
Abort a sequence. | |
int | spdk_accel_get_buf (struct spdk_io_channel *ch, uint64_t len, void **buf, struct spdk_memory_domain **domain, void **domain_ctx) |
Allocate a buffer from accel domain. | |
void | spdk_accel_put_buf (struct spdk_io_channel *ch, void *buf, struct spdk_memory_domain *domain, void *domain_ctx) |
Release a buffer allocated via spdk_accel_get_buf() . | |
int | spdk_accel_get_opc_module_name (enum spdk_accel_opcode opcode, const char **module_name) |
Return the name of the module assigned to a specific opcode. | |
int | spdk_accel_assign_opc (enum spdk_accel_opcode opcode, const char *name) |
Override the assignment of an opcode to an module. | |
void | spdk_accel_write_config_json (struct spdk_json_write_ctx *w) |
Write Acceleration subsystem configuration into provided JSON context. | |
int | spdk_accel_set_driver (const char *name) |
Select platform driver to execute operation chains. | |
const char * | spdk_accel_get_driver_name (void) |
Get platform driver name. | |
struct spdk_memory_domain * | spdk_accel_get_memory_domain (void) |
Retrieves accel memory domain. | |
int | spdk_accel_set_opts (const struct spdk_accel_opts *opts) |
Set the options for the accel framework. | |
void | spdk_accel_get_opts (struct spdk_accel_opts *opts, size_t opts_size) |
Get the options for the accel framework. | |
void | spdk_accel_get_opcode_stats (struct spdk_io_channel *ch, enum spdk_accel_opcode opcode, struct spdk_accel_opcode_stats *stats, size_t size) |
Retrieve opcode statistics for a given IO channel. | |
uint8_t | spdk_accel_get_buf_align (enum spdk_accel_opcode opcode, const struct spdk_accel_operation_exec_ctx *ctx) |
Get minimum buffer alignment to execute a given operation. | |
int | spdk_accel_get_opc_memory_domains (enum spdk_accel_opcode opcode, struct spdk_memory_domain **domains, int array_size) |
Return memory domains used by specific opcode. | |
const char * | spdk_accel_get_opcode_name (enum spdk_accel_opcode opcode) |
Return the name of an operation based on the opcode. | |
Acceleration Framework.
typedef void(* spdk_accel_completion_cb) (void *cb_arg, int status) |
Acceleration operation callback.
cb_arg | Callback argument specified in the spdk_accel_submit* call. |
status | 0 if it completed successfully, or negative errno if it failed. |
typedef void(* spdk_accel_fini_cb) (void *cb_arg) |
Acceleration framework finish callback.
cb_arg | Callback argument. |
typedef void(* spdk_accel_step_cb) (void *cb_arg) |
Completion callback of a single operation within a sequence.
After it's executed, the sequence object might be freed, so users should not touch it.
int spdk_accel_append_copy | ( | struct spdk_accel_sequence ** | seq, |
struct spdk_io_channel * | ch, | ||
struct iovec * | dst_iovs, | ||
uint32_t | dst_iovcnt, | ||
struct spdk_memory_domain * | dst_domain, | ||
void * | dst_domain_ctx, | ||
struct iovec * | src_iovs, | ||
uint32_t | src_iovcnt, | ||
struct spdk_memory_domain * | src_domain, | ||
void * | src_domain_ctx, | ||
spdk_accel_step_cb | cb_fn, | ||
void * | cb_arg ) |
Append a copy operation to a sequence.
Copy operation in a sequence is special, as it is not guaranteed that the data will be actually copied. If it's possible, it will only change source / destination buffers of some of the operations in a sequence.
seq | Sequence object. If NULL, a new sequence object will be created. |
ch | I/O channel. |
dst_iovs | Destination I/O vector array. |
dst_iovcnt | Size of the dst_iovs array. |
dst_domain | Memory domain to which the destination buffers belong. |
dst_domain_ctx | Destination buffer domain context. |
src_iovs | Source I/O vector array. |
src_iovcnt | Size of the src_iovs array. |
src_domain | Memory domain to which the source buffers belong. |
src_domain_ctx | Source buffer domain context. |
cb_fn | Callback to be executed once this operation is completed. |
cb_arg | Argument to be passed to cb_fn . |
int spdk_accel_append_crc32c | ( | struct spdk_accel_sequence ** | seq, |
struct spdk_io_channel * | ch, | ||
uint32_t * | dst, | ||
struct iovec * | iovs, | ||
uint32_t | iovcnt, | ||
struct spdk_memory_domain * | domain, | ||
void * | domain_ctx, | ||
uint32_t | seed, | ||
spdk_accel_step_cb | cb_fn, | ||
void * | cb_arg ) |
Append a crc32c operation to a sequence.
seq | Sequence object. If NULL, a new sequence object will be created. |
ch | I/O channel. |
dst | Destination to write the calculated value. |
iovs | Source I/O vector array. |
iovcnt | Size of the iovs array. |
domain | Memory domain to which the source buffers belong. |
domain_ctx | Source buffer domain context. |
seed | Initial value. |
cb_fn | Callback to be executed once this operation is completed. |
cb_arg | Argument to be passed to cb_fn . |
int spdk_accel_append_decompress | ( | struct spdk_accel_sequence ** | seq, |
struct spdk_io_channel * | ch, | ||
struct iovec * | dst_iovs, | ||
size_t | dst_iovcnt, | ||
struct spdk_memory_domain * | dst_domain, | ||
void * | dst_domain_ctx, | ||
struct iovec * | src_iovs, | ||
size_t | src_iovcnt, | ||
struct spdk_memory_domain * | src_domain, | ||
void * | src_domain_ctx, | ||
spdk_accel_step_cb | cb_fn, | ||
void * | cb_arg ) |
Append a decompress operation to a sequence.
seq | Sequence object. If NULL, a new sequence object will be created. |
ch | I/O channel. |
dst_iovs | Destination I/O vector array. |
dst_iovcnt | Size of the dst_iovs array. |
dst_domain | Memory domain to which the destination buffers belong. |
dst_domain_ctx | Destination buffer domain context. |
src_iovs | Source I/O vector array. |
src_iovcnt | Size of the src_iovs array. |
src_domain | Memory domain to which the source buffers belong. |
src_domain_ctx | Source buffer domain context. |
cb_fn | Callback to be executed once this operation is completed. |
cb_arg | Argument to be passed to cb_fn . |
int spdk_accel_append_decrypt | ( | struct spdk_accel_sequence ** | seq, |
struct spdk_io_channel * | ch, | ||
struct spdk_accel_crypto_key * | key, | ||
struct iovec * | dst_iovs, | ||
uint32_t | dst_iovcnt, | ||
struct spdk_memory_domain * | dst_domain, | ||
void * | dst_domain_ctx, | ||
struct iovec * | src_iovs, | ||
uint32_t | src_iovcnt, | ||
struct spdk_memory_domain * | src_domain, | ||
void * | src_domain_ctx, | ||
uint64_t | iv, | ||
uint32_t | block_size, | ||
spdk_accel_step_cb | cb_fn, | ||
void * | cb_arg ) |
Append a decrypt operation to a sequence.
nbytes
must be multiple of block_size
. iv
is used to decrypt the first logical block of size block_size
. If src_iovs
describes more than one logical block then iv
will be incremented for each next logical block. Data Encryption Key identifier should be created before calling this function using methods specific to the accel module being used.
seq | Sequence object. If NULL, a new sequence object will be created. |
ch | I/O channel. |
key | Data Encryption Key identifier |
dst_iovs | Destination I/O vector array. |
dst_iovcnt | Size of the dst_iovs array. |
dst_domain | Memory domain to which the destination buffers belong. |
dst_domain_ctx | Destination buffer domain context. |
src_iovs | Source I/O vector array. |
src_iovcnt | Size of the src_iovs array. |
src_domain | Memory domain to which the source buffers belong. |
src_domain_ctx | Source buffer domain context. |
iv | Initialization vector (tweak) used for decryption. Should be the same as iv used for encryption of a data block. |
block_size | Logical block size, if src contains more than 1 logical block, subsequent logical blocks will be decrypted with incremented iv . |
cb_fn | Callback to be executed once this operation is completed. |
cb_arg | Argument to be passed to cb_fn . |
int spdk_accel_append_dif_generate | ( | struct spdk_accel_sequence ** | seq, |
struct spdk_io_channel * | ch, | ||
struct iovec * | iovs, | ||
size_t | iovcnt, | ||
struct spdk_memory_domain * | domain, | ||
void * | domain_ctx, | ||
uint32_t | num_blocks, | ||
const struct spdk_dif_ctx * | ctx, | ||
spdk_accel_step_cb | cb_fn, | ||
void * | cb_arg ) |
Append a Data Integrity Field (DIF) generate operation to a sequence.
This operation compute the DIF on the source data and inserting the DIF in place into the source data.
seq | Sequence object. If NULL, a new sequence object will be created. |
ch | I/O channel associated with this call. |
iovs | The io vector array. The total allocated memory size needs to be at least: num_blocks * block_size (including metadata) |
iovcnt | The size of the io vectors array. |
domain | Memory domain to which the data buffers belong. |
domain_ctx | Data buffer domain context. |
num_blocks | Number of data blocks. |
ctx | DIF context. Contains the DIF configuration values, including the reference Application Tag value and initial value of the Reference Tag to insert |
cb_fn | Called when this operation completes. |
cb_arg | Callback argument. |
int spdk_accel_append_dif_generate_copy | ( | struct spdk_accel_sequence ** | seq, |
struct spdk_io_channel * | ch, | ||
struct iovec * | dst_iovs, | ||
size_t | dst_iovcnt, | ||
struct spdk_memory_domain * | dst_domain, | ||
void * | dst_domain_ctx, | ||
struct iovec * | src_iovs, | ||
size_t | src_iovcnt, | ||
struct spdk_memory_domain * | src_domain, | ||
void * | src_domain_ctx, | ||
uint32_t | num_blocks, | ||
const struct spdk_dif_ctx * | ctx, | ||
spdk_accel_step_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a Data Integrity Field (DIF) copy and generate request.
This operation copies memory from the source to the destination address, while computing the DIF on the source data and inserting the DIF into the output data.
seq | Sequence object. If NULL, a new sequence object will be created. |
ch | I/O channel associated with this call. |
dst_iovs | The destination io vector array. The total allocated memory size needs to be at least: num_blocks * block_size (provided to spdk_dif_ctx_init()) |
dst_iovcnt | The size of the destination io vectors array. |
dst_domain | Memory domain to which the destination buffers belong. |
dst_domain_ctx | Destination buffer domain context. |
src_iovs | The source io vector array. The total allocated memory size needs to be at least: num_blocks * data_block_size. |
src_iovcnt | The size of the source io vectors array. |
src_domain | Memory domain to which the source buffers belong. |
src_domain_ctx | Source buffer domain context. |
num_blocks | Number of data blocks to process. |
ctx | DIF context. Contains the DIF configuration values, including the reference Application Tag value and initial value of the Reference Tag to insert |
cb_fn | Called when this operation completes. |
cb_arg | Callback argument. |
int spdk_accel_append_dif_verify | ( | struct spdk_accel_sequence ** | seq, |
struct spdk_io_channel * | ch, | ||
struct iovec * | iovs, | ||
size_t | iovcnt, | ||
struct spdk_memory_domain * | domain, | ||
void * | domain_ctx, | ||
uint32_t | num_blocks, | ||
const struct spdk_dif_ctx * | ctx, | ||
struct spdk_dif_error * | err, | ||
spdk_accel_step_cb | cb_fn, | ||
void * | cb_arg ) |
Append a Data Integrity Field (DIF) verify operation to a sequence.
This operation computes the DIF on the data and compares it against the DIF contained in the metadata.
seq | Sequence object. If NULL, a new sequence object will be created. |
ch | I/O channel. |
iovs | The io vector array. The total allocated memory size needs to be at least: num_blocks * block_size (including metadata) |
iovcnt | The size of the io vectors array. |
domain | Memory domain to which the data buffers belong. |
domain_ctx | Data buffer domain context. |
num_blocks | Number of data blocks to check. |
ctx | DIF context. Contains the DIF configuration values, including the reference Application Tag value and initial value of the Reference Tag to check Note: the user must ensure the validity of this pointer throughout the entire operation because it is not validated along the processing path. |
err | DIF error detailed information. Note: the user must ensure the validity of this pointer throughout the entire operation because it is not validated along the processing path. |
cb_fn | Callback to be executed once this operation is completed. |
cb_arg | Argument to be passed to cb_fn . |
int spdk_accel_append_dif_verify_copy | ( | struct spdk_accel_sequence ** | seq, |
struct spdk_io_channel * | ch, | ||
struct iovec * | dst_iovs, | ||
size_t | dst_iovcnt, | ||
struct spdk_memory_domain * | dst_domain, | ||
void * | dst_domain_ctx, | ||
struct iovec * | src_iovs, | ||
size_t | src_iovcnt, | ||
struct spdk_memory_domain * | src_domain, | ||
void * | src_domain_ctx, | ||
uint32_t | num_blocks, | ||
const struct spdk_dif_ctx * | ctx, | ||
struct spdk_dif_error * | err, | ||
spdk_accel_step_cb | cb_fn, | ||
void * | cb_arg ) |
Append a Data Integrity Field (DIF) copy and verify operation to a sequence.
This operation copies memory from the source to the destination address and removes the DIF data with its verification according to the flags provided in the context.
seq | Sequence object. If NULL, a new sequence object will be created. |
ch | I/O channel. |
dst_iovs | The destination I/O vector array. The total allocated memory size needs to be at least: num_blocks * block_size (provided to spdk_dif_ctx_init()) |
dst_iovcnt | The size of the destination I/O vectors array. |
dst_domain | Memory domain to which the destination buffers belong. |
dst_domain_ctx | Destination buffer domain context. |
src_iovs | The source I/O vector array. The total allocated memory size needs to be at least: num_blocks * data_block_size. |
src_iovcnt | The size of the source I/O vectors array. |
src_domain | Memory domain to which the source buffers belong. |
src_domain_ctx | Source buffer domain context. |
num_blocks | Number of data blocks to process. |
ctx | DIF context. Contains the DIF configuration values, including the reference Application Tag value and initial value of the Reference Tag to insert. |
err | DIF error detailed information. Note: the user must ensure the validity of this pointer throughout the entire operation because it is not validated along the processing path. |
cb_fn | Called when this operation completes. |
cb_arg | Callback argument. |
int spdk_accel_append_encrypt | ( | struct spdk_accel_sequence ** | seq, |
struct spdk_io_channel * | ch, | ||
struct spdk_accel_crypto_key * | key, | ||
struct iovec * | dst_iovs, | ||
uint32_t | dst_iovcnt, | ||
struct spdk_memory_domain * | dst_domain, | ||
void * | dst_domain_ctx, | ||
struct iovec * | src_iovs, | ||
uint32_t | src_iovcnt, | ||
struct spdk_memory_domain * | src_domain, | ||
void * | src_domain_ctx, | ||
uint64_t | iv, | ||
uint32_t | block_size, | ||
spdk_accel_step_cb | cb_fn, | ||
void * | cb_arg ) |
Append an encrypt operation to a sequence.
nbytes
must be multiple of block_size
. iv
is used to encrypt the first logical block of size block_size
. If src_iovs
describes more than one logical block then iv
will be incremented for each next logical block. Data Encryption Key identifier should be created before calling this function using methods specific to the accel module being used.
seq | Sequence object. If NULL, a new sequence object will be created. |
ch | I/O channel. |
key | Data Encryption Key identifier |
dst_iovs | Destination I/O vector array. |
dst_iovcnt | Size of the dst_iovs array. |
dst_domain | Memory domain to which the destination buffers belong. |
dst_domain_ctx | Destination buffer domain context. |
src_iovs | Source I/O vector array. |
src_iovcnt | Size of the src_iovs array. |
src_domain | Memory domain to which the source buffers belong. |
src_domain_ctx | Source buffer domain context. |
iv | Initialization vector (tweak) used for encryption |
block_size | Logical block size, if src contains more than 1 logical block, subsequent logical blocks will be encrypted with incremented iv . |
cb_fn | Callback to be executed once this operation is completed. |
cb_arg | Argument to be passed to cb_fn . |
int spdk_accel_append_fill | ( | struct spdk_accel_sequence ** | seq, |
struct spdk_io_channel * | ch, | ||
void * | buf, | ||
uint64_t | len, | ||
struct spdk_memory_domain * | domain, | ||
void * | domain_ctx, | ||
uint8_t | pattern, | ||
spdk_accel_step_cb | cb_fn, | ||
void * | cb_arg ) |
Append a fill operation to a sequence.
seq | Sequence object. If NULL, a new sequence object will be created. |
ch | I/O channel. |
buf | Data buffer. |
len | Length of the data buffer. |
domain | Memory domain to which the data buffer belongs. |
domain_ctx | Buffer domain context. |
pattern | Pattern to fill the buffer with. |
cb_fn | Callback to be executed once this operation is completed. |
cb_arg | Argument to be passed to cb_fn . |
int spdk_accel_assign_opc | ( | enum spdk_accel_opcode | opcode, |
const char * | name ) |
Override the assignment of an opcode to an module.
opcode | Accel Framework Opcode enum value. Valid codes can be retrieved using accel_get_opc_assignments or spdk_accel_get_opcode_name . |
name | Name of the module to assign. Valid module names may be retrieved with spdk_accel_get_opc_module_name |
int spdk_accel_crypto_key_create | ( | const struct spdk_accel_crypto_key_create_param * | param | ) |
Create a crypto key with given parameters.
Accel module copies content of param structure
param | Key parameters |
int spdk_accel_crypto_key_destroy | ( | struct spdk_accel_crypto_key * | key | ) |
Destroy a crypto key.
key | Key to destroy |
struct spdk_accel_crypto_key * spdk_accel_crypto_key_get | ( | const char * | name | ) |
Find a crypto key structure by name.
name | Key name |
void spdk_accel_finish | ( | spdk_accel_fini_cb | cb_fn, |
void * | cb_arg ) |
Close the acceleration framework.
cb_fn | Called when the close operation completes. |
cb_arg | Argument passed to the callback function. |
int spdk_accel_get_buf | ( | struct spdk_io_channel * | ch, |
uint64_t | len, | ||
void ** | buf, | ||
struct spdk_memory_domain ** | domain, | ||
void ** | domain_ctx ) |
Allocate a buffer from accel domain.
These buffers can be only used with operations appended to a sequence. The actual data buffer won't be allocated immediately, but only when it's necessary to execute a given operation. In some cases, this might even mean that a data buffer won't be allocated at all, if a sequence can be executed without it.
A buffer can only be a part of one sequence, but it can be used by multiple operations within that sequence.
ch | I/O channel. |
len | Length of the buffer to allocate. |
buf | Pointer to the allocated buffer. |
domain | Memory domain in which the buffer is allocated. |
domain_ctx | Memory domain context related to the allocated buffer. |
uint8_t spdk_accel_get_buf_align | ( | enum spdk_accel_opcode | opcode, |
const struct spdk_accel_operation_exec_ctx * | ctx ) |
Get minimum buffer alignment to execute a given operation.
It accounts for constraints of a module assigned to execute a given operation and the driver (if set). The alignment is returned as a power of 2. The value of 0 means that the buffers don't need to be aligned.
opcode | Opcode. |
ctx | Context in which the operation will be executed. |
const char * spdk_accel_get_driver_name | ( | void | ) |
Get platform driver name.
struct spdk_io_channel * spdk_accel_get_io_channel | ( | void | ) |
Get an I/O channel for the acceleration framework.
This I/O channel is used to submit requests.
struct spdk_memory_domain * spdk_accel_get_memory_domain | ( | void | ) |
Retrieves accel memory domain.
int spdk_accel_get_opc_memory_domains | ( | enum spdk_accel_opcode | opcode, |
struct spdk_memory_domain ** | domains, | ||
int | array_size ) |
Return memory domains used by specific opcode.
The returned memory domains depend on the accel module which is assigned to handle the opcode
opcode | Accel Framework Opcode enum value. |
domains | Pointer to an array of memory domains to be filled by this function. The user should allocate big enough array to keep all memory domains. |
array_size | size of domains array |
int spdk_accel_get_opc_module_name | ( | enum spdk_accel_opcode | opcode, |
const char ** | module_name ) |
Return the name of the module assigned to a specific opcode.
opcode | Accel Framework Opcode enum value. Valid codes can be retrieved using accel_get_opc_assignments or spdk_accel_get_opcode_name . |
module_name | Pointer to update with module name. |
const char * spdk_accel_get_opcode_name | ( | enum spdk_accel_opcode | opcode | ) |
Return the name of an operation based on the opcode.
opcode | Opcode. |
void spdk_accel_get_opcode_stats | ( | struct spdk_io_channel * | ch, |
enum spdk_accel_opcode | opcode, | ||
struct spdk_accel_opcode_stats * | stats, | ||
size_t | size ) |
Retrieve opcode statistics for a given IO channel.
ch | I/O channel. |
opcode | Operation to retrieve statistics. |
stats | Per-channel statistics. |
size | Size of the stats structure. |
void spdk_accel_get_opts | ( | struct spdk_accel_opts * | opts, |
size_t | opts_size ) |
Get the options for the accel framework.
opts | Output parameter for options. |
opts_size | sizeof(*opts) |
int spdk_accel_initialize | ( | void | ) |
Initialize the acceleration framework.
void spdk_accel_put_buf | ( | struct spdk_io_channel * | ch, |
void * | buf, | ||
struct spdk_memory_domain * | domain, | ||
void * | domain_ctx ) |
Release a buffer allocated via spdk_accel_get_buf()
.
ch | I/O channel. |
buf | Buffer allocated via spdk_accel_get_buf() . |
domain | Memory domain in which the buffer is allocated. |
domain_ctx | Memory domain context related to the allocated buffer. |
void spdk_accel_sequence_abort | ( | struct spdk_accel_sequence * | seq | ) |
Abort a sequence.
This will execute the completion callbacks of all operations that were added to the sequence and will then free the sequence object. This function can only be used before a sequence is executed, i.e. before calling spdk_accel_sequence_finish()
.
seq | Sequence to abort. |
void spdk_accel_sequence_finish | ( | struct spdk_accel_sequence * | seq, |
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Finish a sequence and execute all its operations.
After the completion callback is executed, the sequence object is automatically freed.
seq | Sequence to finish. |
cb_fn | Completion callback to be executed once all operations are executed. |
cb_arg | Argument to be passed to cb_fn . |
void spdk_accel_sequence_reverse | ( | struct spdk_accel_sequence * | seq | ) |
Reverse a sequence, so that the last operation becomes the first and vice versa.
seq | Sequence to reverse. |
int spdk_accel_set_driver | ( | const char * | name | ) |
Select platform driver to execute operation chains.
name | Name of the driver. |
int spdk_accel_set_opts | ( | const struct spdk_accel_opts * | opts | ) |
Set the options for the accel framework.
opts | Accel options. |
int spdk_accel_submit_compare | ( | struct spdk_io_channel * | ch, |
void * | src1, | ||
void * | src2, | ||
uint64_t | nbytes, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a compare request.
ch | I/O channel associated with this call. |
src1 | First location to perform compare on. |
src2 | Second location to perform compare on. |
nbytes | Length in bytes to compare. |
cb_fn | Called when this compare operation completes. |
cb_arg | Callback argument. |
int spdk_accel_submit_compress | ( | struct spdk_io_channel * | ch, |
void * | dst, | ||
uint64_t | nbytes, | ||
struct iovec * | src_iovs, | ||
size_t | src_iovcnt, | ||
uint32_t * | output_size, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Build and submit a memory compress request.
This function will build the compress descriptor and submit it.
ch | I/O channel associated with this call |
dst | Destination to write the data to. |
nbytes | Length in bytes. |
src_iovs | The io vector array which stores the src data and len. |
src_iovcnt | The size of the src io vectors. |
output_size | The size of the compressed data (may be NULL if not desired) |
cb_fn | Callback function which will be called when the request is complete. |
cb_arg | Opaque value which will be passed back as the arg parameter in the completion callback. |
int spdk_accel_submit_copy | ( | struct spdk_io_channel * | ch, |
void * | dst, | ||
void * | src, | ||
uint64_t | nbytes, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a copy request.
ch | I/O channel associated with this call. |
dst | Destination to copy to. |
src | Source to copy from. |
nbytes | Length in bytes to copy. |
cb_fn | Called when this copy operation completes. |
cb_arg | Callback argument. |
int spdk_accel_submit_copy_crc32c | ( | struct spdk_io_channel * | ch, |
void * | dst, | ||
void * | src, | ||
uint32_t * | crc_dst, | ||
uint32_t | seed, | ||
uint64_t | nbytes, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a copy with CRC-32C calculation request.
This operation will copy data and calculate the 4 byte CRC32-C for the given data.
ch | I/O channel associated with this call. |
dst | Destination to write the data to. |
src | The source address for the data. |
crc_dst | Destination to write the CRC-32C to. |
seed | Four byte seed value. |
nbytes | Length in bytes. |
cb_fn | Called when this CRC-32C operation completes. |
cb_arg | Callback argument. |
int spdk_accel_submit_copy_crc32cv | ( | struct spdk_io_channel * | ch, |
void * | dst, | ||
struct iovec * | src_iovs, | ||
uint32_t | iovcnt, | ||
uint32_t * | crc_dst, | ||
uint32_t | seed, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a chained copy + CRC-32C calculation request.
This operation will calculate the 4 byte CRC32-C for the given data.
ch | I/O channel associated with this call. |
dst | Destination to write the data to. |
src_iovs | The io vector array which stores the src data and len. |
iovcnt | The size of the io vectors. |
crc_dst | Destination to write the CRC-32C to. |
seed | Four byte seed value. |
cb_fn | Called when this CRC-32C operation completes. |
cb_arg | Callback argument. |
int spdk_accel_submit_crc32c | ( | struct spdk_io_channel * | ch, |
uint32_t * | crc_dst, | ||
void * | src, | ||
uint32_t | seed, | ||
uint64_t | nbytes, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a CRC-32C calculation request.
This operation will calculate the 4 byte CRC32-C for the given data.
ch | I/O channel associated with this call. |
crc_dst | Destination to write the CRC-32C to. |
src | The source address for the data. |
seed | Four byte seed value. |
nbytes | Length in bytes. |
cb_fn | Called when this CRC-32C operation completes. |
cb_arg | Callback argument. |
int spdk_accel_submit_crc32cv | ( | struct spdk_io_channel * | ch, |
uint32_t * | crc_dst, | ||
struct iovec * | iovs, | ||
uint32_t | iovcnt, | ||
uint32_t | seed, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a chained CRC-32C calculation request.
This operation will calculate the 4 byte CRC32-C for the given data.
ch | I/O channel associated with this call. |
crc_dst | Destination to write the CRC-32C to. |
iovs | The io vector array which stores the src data and len. |
iovcnt | The size of the iov. |
seed | Four byte seed value. |
cb_fn | Called when this CRC-32C operation completes. |
cb_arg | Callback argument. |
int spdk_accel_submit_decompress | ( | struct spdk_io_channel * | ch, |
struct iovec * | dst_iovs, | ||
size_t | dst_iovcnt, | ||
struct iovec * | src_iovs, | ||
size_t | src_iovcnt, | ||
uint32_t * | output_size, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Build and submit a memory decompress request.
This function will build the decompress descriptor and submit it.
ch | I/O channel associated with this call |
dst_iovs | The io vector array which stores the dst data and len. |
dst_iovcnt | The size of the dst io vectors. |
src_iovs | The io vector array which stores the src data and len. |
src_iovcnt | The size of the src io vectors. |
output_size | The size of the compressed data (may be NULL if not desired) |
cb_fn | Callback function which will be called when the request is complete. |
cb_arg | Opaque value which will be passed back as the arg parameter in the completion callback. |
int spdk_accel_submit_decrypt | ( | struct spdk_io_channel * | ch, |
struct spdk_accel_crypto_key * | key, | ||
struct iovec * | dst_iovs, | ||
uint32_t | dst_iovcnt, | ||
struct iovec * | src_iovs, | ||
uint32_t | src_iovcnt, | ||
uint64_t | iv, | ||
uint32_t | block_size, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Build and submit a data decryption request.
This function will build the decryption request and submit it. nbytes must be multiple of block_size. iv is used to decrypt the first logical block of size block_size. If src_iovs describes more than one logical block then iv will be incremented for each next logical block. Data Encryption Key identifier should be created before calling this function using methods specific to the accel module being used.
ch | I/O channel associated with this call |
key | Data Encryption Key identifier |
dst_iovs | The io vector array which stores the dst data and len. |
dst_iovcnt | The size of the destination io vectors. |
src_iovs | The io vector array which stores the src data and len. |
src_iovcnt | The size of the source io vectors. |
iv | Initialization vector (tweak) used for decryption. Should be the same as iv used for encryption of a data block |
block_size | Logical block size, if src contains more than 1 logical block, subsequent logical blocks will be decrypted with incremented iv |
cb_fn | Callback function which will be called when the request is complete. |
cb_arg | Opaque value which will be passed back as the arg parameter in the completion callback. |
int spdk_accel_submit_dif_generate | ( | struct spdk_io_channel * | ch, |
struct iovec * | iovs, | ||
size_t | iovcnt, | ||
uint32_t | num_blocks, | ||
const struct spdk_dif_ctx * | ctx, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a Data Integrity Field (DIF) generate request.
This operation compute the DIF on the source data and inserting the DIF in place into the source data.
ch | I/O channel associated with this call. |
iovs | The io vector array. The total allocated memory size needs to be at least: num_blocks * block_size (including metadata) |
iovcnt | The size of the io vectors array. |
num_blocks | Number of data blocks. |
ctx | DIF context. Contains the DIF configuration values, including the reference Application Tag value and initial value of the Reference Tag to insert |
cb_fn | Called when this operation completes. |
cb_arg | Callback argument. |
int spdk_accel_submit_dif_generate_copy | ( | struct spdk_io_channel * | ch, |
struct iovec * | dst_iovs, | ||
size_t | dst_iovcnt, | ||
struct iovec * | src_iovs, | ||
size_t | src_iovcnt, | ||
uint32_t | num_blocks, | ||
const struct spdk_dif_ctx * | ctx, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a Data Integrity Field (DIF) copy and generate request.
This operation copies memory from the source to the destination address, while computing the DIF on the source data and inserting the DIF into the output data.
ch | I/O channel associated with this call. |
dst_iovs | The destination io vector array. The total allocated memory size needs to be at least: num_blocks * block_size (provided to spdk_dif_ctx_init()) |
dst_iovcnt | The size of the destination io vectors array. |
src_iovs | The source io vector array. The total allocated memory size needs to be at least: num_blocks * data_block_size. |
src_iovcnt | The size of the source io vectors array. |
num_blocks | Number of data blocks to process. |
ctx | DIF context. Contains the DIF configuration values, including the reference Application Tag value and initial value of the Reference Tag to insert |
cb_fn | Called when this operation completes. |
cb_arg | Callback argument. |
int spdk_accel_submit_dif_verify | ( | struct spdk_io_channel * | ch, |
struct iovec * | iovs, | ||
size_t | iovcnt, | ||
uint32_t | num_blocks, | ||
const struct spdk_dif_ctx * | ctx, | ||
struct spdk_dif_error * | err, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a Data Integrity Field (DIF) verify request.
This operation computes the DIF on the data and compares it against the DIF contained in the metadata.
ch | I/O channel associated with this call. |
iovs | The io vector array. The total allocated memory size needs to be at least: num_blocks * block_size (including metadata) |
iovcnt | The size of the io vectors array. |
num_blocks | Number of data blocks to check. |
ctx | DIF context. Contains the DIF configuration values, including the reference Application Tag value and initial value of the Reference Tag to check Note: the user must ensure the validity of this pointer throughout the entire operation because it is not validated along the processing path. |
err | DIF error detailed information. Note: the user must ensure the validity of this pointer throughout the entire operation because it is not validated along the processing path. |
cb_fn | Called when this operation completes. |
cb_arg | Callback argument. |
int spdk_accel_submit_dif_verify_copy | ( | struct spdk_io_channel * | ch, |
struct iovec * | dst_iovs, | ||
size_t | dst_iovcnt, | ||
struct iovec * | src_iovs, | ||
size_t | src_iovcnt, | ||
uint32_t | num_blocks, | ||
const struct spdk_dif_ctx * | ctx, | ||
struct spdk_dif_error * | err, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a Data Integrity Field (DIF) copy and verify request.
This operation copies memory from the source to the destination address and removes the DIF data with its verification according to the flags provided in the context.
ch | I/O channel associated with this call. |
dst_iovs | The destination I/O vector array. The total allocated memory size needs to be at least: num_blocks * block_size (provided to spdk_dif_ctx_init()) |
dst_iovcnt | The size of the destination I/O vectors array. |
src_iovs | The source I/O vector array. The total allocated memory size needs to be at least: num_blocks * data_block_size. |
src_iovcnt | The size of the source I/O vectors array. |
num_blocks | Number of data blocks to process. |
ctx | DIF context. Contains the DIF configuration values, including the reference Application Tag value and initial value of the Reference Tag to insert. |
err | DIF error detailed information. Note: the user must ensure the validity of this pointer throughout the entire operation because it is not validated along the processing path. |
cb_fn | Called when this operation completes. |
cb_arg | Callback argument. |
int spdk_accel_submit_dix_generate | ( | struct spdk_io_channel * | ch, |
struct iovec * | iovs, | ||
size_t | iovcnt, | ||
struct iovec * | md_iov, | ||
uint32_t | num_blocks, | ||
const struct spdk_dif_ctx * | ctx, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a Data Integrity Extension (DIX) generate operation.
This operation computes Protection Information (DIX) and inserts it into metadata buffer.
ch | I/O channel associated with this call. |
iovs | The source io vector array. The total allocated memory size needs to be at least: num_blocks * block_size_no_md |
iovcnt | The size of the source io vectors array. |
md_iov | The metadata vector array. The total allocated memory size needs to be at least: num_blocks * md_size (8B or 16B, depending on the PI format) |
num_blocks | Number of data blocks to process. |
ctx | DIX context. Contains the DIX configuration values, including the reference Application Tag value and initial value of the Reference Tag to insert |
cb_fn | Called when this operation completes. |
cb_arg | Callback argument. |
int spdk_accel_submit_dix_verify | ( | struct spdk_io_channel * | ch, |
struct iovec * | iovs, | ||
size_t | iovcnt, | ||
struct iovec * | md_iov, | ||
uint32_t | num_blocks, | ||
const struct spdk_dif_ctx * | ctx, | ||
struct spdk_dif_error * | err, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a Data Integrity Extension (DIX) verify request.
This operation computes the Protection Information (DIX) on the data and compares it against the DIX contained in the metadata.
ch | I/O channel associated with this call. |
iovs | The io vector array. The total allocated memory size needs to be at least: num_blocks * block_size |
iovcnt | The size of the io vectors array. |
md_iov | The metadata vector array. The total allocated memory size needs to be at least: num_blocks * md_size (8B or 16B, depending on the PI format) |
num_blocks | Number of data blocks to check. |
ctx | DIX context. Contains the DIF configuration values, including the reference Application Tag value and initial value of the Reference Tag to check Note: the user must ensure the validity of this pointer throughout the entire operation because it is not validated along the processing path. |
err | DIX error detailed information. Note: the user must ensure the validity of this pointer throughout the entire operation because it is not validated along the processing path. |
cb_fn | Called when this operation completes. |
cb_arg | Callback argument. |
int spdk_accel_submit_dualcast | ( | struct spdk_io_channel * | ch, |
void * | dst1, | ||
void * | dst2, | ||
void * | src, | ||
uint64_t | nbytes, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a dual cast copy request.
ch | I/O channel associated with this call. |
dst1 | First destination to copy to (must be 4K aligned). |
dst2 | Second destination to copy to (must be 4K aligned). |
src | Source to copy from. |
nbytes | Length in bytes to copy. |
cb_fn | Called when this copy operation completes. |
cb_arg | Callback argument. |
int spdk_accel_submit_encrypt | ( | struct spdk_io_channel * | ch, |
struct spdk_accel_crypto_key * | key, | ||
struct iovec * | dst_iovs, | ||
uint32_t | dst_iovcnt, | ||
struct iovec * | src_iovs, | ||
uint32_t | src_iovcnt, | ||
uint64_t | iv, | ||
uint32_t | block_size, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Build and submit a data encryption request.
This function will build the encryption request and submit it. nbytes must be multiple of block_size. iv is used to encrypt the first logical block of size block_size. If src_iovs describes more than one logical block then iv will be incremented for each next logical block. Data Encryption Key identifier should be created before calling this function using methods specific to the accel module being used.
ch | I/O channel associated with this call |
key | Data Encryption Key identifier |
dst_iovs | The io vector array which stores the dst data and len. |
dst_iovcnt | The size of the destination io vectors. |
src_iovs | The io vector array which stores the src data and len. |
src_iovcnt | The size of the source io vectors. |
iv | Initialization vector (tweak) used for encryption |
block_size | Logical block size, if src contains more than 1 logical block, subsequent logical blocks will be encrypted with incremented iv |
cb_fn | Callback function which will be called when the request is complete. |
cb_arg | Opaque value which will be passed back as the arg parameter in the completion callback. |
int spdk_accel_submit_fill | ( | struct spdk_io_channel * | ch, |
void * | dst, | ||
uint8_t | fill, | ||
uint64_t | nbytes, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit a fill request.
This operation will fill the destination buffer with the specified value.
ch | I/O channel associated with this call. |
dst | Destination to fill. |
fill | Constant byte to fill to the destination. |
nbytes | Length in bytes to fill. |
cb_fn | Called when this fill operation completes. |
cb_arg | Callback argument. |
int spdk_accel_submit_xor | ( | struct spdk_io_channel * | ch, |
void * | dst, | ||
void ** | sources, | ||
uint32_t | nsrcs, | ||
uint64_t | nbytes, | ||
spdk_accel_completion_cb | cb_fn, | ||
void * | cb_arg ) |
Submit an xor request.
ch | I/O channel associated with this call. |
dst | Destination to write the data to. |
sources | Array of source buffers. |
nsrcs | Number of source buffers in the array. |
nbytes | Length in bytes. |
cb_fn | Called when this copy operation completes. |
cb_arg | Callback argument. |
void spdk_accel_write_config_json | ( | struct spdk_json_write_ctx * | w | ) |
Write Acceleration subsystem configuration into provided JSON context.
w | JSON write context |