nvmf: add interface to dump transport specific listen opts

transport specific options are already introduced however dump was missed

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I2fe533898d82534cc6cb8a3e5de4e2b2c72ae00a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9355
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Jacek Kalwas 2021-09-02 09:22:40 -04:00 committed by Tomasz Zawadzki
parent 1f094a9405
commit 86d7e4dc18
2 changed files with 10 additions and 0 deletions

View File

@ -259,6 +259,12 @@ struct spdk_nvmf_transport_ops {
int (*listen)(struct spdk_nvmf_transport *transport, const struct spdk_nvme_transport_id *trid,
struct spdk_nvmf_listen_opts *opts);
/**
* Dump transport-specific listen opts into JSON
*/
void (*listen_dump_opts)(struct spdk_nvmf_transport *transport,
const struct spdk_nvme_transport_id *trid, struct spdk_json_write_ctx *w);
/**
* Stop accepting new connections at the given address.
*/

View File

@ -136,6 +136,10 @@ nvmf_transport_listen_dump_opts(struct spdk_nvmf_transport *transport,
spdk_json_write_named_string(w, "traddr", trid->traddr);
spdk_json_write_named_string(w, "trsvcid", trid->trsvcid);
if (transport->ops->listen_dump_opts) {
transport->ops->listen_dump_opts(transport, trid, w);
}
spdk_json_write_object_end(w);
}