History log of /spdk/lib/jsonrpc/jsonrpc_server.c (Results 1 – 25 of 31)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v24.05, v24.09-pre, v24.05-rc1, LTS, v24.01, v24.05-pre, v24.01-rc1
# 1078198e 06-Nov-2023 Shuhei Matsumoto <smatsumoto@nvidia.com>

jsonrpc_server: Remove newlines only if JSON RPC logging is enabled

We removed newlines by default when JSON RPC logging is supported
because newlines do not affect the functionality of JSON RPC obj

jsonrpc_server: Remove newlines only if JSON RPC logging is enabled

We removed newlines by default when JSON RPC logging is supported
because newlines do not affect the functionality of JSON RPC objects.
However, this change lost backward compatibility of some custom
applications which enabled SPDK_JSON_PARSE_FLAG_ALLOW_COMMENTS.

JSON RPC logging is an optional feature. Hence, as a workaround we
remove newlines only if JSON RPC logging is enabled.

Fixes github issue #3155

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I3c7bd0b5b0fc27538c22b6fa10a67fd2a6e5895d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20505
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


Revision tags: v23.09, v24.01-pre, v23.09-rc1
# 2fb672af 04-Jul-2023 Krzysztof Karas <krzysztof.karas@intel.com>

lib/jsonrpc: Store pointers to outstanding requests.

Currently a request is only added to a list in jsonrpc
connection structure (stored inside jsonrpc server
data structure), when its response is r

lib/jsonrpc: Store pointers to outstanding requests.

Currently a request is only added to a list in jsonrpc
connection structure (stored inside jsonrpc server
data structure), when its response is ready to send.
This means that until that point, we do not have its
pointer available inside jsonrpc server data, so if
a server is shut down, it cannot properly handle that
request. Furthermore, when server's memory is freed
and connection is closed before such a request is sent,
`jsonrpc_server_send_response()` will still try to insert
the request into connection queue, resulting in
heap-use-after-free errors. To remedy that issue, this
patch introduces a new list for outstanding requests and
skips sending responses in case a connection is not
available.

Fixes #3052

Change-Id: I5ea6510d7cae5560654dbe2c18782e38eaa9fe97
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19001
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <jim.harris@gmail.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>

show more ...


# a4009e7a 11-Sep-2023 Shuhei Matsumoto <smatsumoto@nvidia.com>

jsonrpc: Write request and response object into a log file and stderr

Print JSON RPC request and response objects into a specified log file
and stderr via spdk_flog() and spdk_log(). To enable these

jsonrpc: Write request and response object into a log file and stderr

Print JSON RPC request and response objects into a specified log file
and stderr via spdk_flog() and spdk_log(). To enable these logging, add
two public APIs, spdk_jsonrpc_set_log_level() and
spdk_jsonrpc_set_log_file().

Remove newlines of JSON objects to print it in a single line. We do this
by default because newline does not affect the functionality of JSON
RPC.

Another idea is to pass file name and file mode (append, write, ...).
However, SPDK is library. The application should manage log file. Hence,
we receive file pointer.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ia385181f3922077670767d72bd070391dad75b1d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18829
Reviewed-by: Jim Harris <jim.harris@gmail.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>

show more ...


# 30b534c9 22-Jun-2023 Shuhei Matsumoto <smatsumoto@nvidia.com>

jsonrpc: Put null byte to the end of response object in req->send_buf

If we print a JSON RPC response object in the req->send_buf simply,
garbage will be contained because JSON RPC object is not req

jsonrpc: Put null byte to the end of response object in req->send_buf

If we print a JSON RPC response object in the req->send_buf simply,
garbage will be contained because JSON RPC object is not required to be
terminated by a null byte. To exclude garbage from print, put a null
byte to the end of the JSON RPC response object before sending.

The null byte was not considered for the req->send_buf. Add one byte
when allocating or reallocating the req->send_buf for the null byte.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I1fa0b61db4ffba989da672b0d69662e3813aab8e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18828
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


# b3bec079 22-Jun-2023 Shuhei Matsumoto <smatsumoto@nvidia.com>

jsonrpc: Add complete_request() to access req->send_buf safely after all were sent

We want to log req->send_buf. Furthermore, we want to remove all newlines
from req->send_buf to improve readability

jsonrpc: Add complete_request() to access req->send_buf safely after all were sent

We want to log req->send_buf. Furthermore, we want to remove all newlines
from req->send_buf to improve readability. We can do it after all of
req->send_buf are sent. Hence, as a preparation, add a new helper
function jsonrpc_complete_request() and replace jsonrpc_free_request()
by it.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I85835711976b2a60427a7ab03b786abe625cd2c7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18827
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Community-CI: Mellanox Build Bot

show more ...


Revision tags: v23.05, v23.09-pre, v23.01.1, v23.01, v23.05-pre, v23.01-rc1, v22.01.2
# a6dbe372 01-Nov-2022 paul luse <paul.e.luse@intel.com>

update Intel copyright notices

per Intel policy to include file commit date using git cmd
below. The policy does not apply to non-Intel (C) notices.

git log --follow -C90% --format=%ad --date defa

update Intel copyright notices

per Intel policy to include file commit date using git cmd
below. The policy does not apply to non-Intel (C) notices.

git log --follow -C90% --format=%ad --date default <file> | tail -1

and then pull just the 4 digit year from the result.

Intel copyrights were not added to files where Intel either had
no contribution ot the contribution lacked substance (ie license
header updates, formatting changes, etc). Contribution date used
"--follow -C95%" to get the most accurate date.

Note that several files in this patch didn't end the license/(c)
block with a blank comment line so these were added as the vast
majority of files do have this last blank line. Simply there for
consistency.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id5b7ce4f658fe87132f14139ead58d6e285c04d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15192
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot

show more ...


Revision tags: v22.09, v23.01-pre, v22.09-rc1
# 488570eb 03-Jun-2022 Jim Harris <james.r.harris@intel.com>

Replace most BSD 3-clause license text with SPDX identifier.

Many open source projects have moved to using SPDX identifiers
to specify license information, reducing the amount of
boilerplate code in

Replace most BSD 3-clause license text with SPDX identifier.

Many open source projects have moved to using SPDX identifiers
to specify license information, reducing the amount of
boilerplate code in every source file. This patch replaces
the bulk of SPDK .c, .cpp and Makefiles with the BSD-3-Clause
identifier.

Almost all of these files share the exact same license text,
and this patch only modifies the files that contain the
most common license text. There can be slight variations
because the third clause contains company names - most say
"Intel Corporation", but there are instances for Nvidia,
Samsung, Eideticom and even "the copyright holder".

Used a bash script to automate replacement of the license text
with SPDX identifier which is checked into scripts/spdx.sh.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaa88ab5e92ea471691dc298cfe41ebfb5d169780
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12904
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: <qun.wan@intel.com>

show more ...


Revision tags: v22.05, v22.09-pre, v22.05-rc1, v22.01.1, v22.01, v22.01-rc1, v21.10, v21.10-rc1, v21.07, v21.07-rc1, v21.04, v21.04-rc1, v21.01.1, v21.01, v21.01-rc1
# d73077b8 06-Nov-2020 yidong0635 <dongx.yi@intel.com>

lib/jsonrpc: Add a new API to send response for writing bool result.

There are many duplicated codes about sending response for writing bool result.
That we need a function to do this.
Then we can r

lib/jsonrpc: Add a new API to send response for writing bool result.

There are many duplicated codes about sending response for writing bool result.
That we need a function to do this.
Then we can reduce many codes.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ic439111b1e9ca1013f8c657ab925f0c27a7be699
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5033
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


Revision tags: v20.10, v20.10-rc1
# 2172c432 04-Sep-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

log: simplify SPDK_LOG_REGISTER_COMPONENT

This patch removes the string from register component.
Removed are all instances in libs or hardcoded in apps.

Starting with this patch literal passed to r

log: simplify SPDK_LOG_REGISTER_COMPONENT

This patch removes the string from register component.
Removed are all instances in libs or hardcoded in apps.

Starting with this patch literal passed to register,
serves as name for the flag.

All instances of SPDK_LOG_* were replaced with just *
in lowercase.
No actual name change for flags occur in this patch.

Affected are SPDK_LOG_REGISTER_COMPONENT() and
SPDK_*LOG() macros.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I002b232fde57ecf9c6777726b181fc0341f1bb17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4495
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Mellanox Build Bot
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI

show more ...


Revision tags: v20.07, v20.07-rc1, v20.04.1, v20.01.2
# 0be5557c 10-May-2020 Seth Howell <seth.howell@intel.com>

lib: json-nbd remove spdk prefix from static functions.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Idbf8d37fbac4e3a9eff253095efb2525c9094d94
Reviewed-on: https://review.spdk.io/ge

lib: json-nbd remove spdk prefix from static functions.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Idbf8d37fbac4e3a9eff253095efb2525c9094d94
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2364
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>

show more ...


# 134590a2 06-May-2020 Seth Howell <seth.howell@intel.com>

lib/jsonrpc: remove spdk_ prefix from internal functions.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ieeb58943536caf46db77ce22509eccb477fa914a
Reviewed-on: https://review.spdk.io/

lib/jsonrpc: remove spdk_ prefix from internal functions.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ieeb58943536caf46db77ce22509eccb477fa914a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2214
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>

show more ...


Revision tags: v20.04, v20.04-rc1, v20.01.1, v20.01, v20.01-rc1, v19.10.1, v19.10, v19.10-rc1, v19.07.1, v19.07
# 59339fea 17-Jul-2019 Jan Kryl <jan.kryl@mayadata.io>

jsonrpc: tolerate null json value for parameters in json-rpc call

Rust lang has notion of empty value `()` which is translated to json null
value using serialization library like serde. Thus it mean

jsonrpc: tolerate null json value for parameters in json-rpc call

Rust lang has notion of empty value `()` which is translated to json null
value using serialization library like serde. Thus it means that jsonrpc
methods having no parameters translate to parameters with null value (as
opposed to a request without parameter member as it is done now in spdk).
This change handles null parameter gracefully instead of returning an
error - improving interoperability with such clients.

Signed-off-by: Jan Kryl <jan.kryl@mayadata.io>
Change-Id: I8c3cc5613582aebb10ac6eaee3ac4e6538aaa0b1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463171
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


Revision tags: v19.04.1, v19.04, v18.10.2, v19.01.1
# a15dcb0b 21-Feb-2019 Pawel Kaminski <pawelkax.kaminski@intel.com>

jsonrpc: always allocate response for request

We already have send buffer allocated. This will greatly improving code
as we guarantee by design that there is always JSON write context
object.

Chang

jsonrpc: always allocate response for request

We already have send buffer allocated. This will greatly improving code
as we guarantee by design that there is always JSON write context
object.

Change-Id: Id487c01448e1a65d9d4ef76d40a2a9f178b2f570
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459341
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


# d270cd36 27-Jun-2019 Pawel Kaminski <pawelx.kaminski@intel.com>

jsonrpc: Reorder spdk_jsonrpc_server_write_cb

We'll use it in spdk_jsonrpc_parse_request() soon.

Change-Id: I78ad2a931787b095e65053bea4dce663a92bb3b0
Signed-off-by: Pawel Wodkowski <pawelx.wodkowsk

jsonrpc: Reorder spdk_jsonrpc_server_write_cb

We'll use it in spdk_jsonrpc_parse_request() soon.

Change-Id: I78ad2a931787b095e65053bea4dce663a92bb3b0
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459657
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


Revision tags: v19.01
# 73f79a5c 01-Feb-2019 Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

jsonrpc: Use spdk_json_write_named_* APIs throughout

Change-Id: I59ef8c96a172162c153d23d89236a26beb164ece
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://revie

jsonrpc: Use spdk_json_write_named_* APIs throughout

Change-Id: I59ef8c96a172162c153d23d89236a26beb164ece
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/442947
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>

show more ...


Revision tags: v18.10.1
# 63978010 13-Dec-2018 Pawel Wodkowski <pawelx.wodkowski@intel.com>

jsonrpc: fix received JSON buffer overwrite

The receive buffer and JSON values array are shared across all requests
on one connection. If RPC handlers deferre processing response, do the
lazy decode

jsonrpc: fix received JSON buffer overwrite

The receive buffer and JSON values array are shared across all requests
on one connection. If RPC handlers deferre processing response, do the
lazy decode or capture JSON by pointer instead of copying it then
content of the request array might be overwritten by now. As we don't
have any requirement here we must assert that the received request is
valid till response is finished.

Fix this issue by copying request data and work on the copy. This change
also void the need of having JSON RPC 'id' field releasing over 128
bytes from each spdk_jsonrpc_request.

Change-Id: I665be446cbcd8f625e5a73514582efad3021a4ff
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/437160
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>

show more ...


# 5b1b3ddf 05-Dec-2018 Pawel Wodkowski <pawelx.wodkowski@intel.com>

jsonrpc: add connection close callback

Connection close cb is called when connection is terminated or server is
shutting down.

Change-Id: Ia455bc5a72d690a4ace056c5a4141760381df678
Signed-off-by: Pa

jsonrpc: add connection close callback

Connection close cb is called when connection is terminated or server is
shutting down.

Change-Id: Ia455bc5a72d690a4ace056c5a4141760381df678
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/436195
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


Revision tags: v18.10, v18.07.1
# 4c8a350d 30-Aug-2018 wuzhouhui <wuzhouhui@kingsoft.com>

jsonrpc: fix error path of spdk_jsonrpc_parse_request()

Change-Id: Ia1bb2edefe31dc179986b9d4f8ea0d9002af0a40
Signed-off-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.i

jsonrpc: fix error path of spdk_jsonrpc_parse_request()

Change-Id: Ia1bb2edefe31dc179986b9d4f8ea0d9002af0a40
Signed-off-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.io/424008
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


# 0f842e86 13-Aug-2018 Pawel Wodkowski <pawelx.wodkowski@intel.com>

jsonrpc: call spdk_jsonrpc_free_request only from server thread

Decrementing struct spdk_jsonrpc_server_conn::outstanding_requests
should be atomic since this variable are accesed from multiple thre

jsonrpc: call spdk_jsonrpc_free_request only from server thread

Decrementing struct spdk_jsonrpc_server_conn::outstanding_requests
should be atomic since this variable are accesed from multiple threads.
Istead of that just route the request back to the server thread with
nothing to send.

As we are here change spdk_jsonrpc_server_send_response() to take only
struct spdk_jsonrpc_request parameter.

Change-Id: I9b856e7d530355cea43a29f58f4f9405e7e35fc2
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/422124
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>

show more ...


Revision tags: v18.07, v18.04.1
# da7673f7 29-May-2018 Daniel Verkamp <daniel.verkamp@intel.com>

jsonrpc: make "jsonrpc" actually optional

The decoder was still marked as required, so omitting "jsonrpc" version
from the request did not work.

Change-Id: Ied6a8bb1fbbf072c5eff87ed0b343edd7b3702b3

jsonrpc: make "jsonrpc" actually optional

The decoder was still marked as required, so omitting "jsonrpc" version
from the request did not work.

Change-Id: Ied6a8bb1fbbf072c5eff87ed0b343edd7b3702b3
Fixes: aa67900a2e42 ("jsonrpc: make "jsonrpc" request field optional")
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/412859
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


# aa67900a 18-May-2018 Daniel Verkamp <daniel.verkamp@intel.com>

jsonrpc: make "jsonrpc" request field optional

The "jsonrpc" field, per spec, is meant to contain the exact string
"2.0" to indicate the version of the JSON-RPC specification implemented
by the clie

jsonrpc: make "jsonrpc" request field optional

The "jsonrpc" field, per spec, is meant to contain the exact string
"2.0" to indicate the version of the JSON-RPC specification implemented
by the client. We don't do anything useful with this information except
to drop requests for (theoretical) other versions, so it should be safe
to allow the parameter to be optional. If the version is specified, we
will still validate that it is 2.0.

This enables interoperability with a Go JSON-RPC client, as mentioned in
issue #303: https://godoc.org/github.com/mafredri/cdp/rpcc

Change-Id: Ifde32b3f47a5d7942f4ab74b4d6029dd0168efa8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411742
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


Revision tags: v18.04, v18.01.1
# 97cb1713 22-Feb-2018 Pawel Wodkowski <pawelx.wodkowski@intel.com>

jsonrpc: add spdk_jsonrpc_send_error_response_fmt

To help printing more descriptive error message add fmt version.

Change-Id: I8d383d76d0f6e6f2882160fb8fd8459ec8f5495a
Signed-off-by: Pawel Wodkowsk

jsonrpc: add spdk_jsonrpc_send_error_response_fmt

To help printing more descriptive error message add fmt version.

Change-Id: I8d383d76d0f6e6f2882160fb8fd8459ec8f5495a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/401025
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


# c7852cf9 14-Feb-2018 Daniel Verkamp <daniel.verkamp@intel.com>

jsonrpc: allow send_buf to grow as needed

Reallocate the send buffer if more data is written by the RPC handler
than currently fits in the buffer.

Change-Id: I590dd173b843aba48c768adfafaf87e4b47bcc

jsonrpc: allow send_buf to grow as needed

Reallocate the send buffer if more data is written by the RPC handler
than currently fits in the buffer.

Change-Id: I590dd173b843aba48c768adfafaf87e4b47bcc19
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/399925
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

show more ...


Revision tags: v18.01, v17.10.1, v17.10, v17.07.1
# ea1c1579 30-Aug-2017 Daniel Verkamp <daniel.verkamp@intel.com>

log: rename SPDK_TRACE_* to SPDK_LOG_*

Disambiguate the log components from the trace functionality
(include/spdk/trace.h).

The internal spdk_trace_flag structure and related functions will be
rena

log: rename SPDK_TRACE_* to SPDK_LOG_*

Disambiguate the log components from the trace functionality
(include/spdk/trace.h).

The internal spdk_trace_flag structure and related functions will be
renamed in a later commit - this is just a find and replace on
SPDK_TRACE_* and SPDK_LOG_REGISTER_TRACE_FLAG().

Change-Id: I617bd5a9fbe35ffb44ae6020b292658c094a0ad6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376421
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>

show more ...


# d92f0f75 25-Aug-2017 Daniel Verkamp <daniel.verkamp@intel.com>

log: rename SPDK_TRACELOG to SPDK_DEBUGLOG

This matches the name to the behavior and prepares for addition of a new
log macro for "info" log level.

Change-Id: I94ccd49face4309d3368e399528776ab14074

log: rename SPDK_TRACELOG to SPDK_DEBUGLOG

This matches the name to the behavior and prepares for addition of a new
log macro for "info" log level.

Change-Id: I94ccd49face4309d3368e399528776ab140748c4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/375833
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


12