interrupt_tgt: Fix the interrupt mode usage issue.
When the application is not set with the interrupt mode, we should fail the rpc. Fixes issue #2023 Change-Id: I4157f220948b7c96f474682c41ac9d78977b1c40 Signed-off-by: Ziye Yang <ziye.yang@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8676 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: <dongx.yi@intel.com>
This commit is contained in:
parent
78ecd30d8e
commit
9a0bd78b43
@ -78,6 +78,14 @@ rpc_reactor_set_interrupt_mode(struct spdk_jsonrpc_request *request,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!spdk_interrupt_mode_is_enabled()) {
|
||||
SPDK_ERRLOG("Interrupt mode is not set when staring the application\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
||||
"spdk_json_decode_object failed");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
SPDK_NOTICELOG("RPC Start to %s interrupt mode on reactor %d.\n",
|
||||
req.disable_interrupt ? "disable" : "enable", req.lcore);
|
||||
if (req.lcore >= (int64_t)spdk_env_get_first_core() &&
|
||||
|
Loading…
Reference in New Issue
Block a user