Platform driver responsible for executing tasks in a sequence. More...
#include <accel_module.h>
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. | |
| void(* | fini )(void) |
| Performs cleanup on resources allocated by the driver. | |
| int(* | execute_sequence )(struct spdk_io_channel *ch, struct spdk_accel_sequence *seq) |
| Executes a sequence of accel operations. | |
| 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. | |
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.
| 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).
| ch | IO channel obtained by get_io_channel(). |
| seq | Sequence of tasks to execute. |
| void(* spdk_accel_driver::fini) (void) |
Performs cleanup on resources allocated by the driver.
Optional.
| 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.
| int(* spdk_accel_driver::init) (void) |
Initializes the driver, called when accel initializes.
Optional.