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.
|
2018-06-12 23:31:20 +00:00
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2022-08-08 21:43:24 +00:00
|
|
|
#include "accel_ioat.h"
|
2018-06-12 23:31:20 +00:00
|
|
|
|
|
|
|
#include "spdk/rpc.h"
|
|
|
|
#include "spdk/util.h"
|
|
|
|
#include "spdk/event.h"
|
|
|
|
|
|
|
|
static void
|
2022-08-08 21:43:24 +00:00
|
|
|
rpc_ioat_scan_accel_module(struct spdk_jsonrpc_request *request,
|
2020-05-10 05:35:36 +00:00
|
|
|
const struct spdk_json_val *params)
|
2018-06-12 23:31:20 +00:00
|
|
|
{
|
|
|
|
if (params != NULL) {
|
2020-11-25 18:37:40 +00:00
|
|
|
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
2022-08-08 21:43:24 +00:00
|
|
|
"ioat_scan_accel_module requires no parameters");
|
2020-11-25 18:37:40 +00:00
|
|
|
return;
|
2018-06-12 23:31:20 +00:00
|
|
|
}
|
|
|
|
|
2022-03-09 22:21:42 +00:00
|
|
|
SPDK_NOTICELOG("Enabling IOAT\n");
|
2022-08-08 21:43:24 +00:00
|
|
|
accel_ioat_enable_probe();
|
2018-06-12 23:31:20 +00:00
|
|
|
|
2020-11-06 16:58:30 +00:00
|
|
|
spdk_jsonrpc_send_bool_response(request, true);
|
2018-06-12 23:31:20 +00:00
|
|
|
}
|
2022-08-08 21:43:24 +00:00
|
|
|
SPDK_RPC_REGISTER("ioat_scan_accel_module", rpc_ioat_scan_accel_module, SPDK_RPC_STARTUP)
|
|
|
|
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(ioat_scan_accel_module, ioat_scan_accel_engine)
|