doc/jsonrpc: Add start_subsystem_init and set_nvmf_target_config/options

Change-Id: Idf25cd3113f232f0bd05768d679092cfe945b9b2
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/415131
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
Shuhei Matsumoto 2018-06-14 15:45:47 +09:00 committed by Jim Harris
parent 546a114847
commit 5d64529925
2 changed files with 115 additions and 4 deletions

View File

@ -77,13 +77,46 @@ Example response:
} }
~~~ ~~~
## start_subsystem_init {#rpc_start_subsystem_init}
Start initialization of SPDK subsystems when it is deferred by starting SPDK application with option -w.
During its deferral some RPCs can be used to set global parameters for SPDK subsystems.
This RPC can be called only once.
### Parameters
This method has no parameters.
### Response
Completion status of SPDK subsystem initialization is returned as a boolean.
### Example
Example request:
~~~
{
"jsonrpc": "2.0",
"id": 1,
"method": "start_subsystem_init"
}
~~~
Example response:
~~~
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
~~~
# Block Device Abstraction Layer {#jsonrpc_components_bdev} # Block Device Abstraction Layer {#jsonrpc_components_bdev}
## set_bdev_options {#rpc_set_bdev_options} ## set_bdev_options {#rpc_set_bdev_options}
Set global parameters for the block device (bdev) subsystem. This RPC may only be called Set global parameters for the block device (bdev) subsystem. This RPC may only be called
before subsystems have been initialized. before SPDK subsystems have been initialized.
### Parameters ### Parameters
@ -690,3 +723,81 @@ Example response:
"result": true "result": true
} }
~~~ ~~~
## set_nvmf_target_options {#rpc_set_nvmf_target_options}
Set global parameters for the NVMe-oF target. This RPC may only be called before SPDK subsystems
have been initialized.
### Parameters
Name | Optional | Type | Description
----------------------- | -------- | ----------- | -----------
max_queue_depth | Optional | number | Maximum number of outstanding I/Os per queue
max_qpairs_per_ctrlr | Optional | number | Maximum number of SQ and CQ per controller
in_capsule_data_size | Optional | number | Maximum number of in-capsule data size
max_io_size | Optional | number | Maximum I/O size (bytes)
max_subsystems | Optional | number | Maximum number of NVMe-oF subsystems
io_unit_size | Optional | number | I/O unit size (bytes)
### Example
Example request:
~~~
{
"jsonrpc": "2.0",
"id": 1,
"method": "set_nvmf_target_options",
"params": {
"in_capsule_data_size": 4096,
"io_unit_size": 131072,
"max_qpairs_per_ctrlr": 64,
"max_queue_depth": 128,
"max_io_size": 131072,
"max_subsystems": 1024
}
}
~~~
Example response:
~~~
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
~~~
## set_nvmf_target_config {#rpc_set_nvmf_target_config}
Set global configuration of NVMe-oF target. This RPC may only be called before SPDK subsystems
have been initialized.
### Parameters
Name | Optional | Type | Description
----------------------- | -------- | ----------- | -----------
acceptor_poll_rate | Optional | number | Polling interval of the acceptor for incoming connections (microseconds)
### Example
Example request:
~~~
{
"jsonrpc": "2.0",
"id": 1,
"method": "set_nvmf_target_config",
"params": {
"acceptor_poll_rate": 10000
}
}
~~~
Example response:
~~~
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
~~~

View File

@ -1009,9 +1009,9 @@ if __name__ == "__main__":
p.add_argument('-q', '--max-queue-depth', help='Max number of outstanding I/O per queue', type=int) p.add_argument('-q', '--max-queue-depth', help='Max number of outstanding I/O per queue', type=int)
p.add_argument('-p', '--max-qpairs-per-ctrlr', help='Max number of SQ and CQ per controller', type=int) p.add_argument('-p', '--max-qpairs-per-ctrlr', help='Max number of SQ and CQ per controller', type=int)
p.add_argument('-c', '--in-capsule-data-size', help='Max number of in-capsule data size', type=int) p.add_argument('-c', '--in-capsule-data-size', help='Max number of in-capsule data size', type=int)
p.add_argument('-i', '--max-io-size', help='Max I/O size', type=int) p.add_argument('-i', '--max-io-size', help='Max I/O size (bytes)', type=int)
p.add_argument('-x', '--max-subsystems', help='Max number of NVMf subsystems', type=int) p.add_argument('-x', '--max-subsystems', help='Max number of NVMf subsystems', type=int)
p.add_argument('-u', '--io-unit-size', help='I/O unit size', type=int) p.add_argument('-u', '--io-unit-size', help='I/O unit size (bytes)', type=int)
p.set_defaults(func=set_nvmf_target_options) p.set_defaults(func=set_nvmf_target_options)
@call_cmd @call_cmd
@ -1020,7 +1020,7 @@ if __name__ == "__main__":
acceptor_poll_rate=args.acceptor_poll_rate) acceptor_poll_rate=args.acceptor_poll_rate)
p = subparsers.add_parser('set_nvmf_target_config', help='Set NVMf target config') p = subparsers.add_parser('set_nvmf_target_config', help='Set NVMf target config')
p.add_argument('-r', '--acceptor-poll-rate', help='How often the acceptor polls for incoming connections', type=int) p.add_argument('-r', '--acceptor-poll-rate', help='Polling interval of the acceptor for incoming connections (usec)', type=int)
p.set_defaults(func=set_nvmf_target_config) p.set_defaults(func=set_nvmf_target_config)
@call_cmd @call_cmd