nvmf : fix custom trtype no right in nvmf_tgt_write_config_json
When user used CUSTOM transport, follow this step can reproduce: 1. run ./nvmf_tgt 2. ./rpc.py nvmf_create_transport -t ABC (ABC is the transport name) 3. ./rpc.py save_config >> config.json Then in config.json : { "subsystem": "nvmf", ... "config": [ { "method": "nvmf_create_transport", "params": { "trtype": "CUSTOM", ... } ] } trtype should be ABC , because nvmf_create_transport need pass the transport name to create transport. Signed-off-by: jiaqizho <jiaqi.zhou@intel.com> Change-Id: Iaf24837b649a1736568902f898d48135dac0882d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4973 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
1b5a65a73d
commit
384be89f7f
@ -567,7 +567,7 @@ spdk_nvmf_tgt_write_config_json(struct spdk_json_write_ctx *w, struct spdk_nvmf_
|
||||
spdk_json_write_named_string(w, "method", "nvmf_create_transport");
|
||||
|
||||
spdk_json_write_named_object_begin(w, "params");
|
||||
spdk_json_write_named_string(w, "trtype", spdk_nvme_transport_id_trtype_str(transport->ops->type));
|
||||
spdk_json_write_named_string(w, "trtype", transport->ops->name);
|
||||
spdk_json_write_named_uint32(w, "max_queue_depth", transport->opts.max_queue_depth);
|
||||
spdk_json_write_named_uint32(w, "max_io_qpairs_per_ctrlr",
|
||||
transport->opts.max_qpairs_per_ctrlr - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user