1153b8c5 | 18-Jul-2017 |
Daniel Verkamp <daniel.verkamp@intel.com> |
jsonrpc: simplify by removing use of poll()
Change-Id: Ib756212d227fb71b9ef3d486223740e4cb152815 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/370
jsonrpc: simplify by removing use of poll()
Change-Id: Ib756212d227fb71b9ef3d486223740e4cb152815 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/370200 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
2bcabb20 | 12-Jul-2017 |
Daniel Verkamp <daniel.verkamp@intel.com> |
jsonrpc: remove incorrect handling for send() == 0
recv() returns 0 when the remote end of the connection is shut down, but there is no such rule for send(). Remove the incorrect treatment of send(
jsonrpc: remove incorrect handling for send() == 0
recv() returns 0 when the remote end of the connection is shut down, but there is no such rule for send(). Remove the incorrect treatment of send() returning 0 as an error. The remaining code will treat a send() return value of 0 as a non-error condition and will continue to work correctly.
Change-Id: Ia753b802d95428104a62d1acb13c5fa437add6b4 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/369299 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 ...
|
cc740794 | 12-Jul-2017 |
Daniel Verkamp <daniel.verkamp@intel.com> |
jsonrpc: avoid calling poll() with a closed fd
If a connection is closed by the remote end, the JSON-RPC server could potentially call poll() on the pollfd containing the invalid file descriptor. R
jsonrpc: avoid calling poll() with a closed fd
If a connection is closed by the remote end, the JSON-RPC server could potentially call poll() on the pollfd containing the invalid file descriptor. Rework the logic so that the pollfd's fd field is set to a negative value so that poll() will ignore it until the connection is fully cleaned up by spdk_jsonrpc_server_conn_remove().
Also add handling for the potential error conditions returned by poll() so that if something does go wrong, the server doesn't get stuck polling a broken pollfd forever.
Change-Id: Id02e3a230740c8ffd513888cb0564891b3aca069 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/369285 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 ...
|
4e003b67 | 07-Jul-2017 |
Daniel Verkamp <daniel.verkamp@intel.com> |
jsonrpc: allow asynchronous request completion
Move the per-connection send buffer into each request, and allow a connection to have a queue of responses ready to be sent.
Change-Id: If6b2151691c4c
jsonrpc: allow asynchronous request completion
Move the per-connection send buffer into each request, and allow a connection to have a queue of responses ready to be sent.
Change-Id: If6b2151691c4cd76f3cf7cde0cdd8f20cac77ceb Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/368470 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 ...
|
977fd230 | 06-Jul-2017 |
Daniel Verkamp <daniel.verkamp@intel.com> |
jsonrpc: dynamically allocate request object
This will be necessary when the lifetime of a request can exceed the lifetime of the values stored in spdk_jsonrpc_server_conn.
Change-Id: Icd9772eb142e
jsonrpc: dynamically allocate request object
This will be necessary when the lifetime of a request can exceed the lifetime of the values stored in spdk_jsonrpc_server_conn.
Change-Id: Icd9772eb142e3f6ae69303aff1e12bc213f435a4 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/368455 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 ...
|