json: increase the json rpc client value limit
The jsonrpc client has a limit of 1024 JSON values per request which is hardly enough for any meaningful config. For example, calling getbdevs for 24 NVMe drives require ~2300 JSON values. I kept the original 1024 limit for the RPC server where it makes sense to have a smaller limit and introduced a seperate limit for the client. Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com> Change-Id: Id0300991b76151e4003e323f5ea29bc5fc0d2d11 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473568 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
a31ae23f38
commit
92df995526
@ -93,7 +93,7 @@ spdk_jsonrpc_parse_response(struct spdk_jsonrpc_client *client)
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RPC_CLIENT, "JSON string is :\n%s\n", client->recv_buf);
|
||||
if (rc < 0 || rc > SPDK_JSONRPC_MAX_VALUES) {
|
||||
if (rc < 0 || rc > SPDK_JSONRPC_CLIENT_MAX_VALUES) {
|
||||
SPDK_ERRLOG("JSON parse error (rc: %zd)\n", rc);
|
||||
/*
|
||||
* Can't recover from parse error (no guaranteed resync point in streaming JSON).
|
||||
|
@ -46,6 +46,7 @@
|
||||
#define SPDK_JSONRPC_ID_MAX_LEN 128
|
||||
#define SPDK_JSONRPC_MAX_CONNS 64
|
||||
#define SPDK_JSONRPC_MAX_VALUES 1024
|
||||
#define SPDK_JSONRPC_CLIENT_MAX_VALUES 8192
|
||||
|
||||
struct spdk_jsonrpc_request {
|
||||
struct spdk_jsonrpc_server_conn *conn;
|
||||
|
Loading…
Reference in New Issue
Block a user