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>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473568 (master)

(cherry picked from commit 92df995526)
Change-Id: Id0300991b76151e4003e323f5ea29bc5fc0d2d11
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478342
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
This commit is contained in:
Michael Haeuptle 2019-11-07 10:57:37 -07:00 committed by Tomasz Zawadzki
parent 90c4efcb63
commit da657d4383
2 changed files with 2 additions and 1 deletions

View File

@ -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).

View File

@ -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;