xref: /spdk/module/accel/ioat/accel_ioat_rpc.c (revision fecffda6ecf8853b82edccde429b68252f0a62c5)
1  /*   SPDX-License-Identifier: BSD-3-Clause
2   *   Copyright (C) 2022 Intel Corporation.
3   *   All rights reserved.
4   */
5  
6  #include "accel_ioat.h"
7  
8  #include "spdk/rpc.h"
9  #include "spdk/util.h"
10  #include "spdk/event.h"
11  
12  static void
13  rpc_ioat_scan_accel_module(struct spdk_jsonrpc_request *request,
14  			   const struct spdk_json_val *params)
15  {
16  	if (params != NULL) {
17  		spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
18  						 "ioat_scan_accel_module requires no parameters");
19  		return;
20  	}
21  
22  	SPDK_NOTICELOG("Enabling IOAT\n");
23  	accel_ioat_enable_probe();
24  
25  	spdk_jsonrpc_send_bool_response(request, true);
26  }
27  SPDK_RPC_REGISTER("ioat_scan_accel_module", rpc_ioat_scan_accel_module, SPDK_RPC_STARTUP)
28  SPDK_RPC_REGISTER_ALIAS_DEPRECATED(ioat_scan_accel_module, ioat_scan_accel_engine)
29