spdk_accel_driver Struct Reference

Platform driver responsible for executing tasks in a sequence. More...

Public Member Functions

 TAILQ_ENTRY (spdk_accel_driver) tailq
 

Data Fields

const char * name
 Name of the driver.
 
int(* init )(void)
 Initializes the driver, called when accel initializes. More...
 
void(* fini )(void)
 Performs cleanup on resources allocated by the driver. More...
 
int(* execute_sequence )(struct spdk_io_channel *ch, struct spdk_accel_sequence *seq)
 Executes a sequence of accel operations. More...
 
struct spdk_io_channel *(* get_io_channel )(void)
 Returns IO channel that will be passed to execute_sequence().
 
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. More...
 

Detailed Description

Platform driver responsible for executing tasks in a sequence.

If no driver is selected, tasks are submitted to accel modules. All drivers are required to be aware of memory domains.

Field Documentation

◆ execute_sequence

int(* spdk_accel_driver::execute_sequence) (struct spdk_io_channel *ch, struct spdk_accel_sequence *seq)

Executes a sequence of accel operations.

The driver should notify accel about each completed task using spdk_accel_task_complete(). Once all tasks are completed or the driver cannot proceed with a given task (e.g. because it doesn't handle specific opcode), accel should be notified via spdk_accel_sequence_continue(). If there are tasks left in a sequence, the first will be submitted to a module, while the rest will be sent back to the driver. spdk_accel_sequence_continue() should only be called if this function succeeds (i.e. returns 0).

Parameters
chIO channel obtained by get_io_channel().
seqSequence of tasks to execute.
Returns
0 on success, negative errno on failure.

◆ fini

void(* spdk_accel_driver::fini) (void)

Performs cleanup on resources allocated by the driver.

Optional.

◆ get_operation_info

int(* spdk_accel_driver::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 driver doesn't have any constraints to execute any operation.

◆ init

int(* spdk_accel_driver::init) (void)

Initializes the driver, called when accel initializes.

Optional.


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