bdev/nvme: Report host parameters when listing controllers via RPC
Change-Id: Ia3a73d63fd0e8b2eee29be4dc7ea8736f2ffb6ab Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9339 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
3875f287dd
commit
ae2ea64740
@ -427,6 +427,7 @@ rpc_dump_nvme_controller_info(struct nvme_ctrlr *nvme_ctrlr, void *ctx)
|
||||
{
|
||||
struct spdk_json_write_ctx *w = ctx;
|
||||
struct spdk_nvme_transport_id *trid;
|
||||
const struct spdk_nvme_ctrlr_opts *opts;
|
||||
|
||||
trid = nvme_ctrlr->connected_trid;
|
||||
|
||||
@ -447,6 +448,13 @@ rpc_dump_nvme_controller_info(struct nvme_ctrlr *nvme_ctrlr, void *ctx)
|
||||
nvme_bdev_dump_trid_json(trid, w);
|
||||
spdk_json_write_object_end(w);
|
||||
|
||||
opts = spdk_nvme_ctrlr_get_opts(nvme_ctrlr->ctrlr);
|
||||
|
||||
spdk_json_write_named_object_begin(w, "host");
|
||||
spdk_json_write_named_string(w, "nqn", opts->hostnqn);
|
||||
spdk_json_write_named_string(w, "addr", opts->src_addr);
|
||||
spdk_json_write_named_string(w, "svcid", opts->src_svcid);
|
||||
spdk_json_write_object_end(w);
|
||||
spdk_json_write_object_end(w);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user