Loading...
Searching...
No Matches
spdk_accel_module_if Struct Reference

Public Member Functions

 TAILQ_ENTRY (spdk_accel_module_if) tailq
 

Data Fields

const char * name
 Name of the module.
 
int priority
 Priority of the module.
 
int(* module_init )(void)
 Initialization function for the module.
 
void(* module_fini )(void *ctx)
 Finish function for the module.
 
void(* write_config_json )(struct spdk_json_write_ctx *w)
 Write Acceleration module configuration into provided JSON context.
 
size_t(* get_ctx_size )(void)
 Returns the allocation size required for the modules to use for context.
 
bool(* supports_opcode )(enum spdk_accel_opcode)
 Reports whether the module supports a given operation.
 
struct spdk_io_channel *(* get_io_channel )(void)
 Returns module's IO channel on the calling thread.
 
int(* submit_tasks )(struct spdk_io_channel *ch, struct spdk_accel_task *accel_task)
 Submit tasks to be executed by the module.
 
int(* crypto_key_init )(struct spdk_accel_crypto_key *key)
 Create crypto key function.
 
void(* crypto_key_deinit )(struct spdk_accel_crypto_key *key)
 Free any resources associated with key allocated during crypto_key_init().
 
bool(* crypto_supports_tweak_mode )(enum spdk_accel_crypto_tweak_mode tweak_mode)
 Returns true if given tweak mode is supported.
 
bool(* crypto_supports_cipher )(enum spdk_accel_cipher cipher, size_t key_size)
 Returns true if given pair (cipher, key size) is supported.
 
bool(* compress_supports_algo )(enum spdk_accel_comp_algo algo)
 Return true if compresssion algo is supported, false otherwise.
 
int(* get_compress_level_range )(enum spdk_accel_comp_algo algo, uint32_t *min_level, uint32_t *max_level)
 Returns the lowest and highest levels of the specified algorithm.
 
int(* get_memory_domains )(struct spdk_memory_domain **domains, int num_domains)
 Returns memory domains supported by the module.
 
int(* get_operation_info )(enum spdk_accel_opcode opcode, const struct spdk_accel_operation_exec_ctx *ctx, struct spdk_accel_opcode_info *info)
 Returns information/constraints for a given operation.
 

Field Documentation

◆ crypto_key_init

int(* spdk_accel_module_if::crypto_key_init) (struct spdk_accel_crypto_key *key)

Create crypto key function.

Module is responsible to fill all necessary parameters in spdk_accel_crypto_key structure

◆ crypto_supports_tweak_mode

bool(* spdk_accel_module_if::crypto_supports_tweak_mode) (enum spdk_accel_crypto_tweak_mode tweak_mode)

Returns true if given tweak mode is supported.

If module doesn't implement that function it shall support SIMPLE LBA mode.

◆ get_memory_domains

int(* spdk_accel_module_if::get_memory_domains) (struct spdk_memory_domain **domains, int num_domains)

Returns memory domains supported by the module.

If NULL, the module does not support memory domains. The domains array can be NULL, in which case this function only returns the number of supported memory domains.

Parameters
domainsMemory domain array.
num_domainsSize of the domains array.
Returns
Number of supported memory domains.

◆ get_operation_info

int(* spdk_accel_module_if::get_operation_info) (enum spdk_accel_opcode opcode, const struct spdk_accel_operation_exec_ctx *ctx, struct spdk_accel_opcode_info *info)

Returns information/constraints for a given operation.

If unimplemented, it is assumed that the module doesn't have any constraints to execute any operation.

◆ module_fini

void(* spdk_accel_module_if::module_fini) (void *ctx)

Finish function for the module.

Called by the application before the application exits to perform any necessary cleanup.

Modules are not required to define this function.

◆ module_init

int(* spdk_accel_module_if::module_init) (void)

Initialization function for the module.

Called by the application during startup.

Return 0 on success or negative error code. If -ENODEV is returned - the module will not be used to handle any operation, but the error will not stop framework initialization.

Modules are required to define this function.

◆ priority

int spdk_accel_module_if::priority

Priority of the module.

It's used to select a module to execute an operation when multiple modules support it. Higher value means higher priority. Software module has a priority of SPDK_ACCEL_SW_PRIORITY. Of course, this value is only relevant when none of the modules have been explicitly assigned to execute a given operation via spdk_accel_assign_opc().

◆ submit_tasks

int(* spdk_accel_module_if::submit_tasks) (struct spdk_io_channel *ch, struct spdk_accel_task *accel_task)

Submit tasks to be executed by the module.

Once a task execution is done, the module is required to complete it using spdk_accel_task_complete(). ch is the IO channel obtained by get_io_channel().


The documentation for this struct was generated from the following file:
  • accel_module.h