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. More... | |
typedef void(* | spdk_accel_fini_cb) (void *cb_arg) |
Acceleration framework finish callback. More... | |
typedef void(* | spdk_accel_step_cb) (void *cb_arg) |
Completion callback of a single operation within a sequence. More... | |
Functions | |
int | spdk_accel_initialize (void) |
Initialize the acceleration framework. More... | |
void | spdk_accel_finish (spdk_accel_fini_cb cb_fn, void *cb_arg) |
Close the acceleration framework. More... | |
struct spdk_io_channel * | spdk_accel_get_io_channel (void) |
Get an I/O channel for the acceleration framework. More... | |
int | spdk_accel_crypto_key_create (const struct spdk_accel_crypto_key_create_param *param) |
Create a crypto key with given parameters. More... | |
int | spdk_accel_crypto_key_destroy (struct spdk_accel_crypto_key *key) |
Destroy a crypto key. More... | |
struct spdk_accel_crypto_key * | spdk_accel_crypto_key_get (const char *name) |
Find a crypto key structure by name. More... | |
int | spdk_accel_submit_copy (struct spdk_io_channel *ch, void *dst, void *src, uint64_t nbytes, int flags, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a copy request. More... | |
int | spdk_accel_submit_dualcast (struct spdk_io_channel *ch, void *dst1, void *dst2, void *src, uint64_t nbytes, int flags, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a dual cast copy request. More... | |
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. More... | |
int | spdk_accel_submit_fill (struct spdk_io_channel *ch, void *dst, uint8_t fill, uint64_t nbytes, int flags, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a fill request. More... | |
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. More... | |
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. More... | |
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, int flags, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a copy with CRC-32C calculation request. More... | |
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, int flags, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Submit a chained copy + CRC-32C calculation request. More... | |
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, int flags, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Build and submit a memory compress request. More... | |
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, int flags, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Build and submit a memory decompress request. More... | |
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. More... | |
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, int flags, spdk_accel_step_cb cb_fn, void *cb_arg) |
Append a copy operation to a sequence. More... | |
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, int flags, spdk_accel_step_cb cb_fn, void *cb_arg) |
Append a fill operation to a sequence. More... | |
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, int flags, spdk_accel_step_cb cb_fn, void *cb_arg) |
Append a decompress operation to a sequence. More... | |
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, int flags, spdk_accel_step_cb cb_fn, void *cb_arg) |
Append an encrypt operation to a sequence. More... | |
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, int flags, spdk_accel_step_cb cb_fn, void *cb_arg) |
Append a decrypt operation to a sequence. More... | |
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. More... | |
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. More... | |
void | spdk_accel_sequence_reverse (struct spdk_accel_sequence *seq) |
Reverse a sequence, so that the last operation becomes the first and vice versa. More... | |
void | spdk_accel_sequence_abort (struct spdk_accel_sequence *seq) |
Abort a sequence. More... | |
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. More... | |
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() . More... | |
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, int flags, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Build and submit a data encryption request. More... | |
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, int flags, spdk_accel_completion_cb cb_fn, void *cb_arg) |
Build and submit a data decryption request. More... | |
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. More... | |
int | spdk_accel_assign_opc (enum spdk_accel_opcode opcode, const char *name) |
Override the assignment of an opcode to an module. More... | |
void | spdk_accel_write_config_json (struct spdk_json_write_ctx *w) |
Write Acceleration subsystem configuration into provided JSON context. More... | |
int | spdk_accel_set_driver (const char *name) |
Select platform driver to execute operation chains. More... | |
struct spdk_memory_domain * | spdk_accel_get_memory_domain (void) |
Retrieves accel memory domain. More... | |
int | spdk_accel_set_opts (const struct spdk_accel_opts *opts) |
Set the options for the accel framework. More... | |
void | spdk_accel_get_opts (struct spdk_accel_opts *opts) |
Get the options for the accel framework. More... | |
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. More... | |
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. More... | |
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, | ||
int | flags, | ||
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. |
flags | Accel operation flags. |
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, | ||
int | flags, | ||
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. |
flags | Accel operation flags. |
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, | ||
int | flags, | ||
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 . |
flags | Accel operation flags. |
cb_fn | Callback to be executed once this operation is completed. |
cb_arg | Argument to be passed to cb_fn . |
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, | ||
int | flags, | ||
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 . |
flags | Accel operation flags. |
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, | ||
int | flags, | ||
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. |
flags | Accel operation flags. |
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_opc_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. |
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_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_opc_name . |
module_name | Pointer to update with module name. |
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 | ) |
Get the options for the accel framework.
opts | Accel options. |
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.
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, | ||
int | flags, | ||
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) |
flags | Flags, optional flags that can vary per operation. |
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, | ||
int | flags, | ||
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. |
flags | Accel framework flags for operations. |
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, | ||
int | flags, | ||
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. |
flags | Accel framework flags for operations. |
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, | ||
int | flags, | ||
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. |
flags | Accel framework flags for operations. |
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, | ||
int | flags, | ||
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) |
flags | Flags, optional flags that can vary per operation. |
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, | ||
int | flags, | ||
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 |
flags | Accel framework flags for operations. |
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_dualcast | ( | struct spdk_io_channel * | ch, |
void * | dst1, | ||
void * | dst2, | ||
void * | src, | ||
uint64_t | nbytes, | ||
int | flags, | ||
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. |
flags | Accel framework flags for operations. |
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, | ||
int | flags, | ||
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 |
flags | Accel framework flags for operations. |
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, | ||
int | flags, | ||
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. |
flags | Accel framework flags for operations. |
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 |