Spdk/python/spdk/rpc
Shuhei Matsumoto 2a6a64485c bdev/nvme: Add bdev_nvme_get_io_paths RPC to monitor I/O path states
Add an new RPC bdev_nvme_get_io_paths to query all active I/O paths.

One io_path belongs to One nvme_bdev_channel.
Each nvme_bdev_channel is associated with one nvme_bdev.

If the RPC bdev_nvme_get_io_paths has a bdev name as a parameter
it can use spdk_for_each_channel() simply for the corresponding
nvme_bdev.

However, users will want to know I/O paths of all nvme_bdevs like
the RPC bdev_get_bdevs.

One io_path has one nvme_qpair. One nvme_qpair belongs to one
nvme_poll_group. By relying on these relationships, the RPC
bdev_nvme_get_io_paths traverses all nvme_poll_groups by using
spdk_for_each_channel() to g_bdev_nvme_ctrlrs.

The RPC bdev_nvme_get_io_paths has two modes, display all or
the specified NVMe bdev's active I/O paths.

The specified bdev name is used just for comparison and empty
array is returned if no matched io_path is found.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I4a0dbf3ef7aaa9a7b7345fc03dc493cc6d37bc99
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12146
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-04-22 09:44:57 +00:00
..
__init__.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
app.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
bdev.py bdev/nvme: Add bdev_nvme_get_io_paths RPC to monitor I/O path states 2022-04-22 09:44:57 +00:00
blobfs.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
client.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
cmd_parser.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
env_dpdk.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
helpers.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
idxd.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
ioat.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
iscsi.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
log.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
lvol.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
nbd.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
notify.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
nvme.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
nvmf.py nvmf/vfio-user: support shadow doorbells 2022-04-21 08:12:29 +00:00
pmem.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
sock.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
subsystem.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
trace.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
vhost.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00
vmd.py scripts: move python modules to python directory 2022-04-05 14:40:47 +00:00