The goal of a platform driver is to execute chained accel operations in the most efficient way possible. A driver is aware of the hardware available on a platform and can execute several operations as a single one. For instance, if we want to do DMA and then encrypt the data, the driver can do both at the same time, if the hardware is capable of doing that. Platform drivers aren't required to support all operations. If a given operation cannot be executed, the driver should notify accel to continue processing a sequence, via spdk_accel_sequence_continue(), and that operation will processed by a module assigned to its opcode. It is required however, that all platform drivers support memory domains, including the "virtual" accel domain. A method for allocating those buffers will be added in the following patches. This patch only adds methods to register and select platorm drivers, but doesn't change the way a sequnce is executed (i.e. it doesn't use the driver to execute it). Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I97a0b07e264601ab3cf980735319fe8cea54d38e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16375 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
30 lines
895 B
C
30 lines
895 B
C
/* SPDX-License-Identifier: BSD-3-Clause
|
|
* Copyright (C) 2022 Intel Corporation.
|
|
* Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES.
|
|
* All rights reserved.
|
|
*/
|
|
|
|
#ifndef SPDK_INTERNAL_ACCEL_INTERNAL_H
|
|
#define SPDK_INTERNAL_ACCEL_INTERNAL_H
|
|
|
|
#include "spdk/stdinc.h"
|
|
|
|
#include "spdk/accel.h"
|
|
#include "spdk/queue.h"
|
|
#include "spdk/config.h"
|
|
|
|
struct module_info {
|
|
struct spdk_json_write_ctx *w;
|
|
const char *name;
|
|
enum accel_opcode ops[ACCEL_OPC_LAST];
|
|
uint32_t num_ops;
|
|
};
|
|
|
|
typedef void (*_accel_for_each_module_fn)(struct module_info *info);
|
|
void _accel_for_each_module(struct module_info *info, _accel_for_each_module_fn fn);
|
|
int _accel_get_opc_name(enum accel_opcode opcode, const char **opcode_name);
|
|
void _accel_crypto_key_dump_param(struct spdk_json_write_ctx *w, struct spdk_accel_crypto_key *key);
|
|
void _accel_crypto_keys_dump_param(struct spdk_json_write_ctx *w);
|
|
|
|
#endif
|