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> |
||
---|---|---|
.. | ||
rpc | ||
spdkcli | ||
__init__.py |