From 63ee471b6411a7b35c8e2495a0a89d61d4d3d10f Mon Sep 17 00:00:00 2001 From: Maciej Wawryk Date: Tue, 24 Aug 2021 09:04:22 +0200 Subject: [PATCH] markdownlint: enable rule MD040 MD040 - Fenced code blocks should have a language specified Fixed all errors Signed-off-by: Maciej Wawryk Change-Id: Iddd307068c1047ca9a0bb12c1b0d9c88f496765f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9272 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Jim Harris --- CHANGELOG.md | 4 +- README.md | 4 +- doc/applications.md | 2 +- doc/bdev.md | 2 +- doc/compression.md | 8 +- doc/ftl.md | 2 +- doc/iscsi.md | 54 +- doc/jsonrpc.md | 786 +++++++++++++++-------------- doc/jsonrpc_proxy.md | 4 +- doc/lvol.md | 4 +- doc/nvme.md | 2 +- doc/nvmf_tracing.md | 28 +- doc/pkgconfig.md | 10 +- doc/system_configuration.md | 2 +- doc/usdt.md | 20 +- doc/vhost_processing.md | 48 +- examples/nvme/perf/README.md | 2 + mdl_rules.rb | 1 - scripts/vagrant/README.md | 26 +- test/app/fuzz/iscsi_fuzz/README.md | 2 +- test/app/fuzz/nvme_fuzz/README.md | 2 +- test/app/fuzz/vhost_fuzz/README.md | 2 +- test/external_code/README.md | 2 +- 23 files changed, 515 insertions(+), 502 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6f0c4590..c65d2e4ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1882,7 +1882,7 @@ Preliminary support for cross compilation is now available. Targeting an older CPU on the same architecture using your native compiler can be accomplished by using the `--target-arch` option to `configure` as follows: -~~~ +~~~bash ./configure --target-arch=broadwell ~~~ @@ -1890,7 +1890,7 @@ Additionally, some support for cross-compiling to other architectures has been added via the `--cross-prefix` argument to `configure`. To cross-compile, set CC and CXX to the cross compilers, then run configure as follows: -~~~ +~~~bash ./configure --target-arch=aarm64 --cross-prefix=aarch64-linux-gnu ~~~ diff --git a/README.md b/README.md index ceedc7307..93bf72243 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,9 @@ Boolean (on/off) options are configured with a 'y' (yes) or 'n' (no). For example, this line of `CONFIG` controls whether the optional RDMA (libibverbs) support is enabled: - CONFIG_RDMA?=n +~~~{.sh} +CONFIG_RDMA?=n +~~~ To enable RDMA, this line may be added to `mk/config.mk` with a 'y' instead of 'n'. For the majority of options this can be done using the `configure` script. diff --git a/doc/applications.md b/doc/applications.md index a1181ce2d..ea173d935 100644 --- a/doc/applications.md +++ b/doc/applications.md @@ -151,7 +151,7 @@ Whenever the `CPU mask` is mentioned it is a string in one of the following form The following CPU masks are equal and correspond to CPUs 0, 1, 2, 8, 9, 10, 11 and 12: -~~~ +~~~bash 0x1f07 0x1F07 1f07 diff --git a/doc/bdev.md b/doc/bdev.md index 71815c189..29a07b6e8 100644 --- a/doc/bdev.md +++ b/doc/bdev.md @@ -236,7 +236,7 @@ Example command ### Creating a GPT partition table using NBD {#bdev_ug_gpt_create_part} -~~~ +~~~bash # Expose bdev Nvme0n1 as kernel block device /dev/nbd0 by JSON-RPC rpc.py nbd_start_disk Nvme0n1 /dev/nbd0 diff --git a/doc/compression.md b/doc/compression.md index 32c076300..9d8016cb1 100644 --- a/doc/compression.md +++ b/doc/compression.md @@ -88,7 +88,7 @@ In these examples, the value "X" will represent the special value (2^64-1) descr ### Initial Creation -``` +```text +--------------------+ Backing Device | | +--------------------+ @@ -123,7 +123,7 @@ In these examples, the value "X" will represent the special value (2^64-1) descr store the 16KB of data. * Write the chunk map index to entry 2 in the logical map. -``` +```text +--------------------+ Backing Device |01 | +--------------------+ @@ -157,7 +157,7 @@ In these examples, the value "X" will represent the special value (2^64-1) descr * Write (2, X, X, X) to the chunk map. * Write the chunk map index to entry 0 in the logical map. -``` +```text +--------------------+ Backing Device |012 | +--------------------+ @@ -205,7 +205,7 @@ In these examples, the value "X" will represent the special value (2^64-1) descr * Free chunk map 1 back to the free chunk map list. * Free backing IO unit 2 back to the free backing IO unit list. -``` +```text +--------------------+ Backing Device |01 34 | +--------------------+ diff --git a/doc/ftl.md b/doc/ftl.md index 0e2985176..92df7a595 100644 --- a/doc/ftl.md +++ b/doc/ftl.md @@ -156,7 +156,7 @@ To verify that the drive is emulated correctly, one can check the output of the (assuming that `scripts/setup.sh` was called before and the driver has been changed for that device): -``` +```bash $ build/examples/identify ===================================================== NVMe Controller at 0000:00:0a.0 [1d1d:1f1f] diff --git a/doc/iscsi.md b/doc/iscsi.md index 29b4c99d8..8b719eb18 100644 --- a/doc/iscsi.md +++ b/doc/iscsi.md @@ -32,7 +32,7 @@ To ensure the SPDK iSCSI target has the best performance, place the NICs and the same NUMA node and configure the target to run on CPU cores associated with that node. The following command line option is used to configure the SPDK iSCSI target: -~~~ +~~~bash -m 0xF000000 ~~~ @@ -51,7 +51,7 @@ The iSCSI target is configured via JSON-RPC calls. See @ref jsonrpc for details. - iscsi_target_node_remove_pg_ig_maps -- Delete initiator group to portal group mappings from an existing iSCSI target node. - iscsi_get_portal_groups -- Show information about all available portal groups. -~~~ +~~~bash /path/to/spdk/scripts/rpc.py iscsi_create_portal_group 1 10.0.0.1:3260 ~~~ @@ -62,7 +62,7 @@ The iSCSI target is configured via JSON-RPC calls. See @ref jsonrpc for details. - iscsi_initiator_group_add_initiators -- Add initiators to an existing initiator group. - iscsi_get_initiator_groups -- Show information about all available initiator groups. -~~~ +~~~bash /path/to/spdk/scripts/rpc.py iscsi_create_initiator_group 2 ANY 10.0.0.2/32 ~~~ @@ -73,7 +73,7 @@ The iSCSI target is configured via JSON-RPC calls. See @ref jsonrpc for details. - iscsi_target_node_add_lun -- Add a LUN to an existing iSCSI target node. - iscsi_get_target_nodes -- Show information about all available iSCSI target nodes. -~~~ +~~~bash /path/to/spdk/scripts/rpc.py iscsi_create_target_node Target3 Target3_alias MyBdev:0 1:2 64 -d ~~~ @@ -83,30 +83,30 @@ The Linux initiator is open-iscsi. Installing open-iscsi package Fedora: -~~~ +~~~bash yum install -y iscsi-initiator-utils ~~~ Ubuntu: -~~~ +~~~bash apt-get install -y open-iscsi ~~~ ### Setup Edit /etc/iscsi/iscsid.conf -~~~ +~~~bash node.session.cmds_max = 4096 node.session.queue_depth = 128 ~~~ iscsid must be restarted or receive SIGHUP for changes to take effect. To send SIGHUP, run: -~~~ +~~~bash killall -HUP iscsid ~~~ Recommended changes to /etc/sysctl.conf -~~~ +~~~bash net.ipv4.tcp_timestamps = 1 net.ipv4.tcp_sack = 0 @@ -124,13 +124,14 @@ net.core.netdev_max_backlog = 300000 ### Discovery Assume target is at 10.0.0.1 -~~~ + +~~~bash iscsiadm -m discovery -t sendtargets -p 10.0.0.1 ~~~ ### Connect to target -~~~ +~~~bash iscsiadm -m node --login ~~~ @@ -139,13 +140,13 @@ they came up as. ### Disconnect from target -~~~ +~~~bash iscsiadm -m node --logout ~~~ ### Deleting target node cache -~~~ +~~~bash iscsiadm -m node -o delete ~~~ @@ -153,7 +154,7 @@ This will cause the initiator to forget all previously discovered iSCSI target n ### Finding /dev/sdX nodes for iSCSI LUNs -~~~ +~~~bash iscsiadm -m session -P 3 | grep "Attached scsi disk" | awk '{print $4}' ~~~ @@ -165,19 +166,19 @@ After the targets are connected, they can be tuned. For example if /dev/sdc is an iSCSI disk then the following can be done: Set noop to scheduler -~~~ +~~~bash echo noop > /sys/block/sdc/queue/scheduler ~~~ Disable merging/coalescing (can be useful for precise workload measurements) -~~~ +~~~bash echo "2" > /sys/block/sdc/queue/nomerges ~~~ Increase requests for block queue -~~~ +~~~bash echo "1024" > /sys/block/sdc/queue/nr_requests ~~~ @@ -191,33 +192,34 @@ Assuming we have one iSCSI Target server with portal at 10.0.0.1:3200, two LUNs #### Configure iSCSI Target Start iscsi_tgt application: -``` + +```bash ./build/bin/iscsi_tgt ``` Construct two 64MB Malloc block devices with 512B sector size "Malloc0" and "Malloc1": -``` +```bash ./scripts/rpc.py bdev_malloc_create -b Malloc0 64 512 ./scripts/rpc.py bdev_malloc_create -b Malloc1 64 512 ``` Create new portal group with id 1, and address 10.0.0.1:3260: -``` +```bash ./scripts/rpc.py iscsi_create_portal_group 1 10.0.0.1:3260 ``` Create one initiator group with id 2 to accept any connection from 10.0.0.2/32: -``` +```bash ./scripts/rpc.py iscsi_create_initiator_group 2 ANY 10.0.0.2/32 ``` Finally construct one target using previously created bdevs as LUN0 (Malloc0) and LUN1 (Malloc1) with a name "disk1" and alias "Data Disk1" using portal group 1 and initiator group 2. -``` +```bash ./scripts/rpc.py iscsi_create_target_node disk1 "Data Disk1" "Malloc0:0 Malloc1:1" 1:2 64 -d ``` @@ -225,14 +227,14 @@ with a name "disk1" and alias "Data Disk1" using portal group 1 and initiator gr Discover target -~~~ +~~~bash $ iscsiadm -m discovery -t sendtargets -p 10.0.0.1 10.0.0.1:3260,1 iqn.2016-06.io.spdk:disk1 ~~~ Connect to the target -~~~ +~~~bash iscsiadm -m node --login ~~~ @@ -240,7 +242,7 @@ At this point the iSCSI target should show up as SCSI disks. Check dmesg to see what they came up as. In this example it can look like below: -~~~ +~~~bash ... [630111.860078] scsi host68: iSCSI Initiator over TCP/IP [630112.124743] scsi 68:0:0:0: Direct-Access INTEL Malloc disk 0001 PQ: 0 ANSI: 5 @@ -263,7 +265,7 @@ Check dmesg to see what they came up as. In this example it can look like below: You may also use simple bash command to find /dev/sdX nodes for each iSCSI LUN in all logged iSCSI sessions: -~~~ +~~~bash $ iscsiadm -m session -P 3 | grep "Attached scsi disk" | awk '{print $4}' sdd sde diff --git a/doc/jsonrpc.md b/doc/jsonrpc.md index 04aa69eed..53a949293 100644 --- a/doc/jsonrpc.md +++ b/doc/jsonrpc.md @@ -62,19 +62,19 @@ that 'rpc.py' imports for definitions of each SPDK library's or module's methods Example: -~~~ +~~~bash scripts/rpc.py bdev_nvme_attach_controller -b nvme0 -a 00:02.0 -t pcie ~~~ A brief description of each of the RPC methods and optional 'rpc.py' arguments can be viewed with: -~~~ +~~~bash scripts/rpc.py --help ~~~ A detailed description of each RPC method and its parameters is also available. For example: -~~~ +~~~bash scripts/rpc.py bdev_nvme_attach_controller --help ~~~ @@ -85,7 +85,7 @@ The configuration file is a JSON file containing all of the JSON-RPC method invo for the desired configuration. Writing these files by hand is extremely tedious however, so 'rpc.py' provides a mechanism to generate a JSON-RPC file based on the current configuration. -~~~ +~~~bash scripts/rpc.py save_config > config.json ~~~ @@ -97,7 +97,7 @@ to reproduce the same configuration. 'rpc.py' also supports batching of multiple JSON-RPC methods with one invocation. So instead of calling 'rpc.py' once for each JSON-RPC method, such as: -~~~ +~~~bash scripts/rpc.py bdev_malloc_create -b malloc0 64 512 scripts/rpc.py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a scripts/rpc.py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 malloc0 @@ -107,7 +107,7 @@ scripts/rpc.py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t tcp -a you can put the following into a text file: -~~~ +~~~bash bdev_malloc_create -b malloc0 64 512 nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 malloc0 @@ -117,7 +117,7 @@ nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t tcp -a 127.0.0.1 -s 44 and then just do: -~~~ +~~~bash scripts/rpc.py < rpc.txt ~~~ @@ -129,7 +129,7 @@ methods as follows: If PYTHONPATH doesn't include the location of the external RPC python script, it should be updated: -~~~ +~~~bash export PYTHONPATH=/home/user/plugin_example/ ~~~ @@ -138,7 +138,7 @@ spdk_rpc_plugin_initialize() method that will be called when the plugin is loade argument that adds new RPC calls (subparsers.add_parser()). The new parsers should use the client.call() method to call RPC functions registered within the external module using the SPDK_RPC_REGISTER() macro. Example: -~~~ +~~~python from rpc.client import print_json @@ -202,7 +202,7 @@ def spdk_rpc_plugin_initialize(subparsers): Finally, call the rpc.py script with '--plugin' parameter to provide above python module name: -~~~ +~~~bash ./scripts/rpc.py --plugin rpc_plugin bdev_example_create 10 4096 ~~~ @@ -214,7 +214,8 @@ can [generate JSON-RPC for current configuration](@ref jsonrpc_generate). If binary for deploying the application is unavailable, the legacy configuration file can be converted to JSON-RPC using python tool: -~~~ + +~~~bash ./scripts/config_converter.py < config.ini > config.json ~~~ @@ -234,7 +235,7 @@ sig_name | Required | string | Signal to send (SIGINT, SIGTE Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -247,7 +248,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -275,7 +276,7 @@ enabled | boolean | The current state of context switch moni Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -288,7 +289,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -316,7 +317,7 @@ Completion status of SPDK subsystem initialization is returned as a boolean. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -326,7 +327,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -351,7 +352,7 @@ Returns True when subsystems have been initialized. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -361,7 +362,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -387,7 +388,7 @@ The response is an array of supported RPC methods. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -397,7 +398,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -498,7 +499,7 @@ The response is an array of name and dependency relationship of SPDK subsystems Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -508,7 +509,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -586,7 +587,7 @@ Null is returned if it is not retrievable by the framework_get_config method and Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -599,7 +600,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -665,7 +666,8 @@ The response is an array of all reactors. #### Example Example request: -~~~ + +~~~json { "jsonrpc": "2.0", "method": "framework_get_reactors", @@ -674,7 +676,8 @@ Example request: ~~~ Example response: -~~~ + +~~~json { "jsonrpc": "2.0", "id": 1, @@ -719,7 +722,7 @@ Completion status of the operation is returned as a boolean. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "framework_set_scheduler", @@ -733,7 +736,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -761,7 +764,7 @@ governor_name | Governor name Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "framework_set_scheduler", @@ -771,7 +774,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -798,7 +801,8 @@ The response is an array of objects containing threads statistics. #### Example Example request: -~~~ + +~~~json { "jsonrpc": "2.0", "method": "thread_get_stats", @@ -807,7 +811,8 @@ Example request: ~~~ Example response: -~~~ + +~~~json { "jsonrpc": "2.0", "id": 1, @@ -850,7 +855,7 @@ Completion status of the operation is returned as a boolean. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "thread_set_cpumask", @@ -864,7 +869,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -887,7 +892,7 @@ name | Required | string | bdev, nvmf_rdma, nvmf_tcp, bl Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "trace_enable_tpoint_group", @@ -900,7 +905,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -923,7 +928,7 @@ name | Required | string | bdev, nvmf_rdma, nvmf_tcp, bl Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "trace_disable_tpoint_group", @@ -936,7 +941,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -956,7 +961,7 @@ No parameters required Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "trace_get_tpoint_group_mask", @@ -966,7 +971,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1015,7 +1020,7 @@ level | Required | string | ERROR, WARNING, NOTICE, INFO, Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "log_set_print_level", @@ -1028,7 +1033,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1045,7 +1050,7 @@ sent to the current console. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "log_get_print_level", @@ -1055,7 +1060,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1077,7 +1082,7 @@ level | Required | string | ERROR, WARNING, NOTICE, INFO, Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "log_set_level", @@ -1090,7 +1095,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1106,7 +1111,7 @@ Get the current logging level output by the `log` module. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "log_get_level", @@ -1116,7 +1121,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1140,7 +1145,7 @@ flag | Required | string | A log flag, or 'all' Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "log_set_flag", @@ -1153,7 +1158,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1177,7 +1182,7 @@ flag | Required | string | A log flag, or 'all' Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "log_clear_flag", @@ -1190,7 +1195,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1207,7 +1212,7 @@ they are currently enabled. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "log_get_flags", @@ -1217,7 +1222,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1244,7 +1249,7 @@ enabled | Required | boolean | on or off Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "log_enable_timestamps", @@ -1257,7 +1262,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1280,7 +1285,8 @@ The response is an array of objects containing pollers of all the threads. #### Example Example request: -~~~ + +~~~json { "jsonrpc": "2.0", "method": "thread_get_pollers", @@ -1289,7 +1295,8 @@ Example request: ~~~ Example response: -~~~ + +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1331,7 +1338,8 @@ The response is an array of objects containing IO channels of all the threads. #### Example Example request: -~~~ + +~~~json { "jsonrpc": "2.0", "method": "thread_get_io_channels", @@ -1340,7 +1348,8 @@ Example request: ~~~ Example response: -~~~ + +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1377,7 +1386,7 @@ The response is a pathname to a text file containing the memory stats. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "env_dpdk_get_mem_stats", @@ -1387,7 +1396,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1415,7 +1424,7 @@ config_kernel_mode | Optional | Boolean | If set, will use kernel idxd Example request: -~~~ +~~~json { "params": { "config_number": 0, @@ -1429,7 +1438,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1449,7 +1458,7 @@ None Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "ioat_scan_accel_engine", @@ -1459,7 +1468,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1486,7 +1495,7 @@ bdev_auto_examine | Optional | boolean | If set to false, the bdev lay Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1500,7 +1509,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1529,7 +1538,7 @@ The response is an array of objects containing information about the requested b Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1542,7 +1551,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1591,7 +1600,7 @@ The response is an array of objects containing I/O statistics of the requested b Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1604,7 +1613,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1628,7 +1637,7 @@ The response is sent when all bdev modules had a chance to examine every bdev. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_wait_for_examine", @@ -1638,7 +1647,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1667,7 +1676,7 @@ The response is an array of objects containing I/O statistics of the requested b Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1680,7 +1689,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1723,7 +1732,7 @@ enable | Required | boolean | Enable or disable histogram o Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1737,7 +1746,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1767,7 +1776,7 @@ tsc_rate | Ticks per second Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1781,7 +1790,7 @@ Example request: Example response: Note that histogram field is trimmed, actual encoded histogram length is ~80kb. -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1811,7 +1820,7 @@ w_mbytes_per_sec | Optional | number | Number of Write megabytes per Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1828,7 +1837,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1851,7 +1860,7 @@ period | Required | int | period (in microseconds).If s Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_set_qd_sampling_period", @@ -1865,7 +1874,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1893,7 +1902,7 @@ Name of newly created bdev. Example request: -~~~ +~~~json { "params": { "base_bdev_name": "Nvme0n1", @@ -1920,7 +1929,7 @@ name | Required | string | Name of the compress bdev Example request: -~~~ +~~~json { "params": { "name": "COMP_Nvme0n1" @@ -1933,7 +1942,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1955,7 +1964,7 @@ name | Required | string | Name of the compress bdev Example request: -~~~ +~~~json { "params": { "name": "COMP_Nvme0n1" @@ -1968,7 +1977,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -1991,7 +2000,7 @@ pmd | Required | int | pmd selection Example request: -~~~ +~~~json { "params": { "pmd": 1 @@ -2004,7 +2013,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2035,7 +2044,7 @@ Name of newly created bdev. Example request: -~~~ +~~~json { "params": { "base_bdev_name": "Nvme0n1", @@ -2052,7 +2061,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", @@ -2075,7 +2084,7 @@ name | Required | string | Name of the crypto bdev Example request: -~~~ +~~~json { "params": { "name": "my_crypto_bdev" @@ -2088,7 +2097,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2120,7 +2129,7 @@ Name of newly created bdev. Example request: -~~~ +~~~json { "params": { "name": "ocf0", @@ -2137,7 +2146,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2159,7 +2168,7 @@ name | Required | string | Bdev name Example request: -~~~ +~~~json { "params": { "name": "ocf0" @@ -2172,7 +2181,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2198,7 +2207,7 @@ Statistics as json object. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_ocf_get_stats", @@ -2208,7 +2217,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2402,7 +2411,7 @@ Array of OCF devices with their current status, along with core and cache bdevs. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_ocf_get_bdevs", @@ -2412,7 +2421,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2452,7 +2461,7 @@ New cache mode name. Example request: -~~~ +~~~json { "params": { "name": "ocf0", @@ -2466,7 +2475,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2495,7 +2504,7 @@ Name of newly created bdev. Example request: -~~~ +~~~json { "params": { "block_size": 4096, @@ -2511,7 +2520,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2533,7 +2542,7 @@ name | Required | string | Bdev name Example request: -~~~ +~~~json { "params": { "name": "Malloc0" @@ -2546,7 +2555,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2578,7 +2587,7 @@ Name of newly created bdev. Example request: -~~~ +~~~json { "params": { "block_size": 4104, @@ -2597,7 +2606,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2619,7 +2628,7 @@ name | Required | string | Bdev name Example request: -~~~ +~~~json { "params": { "name": "Null0" @@ -2632,7 +2641,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2655,7 +2664,7 @@ new_size | Required | number | Bdev new capacity in MB Example request: -~~~ +~~~json { "params": { "name": "Null0", @@ -2669,7 +2678,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2697,7 +2706,7 @@ Name of newly created bdev. Example request: -~~~ +~~~json { "params": { "block_size": 4096, @@ -2712,7 +2721,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2734,7 +2743,7 @@ name | Required | string | Bdev name Example request: -~~~ +~~~json { "params": { "name": "Aio0" @@ -2747,7 +2756,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2782,7 +2791,7 @@ delay_cmd_submit | Optional | boolean | Enable delaying NVMe comma Example request: -~~~ +~~~json request: { "params": { @@ -2807,7 +2816,7 @@ request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2831,7 +2840,7 @@ period_us | Optional | number | How often to poll for hot-ins Example request: -~~~ +~~~json request: { "params": { @@ -2846,7 +2855,7 @@ request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2888,7 +2897,7 @@ fabrics_connect_timeout_us | Optional | bool | Timeout for fabrics connec Example request: -~~~ +~~~json { "params": { "trtype": "pcie", @@ -2903,7 +2912,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2934,7 +2943,7 @@ The response is an array of objects containing information about the requested N Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2947,7 +2956,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -2989,7 +2998,7 @@ subnqn | Optional | string | NVMe-oF target subnqn Example requests: -~~~ +~~~json { "params": { "name": "Nvme0" @@ -3002,7 +3011,7 @@ Example requests: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3026,7 +3035,7 @@ name | Required | string | NVMe controller name Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3039,7 +3048,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3063,7 +3072,7 @@ dev_path | Required | string | Path to the CUSE controller d Example request: -~~~ +~~~json { "params": { "dev_path": "spdk/nvme0", @@ -3077,7 +3086,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3100,7 +3109,7 @@ name | Required | string | Name of the NVMe controller Example request: -~~~ +~~~json { "params": { "name": "Nvme0" @@ -3113,7 +3122,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3138,7 +3147,7 @@ optimal_open_zones | Required | number | Number of zones required to r Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_zone_block_create", @@ -3154,7 +3163,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3176,7 +3185,7 @@ name | Required | string | Name of the Zone device Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_zone_block_delete", @@ -3189,7 +3198,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3212,7 +3221,7 @@ bdev_name | Required | string | Name of the NVMe block device Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_nvme_apply_firmware", @@ -3240,7 +3249,7 @@ The response is an array of objects containing information about transport stati Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3250,7 +3259,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3363,7 +3372,7 @@ The response is the object containing information about health log of the NVMe c Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_nvme_get_controller_health_info", @@ -3376,7 +3385,7 @@ Example request: Example response: -~~~ +~~~json { "model_number": "INTEL SSDPE2KX020T8", "serial_number": "BTLJ72430ARH2P0BGN", @@ -3582,7 +3591,7 @@ Name of newly created bdev. Example request with `key` from `/etc/ceph/ceph.client.admin.keyring`: -~~~ +~~~json { "params": { "pool_name": "rbd", @@ -3601,7 +3610,7 @@ Example request with `key` from `/etc/ceph/ceph.client.admin.keyring`: Example response: -~~~ +~~~json response: { "jsonrpc": "2.0", @@ -3657,7 +3666,7 @@ name | Required | string | Bdev name Example request: -~~~ +~~~json { "params": { "name": "Rbd0" @@ -3670,7 +3679,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3699,7 +3708,7 @@ new_size | Required | int | New bdev size for resize oper Example request: -~~~ +~~~json { "params": { "name": "Rbd0" @@ -3713,7 +3722,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3745,7 +3754,7 @@ Name of newly created bdev. Example request: -~~~ +~~~json { "params": { "base_bdev_name": "Null0", @@ -3763,7 +3772,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3785,7 +3794,7 @@ name | Required | string | Bdev name Example request: -~~~ +~~~json { "params": { "name": "Delay0" @@ -3799,7 +3808,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3828,7 +3837,7 @@ Name of newly created bdev. Example request: -~~~ +~~~json { "params": { "delay_bdev_name": "Delay0", @@ -3843,7 +3852,7 @@ Example request: Example response: -~~~ +~~~json { "result": "true" } @@ -3863,7 +3872,7 @@ base_name | Required | string | Base bdev name Example request: -~~~ +~~~json { "params": { "base_name": "Malloc0" @@ -3876,7 +3885,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3902,7 +3911,7 @@ name | Required | string | Error bdev name Example request: -~~~ +~~~json { "params": { "name": "EE_Malloc0" @@ -3915,7 +3924,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3941,7 +3950,7 @@ num | Optional | int | the number of commands you wa Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_error_inject_error", @@ -3957,7 +3966,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -3987,7 +3996,7 @@ Name of newly created bdev. Example request: -~~~ +~~~json { "params": { "url": "iscsi://127.0.0.1/iqn.2016-06.io.spdk:disk1/0", @@ -4002,7 +4011,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4026,7 +4035,7 @@ name | Required | string | Bdev name Example request: -~~~ +~~~json { "params": { "name": "iSCSI0" @@ -4039,7 +4048,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4072,7 +4081,7 @@ Name of newly created bdev. Example request: -~~~ +~~~json { "params": { "name": "nvme0" @@ -4089,7 +4098,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4116,7 +4125,7 @@ name | Required | string | Bdev name Example request: -~~~ +~~~json { "params": { "name": "nvme0" @@ -4129,7 +4138,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4141,7 +4150,7 @@ Example response: Create a @ref bdev_config_pmem blk pool file. It is equivalent of following `pmempool create` command: -~~~ +~~~bash pmempool create -s $((num_blocks * block_size)) blk $block_size $pmem_file ~~~ @@ -4159,7 +4168,7 @@ block_size | Required | number | Size of each block in bytes Example request: -~~~ +~~~json { "params": { "block_size": 512, @@ -4174,7 +4183,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4207,7 +4216,7 @@ block_size | number | Size of each block in bytes Example request: -~~~ +~~~json request: { "params": { @@ -4221,7 +4230,7 @@ request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4251,7 +4260,7 @@ pmem_file | Required | string | Path to new pmem file Example request: -~~~ +~~~json { "params": { "pmem_file": "/tmp/pmem_file" @@ -4264,7 +4273,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4293,7 +4302,7 @@ Name of newly created bdev. Example request: -~~~ +~~~json { "params": { "pmem_file": "/tmp/pmem_file", @@ -4307,7 +4316,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4335,7 +4344,7 @@ name | Required | string | Bdev name Example request: -~~~ +~~~json { "params": { "name": "Pmem0" @@ -4348,7 +4357,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4376,7 +4385,7 @@ Name of newly created bdev. Example request: -~~~ +~~~json { "params": { "base_bdev_name": "Malloc0", @@ -4390,7 +4399,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4412,7 +4421,7 @@ name | Required | string | Bdev name Example request: -~~~ +~~~json { "params": { "name": "Passsthru0" @@ -4426,7 +4435,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4462,7 +4471,7 @@ Array of names of newly created bdevs. Example request: -~~~ +~~~json { "params": { "name": "VirtioScsi0", @@ -4480,7 +4489,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4504,7 +4513,7 @@ Array of Virtio SCSI information objects. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_virtio_scsi_get_devices", @@ -4514,7 +4523,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4546,7 +4555,7 @@ name | Required | string | Virtio name Example request: -~~~ +~~~json { "params": { "name": "VirtioUser0" @@ -4560,7 +4569,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4590,7 +4599,7 @@ True the rpc is successful otherwise false Example request: -~~~ +~~~json { "params": { "enable": "true", @@ -4604,7 +4613,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4657,7 +4666,7 @@ Parameters `disable_chap` and `require_chap` are mutually exclusive. Parameters Example request: -~~~ +~~~json { "params": { "allow_duplicated_isid": true, @@ -4680,7 +4689,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4700,7 +4709,7 @@ This method has no parameters. Example request: -~~~ +~~~json request: { "jsonrpc": "2.0", @@ -4711,7 +4720,7 @@ request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4751,7 +4760,7 @@ This method has no parameters. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "scsi_get_devices", @@ -4761,7 +4770,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4793,7 +4802,7 @@ Parameters `disable_chap` and `require_chap` are mutually exclusive. Example request: -~~~ +~~~json request: { "params": { @@ -4809,7 +4818,7 @@ request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4841,7 +4850,7 @@ msecret | Optional | string | Bidirectional CHAP secret Example request: -~~~ +~~~json { "params": { "secrets": [ @@ -4862,7 +4871,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4884,7 +4893,7 @@ tag | Required | number | Authentication group tag (uni Example request: -~~~ +~~~json { "params": { "tag": 2 @@ -4897,7 +4906,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4926,16 +4935,17 @@ secrets | array | Array of @ref rpc_iscsi_create_auth_grou Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "iscsi_get_auth_groups", "id": 1 } ~~~ + Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -4982,7 +4992,7 @@ msecret | Optional | string | Bidirectional CHAP secret Example request: -~~~ +~~~json { "params": { "muser": "mu3", @@ -4995,11 +5005,11 @@ Example request: "method": "iscsi_auth_group_add_secret", "id": 1 } -~~~ +~~~json Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5022,7 +5032,7 @@ user | Required | string | Unidirectional CHAP name Example request: -~~~ +~~~json { "params": { "tag": 2, @@ -5036,7 +5046,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5066,7 +5076,7 @@ netmasks | array | Array of initiator netmasks Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "iscsi_get_initiator_groups", @@ -5076,7 +5086,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5111,7 +5121,7 @@ netmasks | Required | array | Not empty array of initiator Example request: -~~~ +~~~json { "params": { "initiators": [ @@ -5131,7 +5141,7 @@ Example request: Example response: -~~~ +~~~json response: { "jsonrpc": "2.0", @@ -5154,7 +5164,7 @@ tag | Required | number | Initiator group tag (unique, Example request: -~~~ +~~~json { "params": { "tag": 1 @@ -5167,7 +5177,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5191,7 +5201,7 @@ netmasks | Optional | array | Array of initiator netmasks Example request: -~~~ +~~~json request: { "params": { @@ -5211,7 +5221,7 @@ request: Example response: -~~~ +~~~json response: { "jsonrpc": "2.0", @@ -5236,7 +5246,7 @@ netmasks | Optional | array | Array of initiator netmasks Example request: -~~~ +~~~json request: { "params": { @@ -5256,7 +5266,7 @@ request: Example response: -~~~ +~~~json response: { "jsonrpc": "2.0", @@ -5295,7 +5305,7 @@ data_digest | boolean | Data Digest should be required for this Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "iscsi_get_target_nodes", @@ -5305,7 +5315,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5363,7 +5373,7 @@ Parameters `disable_chap` and `require_chap` are mutually exclusive. Example request: -~~~ +~~~json { "params": { "luns": [ @@ -5398,7 +5408,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5426,7 +5436,7 @@ Parameters `disable_chap` and `require_chap` are mutually exclusive. Example request: -~~~ +~~~json { "params": { "chap_group": 1, @@ -5442,7 +5452,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5472,7 +5482,7 @@ pg_tag | Required | number | Existing portal group tag Example request: -~~~ +~~~json { "params": { "pg_ig_maps": [ @@ -5499,7 +5509,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5529,7 +5539,7 @@ pg_tag | Required | number | Existing portal group tag Example request: -~~~ +~~~json { "params": { "pg_ig_maps": [ @@ -5556,7 +5566,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5578,7 +5588,7 @@ name | Required | string | Target node name (ASCII) Example request: -~~~ +~~~json { "params": { "name": "iqn.2016-06.io.spdk:target1" @@ -5591,7 +5601,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5611,7 +5621,7 @@ This method has no parameters. Example request: -~~~ +~~~json request: { "jsonrpc": "2.0", @@ -5622,7 +5632,7 @@ request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5665,7 +5675,7 @@ port | Required | string | Port number Example request: -~~~ +~~~json { "params": { "portals": [ @@ -5684,7 +5694,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5707,7 +5717,7 @@ tag | Required | number | Existing portal group tag Example request: -~~~ +~~~json { "params": { "tag": 1 @@ -5720,7 +5730,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5742,7 +5752,7 @@ tag | Required | number | Existing portal group tag Example request: -~~~ +~~~json { "params": { "tag": 1 @@ -5755,7 +5765,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5783,7 +5793,7 @@ Parameters `disable_chap` and `require_chap` are mutually exclusive. Example request: -~~~ +~~~json request: { "params": { @@ -5800,7 +5810,7 @@ request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5834,7 +5844,7 @@ target_node_name | string | Target node name (ASCII) without prefix Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "iscsi_get_connections", @@ -5844,7 +5854,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5878,7 +5888,7 @@ lun_id | Optional | number | LUN ID (default: first free I Example request: -~~~ +~~~json { "params": { "lun_id": 2, @@ -5893,7 +5903,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5920,7 +5930,7 @@ If both redirect_host and redirect_port are omitted, clear the redirect portal. Example request: -~~~ +~~~json { "params": { "name": "iqn.2016-06.io.spdk:target1", @@ -5936,7 +5946,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -5960,7 +5970,7 @@ pg_tag | Optional | number | Existing portal group tag Example request: -~~~ +~~~json { "params": { "name": "iqn.2016-06.io.spdk:target1", @@ -5974,7 +5984,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6017,7 +6027,7 @@ no_wr_batching | Optional | boolean | Disable work requests batchin Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "nvmf_create_transport", @@ -6031,7 +6041,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6051,7 +6061,7 @@ tgt_name | Optional | string | Parent NVMe-oF target nam Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6061,7 +6071,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6121,7 +6131,7 @@ max_cntlid | Optional | number | Maximum controller ID. Defaul Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6137,7 +6147,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6160,7 +6170,7 @@ tgt_name | Optional | string | Parent NVMe-oF target name. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6173,7 +6183,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6206,7 +6216,7 @@ trsvcid | Optional | string | Transport service ID (require Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6225,7 +6235,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6249,7 +6259,7 @@ listen_address | Required | object | @ref rpc_nvmf_listen_address Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6268,7 +6278,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6295,7 +6305,7 @@ anagrpid | Optional | number | ANA group ID Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6315,7 +6325,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6351,7 +6361,7 @@ anagrpid | Optional | number | ANA group ID. Default: Namesp Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6369,7 +6379,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6393,7 +6403,7 @@ tgt_name | Optional | string | Parent NVMe-oF target name. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6407,7 +6417,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6431,7 +6441,7 @@ tgt_name | Optional | string | Parent NVMe-oF target name. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6445,7 +6455,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6469,7 +6479,7 @@ tgt_name | Optional | string | Parent NVMe-oF target name. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6483,7 +6493,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6507,7 +6517,7 @@ tgt_name | Optional | string | Parent NVMe-oF target name. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6521,7 +6531,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6542,7 +6552,7 @@ tgt_name | Optional | string | Parent NVMe-oF target name. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6555,7 +6565,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6583,7 +6593,7 @@ tgt_name | Optional | string | Parent NVMe-oF target name. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6596,7 +6606,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6640,7 +6650,7 @@ tgt_name | Optional | string | Parent NVMe-oF target name. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6653,7 +6663,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6686,7 +6696,7 @@ max_subsystems | Required | number | Maximum number of NVMe-oF sub Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6699,7 +6709,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6730,7 +6740,7 @@ identify_ctrlr | Required | bool | If true, enables custom ident Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6743,7 +6753,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6763,7 +6773,7 @@ tgt_name | Optional | string | Parent NVMe-oF target nam Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6773,7 +6783,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6810,7 +6820,8 @@ In the response, `admin_qpairs` and `io_qpairs` are reflecting cumulative queue #### Example Example request: -~~~ + +~~~json { "jsonrpc": "2.0", "method": "nvmf_get_stats", @@ -6819,7 +6830,8 @@ Example request: ~~~ Example response: -~~~ + +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6920,7 +6932,7 @@ iops_threshold | Required | number | Coalescing activation level g Example request: -~~~ +~~~json { "params": { "iops_threshold": 100000, @@ -6935,7 +6947,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -6958,7 +6970,7 @@ cpumask | Optional | string | @ref cpu_mask for this contro Example request: -~~~ +~~~json { "params": { "cpumask": "0x2", @@ -6972,7 +6984,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7000,7 +7012,7 @@ SCSI target ID. Example request: -~~~ +~~~json { "params": { "scsi_target_num": 1, @@ -7015,7 +7027,7 @@ Example request: Example response: -~~~ +~~~json response: { "jsonrpc": "2.0", @@ -7041,7 +7053,7 @@ scsi_target_num | Required | number | SCSI target ID between 0 and Example request: -~~~ +~~~json request: { "params": { @@ -7056,7 +7068,7 @@ request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7084,7 +7096,7 @@ cpumask | Optional | string | @ref cpu_mask for this contro Example request: -~~~ +~~~json { "params": { "dev_name": "Malloc0", @@ -7098,7 +7110,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7173,7 +7185,7 @@ bdev | string | Backing bdev name Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "vhost_get_controllers", @@ -7183,7 +7195,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7271,7 +7283,7 @@ ctrlr | Required | string | Controller name Example request: -~~~ +~~~json { "params": { "ctrlr": "VhostNvme0" @@ -7284,7 +7296,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7329,7 +7341,7 @@ UUID of the created logical volume store is returned. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7344,7 +7356,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7369,7 +7381,7 @@ Either uuid or lvs_name must be specified, but not both. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_lvol_delete_lvstore", @@ -7382,7 +7394,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7408,7 +7420,7 @@ If both uuid and lvs_name are omitted, information about all logical volume stor Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_lvol_get_lvstores", @@ -7421,7 +7433,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7454,7 +7466,7 @@ new_name | Required | string | New logical volume store name Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_lvol_rename_lvstore", @@ -7468,7 +7480,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7502,7 +7514,7 @@ UUID of the created logical volume is returned. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_lvol_create", @@ -7519,7 +7531,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7546,7 +7558,7 @@ UUID of the created logical volume snapshot is returned. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_lvol_snapshot", @@ -7560,7 +7572,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7587,7 +7599,7 @@ UUID of the created logical volume clone is returned. Example request: -~~~ +~~~json { "jsonrpc": "2.0" "method": "bdev_lvol_clone", @@ -7601,7 +7613,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7624,7 +7636,7 @@ new_name | Required | string | New logical volume name Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_lvol_rename", @@ -7638,7 +7650,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7661,7 +7673,7 @@ size | Required | number | Desired size of the logical v Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_lvol_resize", @@ -7675,7 +7687,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7697,7 +7709,7 @@ name | Required | string | UUID or alias of the logical Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_lvol_set_read_only", @@ -7710,7 +7722,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7732,7 +7744,7 @@ name | Required | string | UUID or alias of the logical Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_lvol_delete", @@ -7745,7 +7757,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7768,7 +7780,7 @@ name | Required | string | UUID or alias of the logical Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_lvol_inflate", @@ -7781,7 +7793,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7805,7 +7817,7 @@ name | Required | string | UUID or alias of the logical Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_lvol_decouple_parent", @@ -7818,7 +7830,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7847,7 +7859,7 @@ category | Required | string | all or online or configuring Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_raid_get_bdevs", @@ -7860,7 +7872,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7887,7 +7899,7 @@ base_bdevs | Required | string | Base bdevs name, whitespace s Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_raid_create", @@ -7908,7 +7920,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7930,7 +7942,7 @@ name | Required | string | RAID bdev name Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_raid_delete", @@ -7943,7 +7955,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -7969,7 +7981,7 @@ split_size_mb | Optional | number | size in MB to restrict the si Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_split_create", @@ -7983,7 +7995,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8010,7 +8022,7 @@ base_bdev | Required | string | base bdev name Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_split_delete", @@ -8023,7 +8035,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8049,7 +8061,7 @@ block_size | Optional | number | block size of device (If omit Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_uring_create", @@ -8064,7 +8076,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8086,7 +8098,7 @@ name | Required | string | name of uring bdev to delete Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_uring_delete", @@ -8099,7 +8111,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8124,7 +8136,7 @@ password | Required | string | admin password of OPAL Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_nvme_opal_init", @@ -8138,7 +8150,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8161,7 +8173,7 @@ password | Required | string | admin password of OPAL Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_nvme_opal_revert", @@ -8175,7 +8187,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8206,7 +8218,7 @@ The response is the name of created OPAL virtual bdev. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_opal_create", @@ -8224,7 +8236,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8251,7 +8263,7 @@ The response is the locking info of OPAL virtual bdev. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_opal_get_info", @@ -8265,7 +8277,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8296,7 +8308,7 @@ password | Required | string | admin password Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_opal_delete", @@ -8310,7 +8322,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8336,7 +8348,7 @@ user_password | Required | string | user password Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_opal_new_user", @@ -8352,7 +8364,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8377,7 +8389,7 @@ lock_state | Required | string | lock state Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_opal_set_lock_state", @@ -8393,7 +8405,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8419,7 +8431,7 @@ The response is an array of strings - supported RPC notification types. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "notify_get_types", @@ -8429,7 +8441,7 @@ Example request: Example response: -~~~ +~~~json { "id": 1, "result": [ @@ -8468,7 +8480,7 @@ ctx | Optional | string | Event context. Example request: -~~~ +~~~json { "id": 1, "jsonrpc": "2.0", @@ -8483,7 +8495,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8528,7 +8540,7 @@ Path of exported NBD disk Example request: -~~~ +~~~json { "params": { "nbd_device": "/dev/nbd1", @@ -8542,7 +8554,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8564,7 +8576,7 @@ nbd_device | Required | string | NBD device name to stop Example request: -~~~ +~~~json { "params": { "nbd_device": "/dev/nbd1", @@ -8577,7 +8589,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8603,7 +8615,7 @@ The response is an array of exported NBD devices and their corresponding SPDK bd Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "nbd_get_disks", @@ -8613,7 +8625,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8650,7 +8662,7 @@ True if a blobfs exists on the bdev; False otherwise. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8663,7 +8675,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8686,7 +8698,7 @@ cluster_sz | Optional | number | Size of cluster in bytes. Mus Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8700,7 +8712,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8723,7 +8735,7 @@ mountpoint | Required | string | Mountpoint path in host to mo Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8737,7 +8749,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8766,7 +8778,7 @@ True if cache size is set successfully; False if failed to set. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8779,7 +8791,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8807,7 +8819,7 @@ Response is an object with current socket layer options for requested implementa Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "sock_impl_get_options", @@ -8820,7 +8832,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8861,7 +8873,7 @@ True if socket layer options were set successfully. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "sock_impl_set_options", @@ -8881,7 +8893,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8907,7 +8919,7 @@ True if the default socket layer configuration was set successfully. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "sock_set_default_impl", @@ -8920,7 +8932,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -8963,7 +8975,7 @@ metadata | string | Metadata transferred from controller to Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "bdev_nvme_send_cmd", @@ -8980,7 +8992,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, @@ -9008,7 +9020,7 @@ Completion status of enumeration is returned as a boolean. Example request: -~~~ +~~~json { "jsonrpc": "2.0", "method": "enable_vmd", @@ -9018,7 +9030,7 @@ Example request: Example response: -~~~ +~~~json { "jsonrpc": "2.0", "id": 1, diff --git a/doc/jsonrpc_proxy.md b/doc/jsonrpc_proxy.md index 945ff3260..672d3d9e9 100644 --- a/doc/jsonrpc_proxy.md +++ b/doc/jsonrpc_proxy.md @@ -31,7 +31,7 @@ Status 200 with resultant JSON object included on success. Below is a sample python script acting as a client side. It sends `bdev_get_bdevs` method with optional `name` parameter and prints JSON object returned from remote_rpc script. -~~~ +~~~python import json import requests @@ -48,7 +48,7 @@ if __name__ == '__main__': Output: -~~~ +~~~python python client.py [{u'num_blocks': 2621440, u'name': u'Malloc0', u'uuid': u'fb57e59c-599d-42f1-8b89-3e46dbe12641', u'claimed': True, u'driver_specific': {}, u'supported_io_types': {u'reset': True, u'nvme_admin': False, u'unmap': True, u'read': True, diff --git a/doc/lvol.md b/doc/lvol.md index cdfd110e4..977ec27ea 100644 --- a/doc/lvol.md +++ b/doc/lvol.md @@ -97,7 +97,7 @@ logical volumes is kept on block devices. RPC regarding lvolstore: -``` +```bash bdev_lvol_create_lvstore [-h] [-c CLUSTER_SZ] bdev_name lvs_name Constructs lvolstore on specified bdev with specified name. During construction bdev is unmapped at initialization and all data is @@ -129,7 +129,7 @@ bdev_lvol_rename_lvstore [-h] old_name new_name RPC regarding lvol and spdk bdev: -``` +```bash bdev_lvol_create [-h] [-u UUID] [-l LVS_NAME] [-t] [-c CLEAR_METHOD] lvol_name size Creates lvol with specified size and name on lvolstore specified by its uuid or name. Then constructs spdk bdev on top of that lvol and presents it as spdk bdev. diff --git a/doc/nvme.md b/doc/nvme.md index 5536589c3..6ba564e58 100644 --- a/doc/nvme.md +++ b/doc/nvme.md @@ -131,7 +131,7 @@ E.g. To send fused compare and write operation user must call spdk_nvme_ns_cmd_c followed with spdk_nvme_ns_cmd_write and make sure no other operations are submitted in between on the same queue, like in example below: -~~~ +~~~c rc = spdk_nvme_ns_cmd_compare(ns, qpair, cmp_buf, 0, 1, nvme_fused_first_cpl_cb, NULL, SPDK_NVME_CMD_FUSE_FIRST); if (rc != 0) { diff --git a/doc/nvmf_tracing.md b/doc/nvmf_tracing.md index e9caa13a9..a7994fea9 100644 --- a/doc/nvmf_tracing.md +++ b/doc/nvmf_tracing.md @@ -17,14 +17,14 @@ Tracepoints are placed in groups. They are enabled and disabled as a group. To e the instrumentation of all the tracepoints group in an SPDK target application, start the target with -e parameter set to 0xFFFF: -~~~ +~~~bash build/bin/nvmf_tgt -e 0xFFFF ~~~ To enable the instrumentation of just the NVMe-oF RDMA tracepoints in an SPDK target application, start the target with the -e parameter set to 0x10: -~~~ +~~~bash build/bin/nvmf_tgt -e 0x10 ~~~ @@ -32,7 +32,7 @@ When the target starts, a message is logged with the information you need to vie the tracepoints in a human-readable format using the spdk_trace application. The target will also log information about the shared memory file. -~~~{.sh} +~~~bash app.c: 527:spdk_app_setup_trace: *NOTICE*: Tracepoint Group Mask 0xFFFF specified. app.c: 531:spdk_app_setup_trace: *NOTICE*: Use 'spdk_trace -s nvmf -p 24147' to capture a snapshot of events at runtime. app.c: 533:spdk_app_setup_trace: *NOTICE*: Or copy /dev/shm/nvmf_trace.pid24147 for offline analysis/debug. @@ -49,14 +49,14 @@ Send I/Os to the SPDK target application to generate events. The following is an example usage of perf to send I/Os to the NVMe-oF target over an RDMA network interface for 10 minutes. -~~~ +~~~bash ./perf -q 128 -s 4096 -w randread -t 600 -r 'trtype:RDMA adrfam:IPv4 traddr:192.168.100.2 trsvcid:4420' ~~~ The spdk_trace program can be found in the app/trace directory. To analyze the tracepoints on the same system running the NVMe-oF target, simply execute the command line shown in the log: -~~~{.sh} +~~~bash build/bin/spdk_trace -s nvmf -p 24147 ~~~ @@ -64,13 +64,13 @@ To analyze the tracepoints on a different system, first prepare the tracepoint f tracepoint file can be large, but usually compresses very well. This step can also be used to prepare a tracepoint file to attach to a GitHub issue for debugging NVMe-oF application crashes. -~~~{.sh} +~~~bash bzip2 -c /dev/shm/nvmf_trace.pid24147 > /tmp/trace.bz2 ~~~ After transferring the /tmp/trace.bz2 tracepoint file to a different system: -~~~{.sh} +~~~bash bunzip2 /tmp/trace.bz2 build/bin/spdk_trace -f /tmp/trace ~~~ @@ -79,7 +79,7 @@ The following is sample trace capture showing the cumulative time that each I/O spends at each RDMA state. All the trace captures with the same id are for the same I/O. -~~~ +~~~bash 28: 6026.658 ( 12656064) RDMA_REQ_NEED_BUFFER id: r3622 time: 0.019 28: 6026.694 ( 12656140) RDMA_REQ_RDY_TO_EXECUTE id: r3622 time: 0.055 28: 6026.820 ( 12656406) RDMA_REQ_EXECUTING id: r3622 time: 0.182 @@ -135,20 +135,20 @@ spdk_trace_record is used to poll the spdk tracepoint shared memory, record new and store all entries into specified output file at its shutdown on SIGINT or SIGTERM. After SPDK nvmf target is launched, simply execute the command line shown in the log: -~~~{.sh} +~~~bash build/bin/spdk_trace_record -q -s nvmf -p 24147 -f /tmp/spdk_nvmf_record.trace ~~~ Also send I/Os to the SPDK target application to generate events by previous perf example for 10 minutes. -~~~{.sh} +~~~bash ./perf -q 128 -s 4096 -w randread -t 600 -r 'trtype:RDMA adrfam:IPv4 traddr:192.168.100.2 trsvcid:4420' ~~~ After the completion of perf example, shut down spdk_trace_record by signal SIGINT (Ctrl + C). To analyze the tracepoints output file from spdk_trace_record, simply run spdk_trace program by: -~~~{.sh} +~~~bash build/bin/spdk_trace -f /tmp/spdk_nvmf_record.trace ~~~ @@ -159,7 +159,7 @@ tracepoints to the existing trace groups. For example, to add a new tracepoints to the SPDK RDMA library (lib/nvmf/rdma.c) trace group TRACE_GROUP_NVMF_RDMA, define the tracepoints and assigning them a unique ID using the SPDK_TPOINT_ID macro: -~~~ +~~~c #define TRACE_GROUP_NVMF_RDMA 0x4 #define TRACE_RDMA_REQUEST_STATE_NEW SPDK_TPOINT_ID(TRACE_GROUP_NVMF_RDMA, 0x0) ... @@ -170,7 +170,7 @@ You also need to register the new trace points in the SPDK_TRACE_REGISTER_FN mac within the application/library using the spdk_trace_register_description function as shown below: -~~~ +~~~c SPDK_TRACE_REGISTER_FN(nvmf_trace) { spdk_trace_register_object(OBJECT_NVMF_RDMA_IO, 'r'); @@ -191,7 +191,7 @@ application/library to record the current trace state for the new trace points. The following example shows the usage of the spdk_trace_record function to record the current trace state of several tracepoints. -~~~ +~~~c case RDMA_REQUEST_STATE_NEW: spdk_trace_record(TRACE_RDMA_REQUEST_STATE_NEW, 0, 0, (uintptr_t)rdma_req, (uintptr_t)rqpair->cm_id); ... diff --git a/doc/pkgconfig.md b/doc/pkgconfig.md index 181b2ea60..69f377c3c 100644 --- a/doc/pkgconfig.md +++ b/doc/pkgconfig.md @@ -8,21 +8,21 @@ when SPDK adds or modifies library dependencies. If your application is using the SPDK nvme library, you would use the following to get the list of required SPDK libraries: -~~~ +~~~bash PKG_CONFIG_PATH=/path/to/spdk/build/lib/pkgconfig pkg-config --libs spdk_nvme ~~~ To get the list of required SPDK and DPDK libraries to use the DPDK-based environment layer: -~~~ +~~~bash PKG_CONFIG_PATH=/path/to/spdk/build/lib/pkgconfig pkg-config --libs spdk_env_dpdk ~~~ When linking with static libraries, the dependent system libraries must also be specified. To get the list of required system libraries: -~~~ +~~~bash PKG_CONFIG_PATH=/path/to/spdk/build/lib/pkgconfig pkg-config --libs spdk_syslibs ~~~ @@ -33,7 +33,7 @@ the `-Wl,--no-as-needed` parameters while with static libraries `-Wl,--whole-arc is used. Here is an example Makefile snippet that shows how to use pkg-config to link an application that uses the SPDK nvme shared library: -~~~ +~~~bash PKG_CONFIG_PATH = $(SPDK_DIR)/build/lib/pkgconfig SPDK_LIB := $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" pkg-config --libs spdk_nvme DPDK_LIB := $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" pkg-config --libs spdk_env_dpdk @@ -44,7 +44,7 @@ app: If using the SPDK nvme static library: -~~~ +~~~bash PKG_CONFIG_PATH = $(SPDK_DIR)/build/lib/pkgconfig SPDK_LIB := $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" pkg-config --libs spdk_nvme DPDK_LIB := $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" pkg-config --libs spdk_env_dpdk diff --git a/doc/system_configuration.md b/doc/system_configuration.md index 7c594368d..8b3997d8d 100644 --- a/doc/system_configuration.md +++ b/doc/system_configuration.md @@ -115,7 +115,7 @@ shared by its vhost clients as described in the Open the `/etc/security/limits.conf` file as root and append the following: -``` +```bash spdk hard memlock unlimited spdk soft memlock unlimited ``` diff --git a/doc/usdt.md b/doc/usdt.md index ee5cdf21a..19ff05626 100644 --- a/doc/usdt.md +++ b/doc/usdt.md @@ -28,7 +28,7 @@ flex We have found issues with the packaged bpftrace on both Ubuntu 20.04 and Fedora 33. So bpftrace should be built and installed from source. -``` +```bash git clone https://github.com/iovisor/bpftrace.git mkdir bpftrace/build cd bpftrace/build @@ -42,7 +42,7 @@ sudo make install bpftrace.sh is a helper script that facilitates running bpftrace scripts against a running SPDK application. Here is a typical usage: -``` +```bash scripts/bpftrace.sh `pidof spdk_tgt` scripts/bpf/nvmf.bt ``` @@ -58,7 +58,7 @@ that string with the PID provided to the script. ## Configuring SPDK Build -``` +```bash ./configure --with-usdt ``` @@ -66,13 +66,13 @@ that string with the PID provided to the script. From first terminal: -``` +```bash build/bin/spdk_tgt -m 0xC ``` From second terminal: -``` +```bash scripts/bpftrace.sh `pidof spdk_tgt` scripts/bpf/nvmf.bt ``` @@ -81,7 +81,7 @@ group info state transitions. From third terminal: -``` +```bash scripts/rpc.py < The purpose of virtio and [virtio] specification is that virtual environments +> and guests should have a straightforward, efficient, standard and extensible +> mechanism for virtual devices, rather than boutique per-environment or per-OS +> mechanisms. Virtio devices use virtqueues to transport data efficiently. Virtqueue is a set of three different single-producer, single-consumer ring structures designed to @@ -47,23 +45,21 @@ SPDK to expose a vhost device is Vhost-user protocol. The [Vhost-user specification](https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/interop/vhost-user.txt;hb=HEAD) describes the protocol as follows: -``` -[Vhost-user protocol] is aiming to complement the ioctl interface used to -control the vhost implementation in the Linux kernel. It implements the control -plane needed to establish virtqueue sharing with a user space process on the -same host. It uses communication over a Unix domain socket to share file -descriptors in the ancillary data of the message. - -The protocol defines 2 sides of the communication, master and slave. Master is -the application that shares its virtqueues, in our case QEMU. Slave is the -consumer of the virtqueues. - -In the current implementation QEMU is the Master, and the Slave is intended to -be a software Ethernet switch running in user space, such as Snabbswitch. - -Master and slave can be either a client (i.e. connecting) or server (listening) -in the socket communication. -``` +> [Vhost-user protocol] is aiming to complement the ioctl interface used to +> control the vhost implementation in the Linux kernel. It implements the control +> plane needed to establish virtqueue sharing with a user space process on the +> same host. It uses communication over a Unix domain socket to share file +> descriptors in the ancillary data of the message. +> +> The protocol defines 2 sides of the communication, master and slave. Master is +> the application that shares its virtqueues, in our case QEMU. Slave is the +> consumer of the virtqueues. +> +> In the current implementation QEMU is the Master, and the Slave is intended to +> be a software Ethernet switch running in user space, such as Snabbswitch. +> +> Master and slave can be either a client (i.e. connecting) or server (listening) +> in the socket communication. SPDK vhost is a Vhost-user slave server. It exposes Unix domain sockets and allows external applications to connect. @@ -125,7 +121,7 @@ the request data, and putting guest addresses of those buffers into virtqueues. A Virtio-Block request looks as follows. -``` +```c struct virtio_blk_req { uint32_t type; // READ, WRITE, FLUSH (read-only) uint64_t offset; // offset in the disk (read-only) @@ -135,7 +131,7 @@ struct virtio_blk_req { ``` And a Virtio-SCSI request as follows. -``` +```c struct virtio_scsi_req_cmd { struct virtio_scsi_cmd_req *req; // request data (read-only) struct iovec read_only_buffers[]; // scatter-gatter list for WRITE I/Os @@ -149,7 +145,7 @@ to be converted into a chain of such descriptors. A single descriptor can be either readable or writable, so each I/O request consists of at least two (request + response). -``` +```c struct virtq_desc { /* Address (guest-physical). */ le64 addr; diff --git a/examples/nvme/perf/README.md b/examples/nvme/perf/README.md index e5ec38d12..183bcccaa 100644 --- a/examples/nvme/perf/README.md +++ b/examples/nvme/perf/README.md @@ -2,4 +2,6 @@ To use perf test on FreeBSD over NVMe-oF, explicitly link userspace library of HBA. For example, on a setup with Mellanox HBA, +```make LIBS += -lmlx5 +``` diff --git a/mdl_rules.rb b/mdl_rules.rb index 21b8c380b..d6aa3e4e8 100644 --- a/mdl_rules.rb +++ b/mdl_rules.rb @@ -8,6 +8,5 @@ rule 'MD029', :style => "ordered" exclude_rule 'MD031' exclude_rule 'MD033' exclude_rule 'MD034' -exclude_rule 'MD040' exclude_rule 'MD041' exclude_rule 'MD046' diff --git a/scripts/vagrant/README.md b/scripts/vagrant/README.md index 73d18ad2e..617b2ab01 100644 --- a/scripts/vagrant/README.md +++ b/scripts/vagrant/README.md @@ -22,7 +22,7 @@ Quick start instructions for OSX: * Note: The extension pack has different licensing than main VirtualBox, please review them carefully as the evaluation license is for personal use only. -``` +```bash /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew doctor brew update @@ -69,7 +69,7 @@ If you are behind a corporate firewall, configure the following proxy settings. 1. Set the http_proxy and https_proxy 2. Install the proxyconf plugin -``` +```bash $ export http_proxy=.... $ export https_proxy=.... $ vagrant plugin install vagrant-proxyconf @@ -93,7 +93,7 @@ Use the `spdk/scripts/vagrant/create_vbox.sh` script to create a VM of your choi - fedora28 - freebsd11 -``` +```bash $ spdk/scripts/vagrant/create_vbox.sh -h Usage: create_vbox.sh [-n ] [-s ] [-x ] [-hvrld] @@ -124,7 +124,7 @@ It is recommended that you call the `create_vbox.sh` script from outside of the Call this script from a parent directory. This will allow the creation of multiple VMs in separate directories, all using the same spdk repository. For example: -``` +```bash $ spdk/scripts/vagrant/create_vbox.sh -s 2048 -n 2 fedora26 ``` @@ -141,7 +141,7 @@ This script will: This arrangement allows the provisioning of multiple, different VMs within that same directory hierarchy using thesame spdk repository. Following the creation of the vm you'll need to ssh into your virtual box and finish the VM initialization. -``` +```bash $ cd $ vagrant ssh ``` @@ -152,7 +152,7 @@ A copy of the `spdk` repository you cloned will exist in the `spdk_repo` directo account. After using `vagrant ssh` to enter your VM you must complete the initialization of your VM by running the `scripts/vagrant/update.sh` script. For example: -``` +```bash $ script -c 'sudo spdk_repo/spdk/scripts/vagrant/update.sh' update.log ``` @@ -175,14 +175,14 @@ Following VM initialization you must: ### Verify you have an emulated NVMe device -``` +```bash $ lspci | grep "Non-Volatile" 00:0e.0 Non-Volatile memory controller: InnoTek Systemberatung GmbH Device 4e56 ``` ### Compile SPDK -``` +```bash $ cd spdk_repo/spdk $ git submodule update --init $ ./configure --enable-debug @@ -191,7 +191,7 @@ Following VM initialization you must: ### Run the hello_world example script -``` +```bash $ sudo scripts/setup.sh $ sudo scripts/gen_nvme.sh --json-with-subsystems > ./build/examples/hello_bdev.json $ sudo ./build/examples/hello_bdev --json ./build/examples/hello_bdev.json -b Nvme0n1 @@ -202,7 +202,7 @@ Following VM initialization you must: After running vm_setup.sh the `run-autorun.sh` can be used to run `spdk/autorun.sh` on a Fedora vagrant machine. Note that the `spdk/scripts/vagrant/autorun-spdk.conf` should be copied to `~/autorun-spdk.conf` before starting your tests. -``` +```bash $ cp spdk/scripts/vagrant/autorun-spdk.conf ~/ $ spdk/scripts/vagrant/run-autorun.sh -h Usage: scripts/vagrant/run-autorun.sh -d [-h] | [-q] | [-n] @@ -224,7 +224,7 @@ Note that the `spdk/scripts/vagrant/autorun-spdk.conf` should be copied to `~/au The following steps are done by the `update.sh` script. It is recommended that you capture the output of `update.sh` with a typescript. E.g.: -``` +```bash $ script update.log sudo spdk_repo/spdk/scripts/vagrant/update.sh ``` @@ -232,7 +232,7 @@ The following steps are done by the `update.sh` script. It is recommended that y 1. Installs the needed FreeBSD packages on the system by calling pkgdep.sh 2. Installs the FreeBSD source in /usr/src -``` +```bash $ sudo pkg upgrade -f $ sudo spdk_repo/spdk/scripts/pkgdep.sh --all $ sudo git clone --depth 10 -b releases/11.1.0 https://github.com/freebsd/freebsd.git /usr/src @@ -240,7 +240,7 @@ The following steps are done by the `update.sh` script. It is recommended that y To build spdk on FreeBSD use `gmake MAKE=gmake`. E.g.: -``` +```bash $ cd spdk_repo/spdk $ git submodule update --init $ ./configure --enable-debug diff --git a/test/app/fuzz/iscsi_fuzz/README.md b/test/app/fuzz/iscsi_fuzz/README.md index bc86fe173..28cb5090c 100644 --- a/test/app/fuzz/iscsi_fuzz/README.md +++ b/test/app/fuzz/iscsi_fuzz/README.md @@ -25,6 +25,6 @@ script for targeted debugging on a subsequent run. At the end of each test run, a summary is printed in the following format: -~~~ +~~~bash device 0x11c3b90 stats: Sent 1543 valid opcode PDUs, 16215 invalid opcode PDUs. ~~~ diff --git a/test/app/fuzz/nvme_fuzz/README.md b/test/app/fuzz/nvme_fuzz/README.md index c07bd69d4..454054450 100644 --- a/test/app/fuzz/nvme_fuzz/README.md +++ b/test/app/fuzz/nvme_fuzz/README.md @@ -26,7 +26,7 @@ This can be overridden with the -V flag. if -V is specified, each command will b it is completed in the JSON format specified above. At the end of each test run, a summary is printed for each namespace in the following format: -~~~ +~~~bash NS: 0x200079262300 admin qp, Total commands completed: 462459, total successful commands: 1960, random_seed: 4276918833 ~~~ diff --git a/test/app/fuzz/vhost_fuzz/README.md b/test/app/fuzz/vhost_fuzz/README.md index 029ad203e..038d171e7 100644 --- a/test/app/fuzz/vhost_fuzz/README.md +++ b/test/app/fuzz/vhost_fuzz/README.md @@ -38,7 +38,7 @@ submitted to the proper block devices. The vhost fuzzer differs from the NVMe fuzzer in that it expects devices to be configured via rpc. The fuzzer should always be started with the --wait-for-rpc argument. Please see below for an example of starting the fuzzer. -~~~ +~~~bash ./test/app/fuzz/vhost_fuzz/vhost_fuzz -t 30 --wait-for-rpc & ./scripts/rpc.py fuzz_vhost_create_dev -s ./Vhost.1 -b -V ./scripts/rpc.py fuzz_vhost_create_dev -s ./naa.VhostScsi0.1 -l -V diff --git a/test/external_code/README.md b/test/external_code/README.md index edf43911e..6493491f1 100644 --- a/test/external_code/README.md +++ b/test/external_code/README.md @@ -8,7 +8,7 @@ This directory also contains a convenient test script, test_make.sh, which autom and testing all six of these linker options. It takes a single argument, the path to an SPDK repository and should be run as follows: -~~~ +~~~bash sudo ./test_make.sh /path/to/spdk ~~~