2022-06-03 19:15:11 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
2022-11-01 20:26:26 +00:00
|
|
|
* Copyright (C) 2022 Intel Corporation.
|
2022-05-20 19:08:38 +00:00
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2022-08-08 21:43:24 +00:00
|
|
|
#include "accel_iaa.h"
|
2022-05-20 19:08:38 +00:00
|
|
|
|
|
|
|
#include "spdk/rpc.h"
|
|
|
|
#include "spdk/util.h"
|
|
|
|
#include "spdk/event.h"
|
|
|
|
#include "spdk/stdinc.h"
|
|
|
|
#include "spdk/env.h"
|
|
|
|
|
|
|
|
static void
|
2022-08-08 21:43:24 +00:00
|
|
|
rpc_iaa_scan_accel_module(struct spdk_jsonrpc_request *request,
|
2022-05-20 19:08:38 +00:00
|
|
|
const struct spdk_json_val *params)
|
|
|
|
{
|
|
|
|
if (params != NULL) {
|
|
|
|
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
2022-08-08 21:43:24 +00:00
|
|
|
"iaa_scan_accel_module requires no parameters");
|
2022-05-20 19:08:38 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
SPDK_NOTICELOG("Enabling IAA user-mode\n");
|
2022-08-08 21:43:24 +00:00
|
|
|
accel_iaa_enable_probe();
|
2022-05-20 19:08:38 +00:00
|
|
|
spdk_jsonrpc_send_bool_response(request, true);
|
|
|
|
}
|
2022-08-08 21:43:24 +00:00
|
|
|
SPDK_RPC_REGISTER("iaa_scan_accel_module", rpc_iaa_scan_accel_module, SPDK_RPC_STARTUP)
|
|
|
|
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(iaa_scan_accel_module, iaa_scan_accel_engine)
|