diff --git a/app/nvmf_tgt/conf.c b/app/nvmf_tgt/conf.c index ac4c919a7..0f7ec4fac 100644 --- a/app/nvmf_tgt/conf.c +++ b/app/nvmf_tgt/conf.c @@ -334,13 +334,13 @@ spdk_nvmf_parse_addr(char *listen_addr, char **host, char **port) } static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { struct spdk_nvmf_probe_ctx *ctx = cb_ctx; struct spdk_pci_addr pci_addr; - if (spdk_pci_addr_parse(&pci_addr, probe_info->trid.traddr)) { + if (spdk_pci_addr_parse(&pci_addr, trid->traddr)) { return false; } @@ -358,7 +358,7 @@ probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { struct spdk_nvmf_probe_ctx *ctx = cb_ctx; @@ -367,15 +367,15 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, int numa_node = -1; struct spdk_pci_addr pci_addr; - spdk_pci_addr_parse(&pci_addr, probe_info->trid.traddr); + spdk_pci_addr_parse(&pci_addr, trid->traddr); SPDK_NOTICELOG("Attaching NVMe device %p at %s to subsystem %s\n", ctrlr, - probe_info->trid.traddr, + trid->traddr, spdk_nvmf_subsystem_get_nqn(ctx->app_subsystem->subsystem)); snprintf(path, sizeof(path), "/sys/bus/pci/devices/%s/numa_node", - probe_info->trid.traddr); + trid->traddr); numa_node = spdk_get_numa_node_value(path); if (numa_node >= 0) { diff --git a/examples/nvme/arbitration/arbitration.c b/examples/nvme/arbitration/arbitration.c index 2c9a5df02..6d9cf5417 100644 --- a/examples/nvme/arbitration/arbitration.c +++ b/examples/nvme/arbitration/arbitration.c @@ -853,22 +853,22 @@ register_workers(void) } static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { /* Update with user specified arbitration configuration */ opts->arb_mechanism = g_arbitration.arbitration_mechanism; - printf("Attaching to %s\n", probe_info->trid.traddr); + printf("Attaching to %s\n", trid->traddr); return true; } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { - printf("Attached to %s\n", probe_info->trid.traddr); + printf("Attached to %s\n", trid->traddr); /* Update with actual arbitration configuration in use */ g_arbitration.arbitration_mechanism = opts->arb_mechanism; diff --git a/examples/nvme/fio_plugin/fio_plugin.c b/examples/nvme/fio_plugin/fio_plugin.c index 5e1967dff..e767d7041 100644 --- a/examples/nvme/fio_plugin/fio_plugin.c +++ b/examples/nvme/fio_plugin/fio_plugin.c @@ -87,7 +87,7 @@ struct spdk_fio_thread { }; static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { struct fio_file *f; @@ -96,7 +96,7 @@ probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, int rc; struct spdk_pci_addr pci_addr; - if (spdk_pci_addr_parse(&pci_addr, probe_info->trid.traddr)) { + if (spdk_pci_addr_parse(&pci_addr, trid->traddr)) { return false; } @@ -119,7 +119,7 @@ probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { struct thread_data *td = cb_ctx; @@ -130,7 +130,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, unsigned int i; struct spdk_pci_addr pci_addr; - spdk_pci_addr_parse(&pci_addr, probe_info->trid.traddr); + spdk_pci_addr_parse(&pci_addr, trid->traddr); /* Create an fio_ctrlr and add it to the list */ fio_ctrlr = calloc(1, sizeof(*fio_ctrlr)); diff --git a/examples/nvme/hello_world/hello_world.c b/examples/nvme/hello_world/hello_world.c index 589f413b2..440bf24ce 100644 --- a/examples/nvme/hello_world/hello_world.c +++ b/examples/nvme/hello_world/hello_world.c @@ -238,16 +238,16 @@ hello_world(void) } static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { - printf("Attaching to %s\n", probe_info->trid.traddr); + printf("Attaching to %s\n", trid->traddr); return true; } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { int nsid, num_ns; @@ -260,7 +260,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, exit(1); } - printf("Attached to %s\n", probe_info->trid.traddr); + printf("Attached to %s\n", trid->traddr); snprintf(entry->name, sizeof(entry->name), "%-20.20s (%-20.20s)", cdata->mn, cdata->sn); diff --git a/examples/nvme/hotplug/hotplug.c b/examples/nvme/hotplug/hotplug.c index f652311a9..569e34751 100644 --- a/examples/nvme/hotplug/hotplug.c +++ b/examples/nvme/hotplug/hotplug.c @@ -262,19 +262,19 @@ print_stats(void) } static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { - printf("Attaching to %s\n", probe_info->trid.traddr); + printf("Attaching to %s\n", trid->traddr); return true; } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { - printf("Attached to %s\n", probe_info->trid.traddr); + printf("Attached to %s\n", trid->traddr); register_dev(ctrlr); } diff --git a/examples/nvme/identify/identify.c b/examples/nvme/identify/identify.c index cc4b938b9..f3f45eec8 100644 --- a/examples/nvme/identify/identify.c +++ b/examples/nvme/identify/identify.c @@ -388,7 +388,7 @@ print_namespace(struct spdk_nvme_ns *ns) } static void -print_controller(struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_probe_info *probe_info) +print_controller(struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_transport_id *trid) { const struct spdk_nvme_ctrlr_data *cdata; union spdk_nvme_cap_register cap; @@ -409,11 +409,11 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_probe_inf cdata = spdk_nvme_ctrlr_get_data(ctrlr); printf("=====================================================\n"); - if (probe_info->trid.trtype != SPDK_NVME_TRANSPORT_PCIE) { + if (trid->trtype != SPDK_NVME_TRANSPORT_PCIE) { printf("NVMe over Fabrics controller at %s:%s: %s\n", - probe_info->trid.traddr, probe_info->trid.trsvcid, probe_info->trid.subnqn); + trid->traddr, trid->trsvcid, trid->subnqn); } else { - if (spdk_pci_addr_parse(&pci_addr, probe_info->trid.traddr) != 0) { + if (spdk_pci_addr_parse(&pci_addr, trid->traddr) != 0) { return; } @@ -947,17 +947,17 @@ parse_args(int argc, char **argv) } static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { return true; } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { - print_controller(ctrlr, probe_info); + print_controller(ctrlr, trid); spdk_nvme_detach(ctrlr); } diff --git a/examples/nvme/nvme_manage/nvme_manage.c b/examples/nvme/nvme_manage/nvme_manage.c index cb734fbba..0cda20873 100644 --- a/examples/nvme/nvme_manage/nvme_manage.c +++ b/examples/nvme/nvme_manage/nvme_manage.c @@ -78,7 +78,7 @@ cmp_devs(const void *ap, const void *bp) } static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { return true; @@ -99,7 +99,7 @@ identify_common_ns_cb(void *cb_arg, const struct spdk_nvme_cpl *cpl) } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { struct dev *dev; @@ -107,7 +107,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, /* add to dev list */ dev = &devs[num_devs++]; - spdk_pci_addr_parse(&dev->pci_addr, probe_info->trid.traddr); + spdk_pci_addr_parse(&dev->pci_addr, trid->traddr); dev->ctrlr = ctrlr; /* Retrieve controller data */ diff --git a/examples/nvme/perf/perf.c b/examples/nvme/perf/perf.c index ac9b4d822..4578ec040 100644 --- a/examples/nvme/perf/perf.c +++ b/examples/nvme/perf/perf.c @@ -973,19 +973,19 @@ unregister_workers(void) } static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { struct spdk_pci_addr pci_addr; struct spdk_pci_device *pci_dev; struct spdk_pci_id pci_id; - if (probe_info->trid.trtype != SPDK_NVME_TRANSPORT_PCIE) { + if (trid->trtype != SPDK_NVME_TRANSPORT_PCIE) { printf("Attaching to NVMe over Fabrics controller at %s:%s: %s\n", - probe_info->trid.traddr, probe_info->trid.trsvcid, - probe_info->trid.subnqn); + trid->traddr, trid->trsvcid, + trid->subnqn); } else { - if (spdk_pci_addr_parse(&pci_addr, probe_info->trid.traddr)) { + if (spdk_pci_addr_parse(&pci_addr, trid->traddr)) { return false; } @@ -997,7 +997,7 @@ probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, pci_id = spdk_pci_device_get_id(pci_dev); printf("Attaching to NVMe Controller at %s [%04x:%04x]\n", - probe_info->trid.traddr, + trid->traddr, pci_id.vendor_id, pci_id.device_id); } @@ -1005,19 +1005,19 @@ probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { struct spdk_pci_addr pci_addr; struct spdk_pci_device *pci_dev; struct spdk_pci_id pci_id; - if (probe_info->trid.trtype != SPDK_NVME_TRANSPORT_PCIE) { + if (trid->trtype != SPDK_NVME_TRANSPORT_PCIE) { printf("Attached to NVMe over Fabrics controller at %s:%s: %s\n", - probe_info->trid.traddr, probe_info->trid.trsvcid, - probe_info->trid.subnqn); + trid->traddr, trid->trsvcid, + trid->subnqn); } else { - if (spdk_pci_addr_parse(&pci_addr, probe_info->trid.traddr)) { + if (spdk_pci_addr_parse(&pci_addr, trid->traddr)) { return; } @@ -1029,7 +1029,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, pci_id = spdk_pci_device_get_id(pci_dev); printf("Attached to NVMe Controller at %s [%04x:%04x]\n", - probe_info->trid.traddr, + trid->traddr, pci_id.vendor_id, pci_id.device_id); } diff --git a/examples/nvme/reserve/reserve.c b/examples/nvme/reserve/reserve.c index aced4864c..9a77fb1b0 100644 --- a/examples/nvme/reserve/reserve.c +++ b/examples/nvme/reserve/reserve.c @@ -362,21 +362,21 @@ reserve_controller(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_qpair *qpair, } static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { return true; } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { struct dev *dev; /* add to dev list */ dev = &devs[num_devs++]; - spdk_pci_addr_parse(&dev->pci_addr, probe_info->trid.traddr); + spdk_pci_addr_parse(&dev->pci_addr, trid->traddr); dev->ctrlr = ctrlr; } diff --git a/include/spdk/nvme.h b/include/spdk/nvme.h index 3b57e59ff..320cbc0d0 100644 --- a/include/spdk/nvme.h +++ b/include/spdk/nvme.h @@ -162,14 +162,6 @@ struct spdk_nvme_transport_id { char subnqn[SPDK_NVMF_NQN_MAX_LEN + 1]; }; -/** - * NVMe controller information provided during spdk_nvme_probe(). - */ -struct spdk_nvme_probe_info { - /* The transport identifier */ - struct spdk_nvme_transport_id trid; -}; - /** * Determine whether the NVMe library can handle a specific NVMe over Fabrics transport type. * @@ -188,7 +180,7 @@ bool spdk_nvme_transport_available(enum spdk_nvme_transport_type trtype); * provided during the attach callback. * \return true to attach to this device. */ -typedef bool (*spdk_nvme_probe_cb)(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +typedef bool (*spdk_nvme_probe_cb)(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts); /** @@ -197,7 +189,7 @@ typedef bool (*spdk_nvme_probe_cb)(void *cb_ctx, const struct spdk_nvme_probe_in * \param opts NVMe controller initialization options that were actually used. Options may differ * from the requested options from the probe call depending on what the controller supports. */ -typedef void (*spdk_nvme_attach_cb)(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +typedef void (*spdk_nvme_attach_cb)(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts); diff --git a/lib/bdev/nvme/blockdev_nvme.c b/lib/bdev/nvme/blockdev_nvme.c index eaef3f6ce..f883fd0f7 100644 --- a/lib/bdev/nvme/blockdev_nvme.c +++ b/lib/bdev/nvme/blockdev_nvme.c @@ -407,7 +407,7 @@ static const struct spdk_bdev_fn_table nvmelib_fn_table = { }; static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { struct nvme_probe_ctx *ctx = cb_ctx; @@ -415,12 +415,12 @@ probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, bool claim_device = false; struct spdk_pci_addr pci_addr; - if (spdk_pci_addr_parse(&pci_addr, probe_info->trid.traddr)) { + if (spdk_pci_addr_parse(&pci_addr, trid->traddr)) { return false; } SPDK_NOTICELOG("Probing device %s\n", - probe_info->trid.traddr); + trid->traddr); if (ctx->controllers_remaining == 0) { return false; @@ -464,7 +464,7 @@ blockdev_nvme_timeout_cb(struct spdk_nvme_ctrlr *ctrlr, } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { struct nvme_probe_ctx *ctx = cb_ctx; @@ -477,7 +477,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, } dev->ctrlr = ctrlr; - spdk_pci_addr_parse(&dev->pci_addr, probe_info->trid.traddr); + spdk_pci_addr_parse(&dev->pci_addr, trid->traddr); dev->id = nvme_controller_index++; nvme_ctrlr_initialize_blockdevs(dev, nvme_luns_per_ns, dev->id); diff --git a/lib/nvme/nvme.c b/lib/nvme/nvme.c index a8942e891..d7a58c7ab 100644 --- a/lib/nvme/nvme.c +++ b/lib/nvme/nvme.c @@ -302,7 +302,7 @@ nvme_driver_init(void) } int -nvme_ctrlr_probe(struct spdk_nvme_probe_info *probe_info, void *devhandle, +nvme_ctrlr_probe(const struct spdk_nvme_transport_id *trid, void *devhandle, spdk_nvme_probe_cb probe_cb, void *cb_ctx) { struct spdk_nvme_ctrlr *ctrlr; @@ -310,8 +310,8 @@ nvme_ctrlr_probe(struct spdk_nvme_probe_info *probe_info, void *devhandle, spdk_nvme_ctrlr_opts_set_defaults(&opts); - if (probe_cb(cb_ctx, probe_info, &opts)) { - ctrlr = nvme_transport_ctrlr_construct(probe_info->trid.trtype, &opts, probe_info, devhandle); + if (probe_cb(cb_ctx, trid, &opts)) { + ctrlr = nvme_transport_ctrlr_construct(trid->trtype, &opts, trid, devhandle); if (ctrlr == NULL) { SPDK_ERRLOG("Failed to construct NVMe controller\n"); return -1; @@ -375,7 +375,7 @@ nvme_init_controllers(void *cb_ctx, spdk_nvme_attach_cb attach_cb) * that may take the driver lock, like nvme_detach(). */ nvme_robust_mutex_unlock(&g_spdk_nvme_driver->lock); - attach_cb(cb_ctx, &ctrlr->probe_info, ctrlr, &ctrlr->opts); + attach_cb(cb_ctx, &ctrlr->trid, ctrlr, &ctrlr->opts); nvme_robust_mutex_lock(&g_spdk_nvme_driver->lock); break; @@ -438,7 +438,7 @@ _spdk_nvme_probe(const struct spdk_nvme_transport_id *trid, void *cb_ctx, * that may take the driver lock, like nvme_detach(). */ nvme_robust_mutex_unlock(&g_spdk_nvme_driver->lock); - attach_cb(cb_ctx, &ctrlr->probe_info, ctrlr, &ctrlr->opts); + attach_cb(cb_ctx, &ctrlr->trid, ctrlr, &ctrlr->opts); nvme_robust_mutex_lock(&g_spdk_nvme_driver->lock); } @@ -492,7 +492,7 @@ nvme_hotplug_monitor(void *cb_ctx, spdk_nvme_probe_cb probe_cb, bool in_list = false; TAILQ_FOREACH(ctrlr, &g_spdk_nvme_driver->attached_ctrlrs, tailq) { - if (strcmp(event.traddr, ctrlr->probe_info.trid.traddr) == 0) { + if (strcmp(event.traddr, ctrlr->trid.traddr) == 0) { in_list = true; break; } diff --git a/lib/nvme/nvme_internal.h b/lib/nvme/nvme_internal.h index f8d402a5f..7667b1528 100644 --- a/lib/nvme/nvme_internal.h +++ b/lib/nvme/nvme_internal.h @@ -337,7 +337,7 @@ struct spdk_nvme_ctrlr { /** Array of namespaces indexed by nsid - 1 */ struct spdk_nvme_ns *ns; - enum spdk_nvme_transport_type trtype; + struct spdk_nvme_transport_id trid; uint32_t num_ns; @@ -402,8 +402,6 @@ struct spdk_nvme_ctrlr { struct spdk_nvme_ctrlr_opts opts; - struct spdk_nvme_probe_info probe_info; - uint64_t quirks; /* Extra sleep time during controller initialization */ @@ -518,7 +516,7 @@ void nvme_completion_poll_cb(void *arg, const struct spdk_nvme_cpl *cpl); int nvme_ctrlr_add_process(struct spdk_nvme_ctrlr *ctrlr, void *devhandle); void nvme_ctrlr_free_processes(struct spdk_nvme_ctrlr *ctrlr); -int nvme_ctrlr_probe(struct spdk_nvme_probe_info *probe_info, void *devhandle, +int nvme_ctrlr_probe(const struct spdk_nvme_transport_id *trid, void *devhandle, spdk_nvme_probe_cb probe_cb, void *cb_ctx); int nvme_ctrlr_construct(struct spdk_nvme_ctrlr *ctrlr); @@ -567,7 +565,7 @@ void nvme_qpair_print_completion(struct spdk_nvme_qpair *qpair, struct spdk_nvme /* Transport specific functions */ #define DECLARE_TRANSPORT(name) \ struct spdk_nvme_ctrlr *nvme_ ## name ## _ctrlr_construct(enum spdk_nvme_transport_type trtype, const struct spdk_nvme_ctrlr_opts *opts, \ - const struct spdk_nvme_probe_info *probe_info, void *devhandle); \ + const struct spdk_nvme_transport_id *trid, void *devhandle); \ int nvme_ ## name ## _ctrlr_destruct(struct spdk_nvme_ctrlr *ctrlr); \ int nvme_ ## name ## _ctrlr_scan(const struct spdk_nvme_transport_id *trid, void *cb_ctx, spdk_nvme_probe_cb probe_cb, spdk_nvme_remove_cb remove_cb); \ int nvme_ ## name ## _ctrlr_attach(enum spdk_nvme_transport_type trtype, spdk_nvme_probe_cb probe_cb, void *cb_ctx, struct spdk_pci_addr *addr); \ diff --git a/lib/nvme/nvme_pcie.c b/lib/nvme/nvme_pcie.c index ed90f12b6..aca8ae615 100644 --- a/lib/nvme/nvme_pcie.c +++ b/lib/nvme/nvme_pcie.c @@ -228,7 +228,7 @@ nvme_pcie_ctrlr_setup_signal(void) static inline struct nvme_pcie_ctrlr * nvme_pcie_ctrlr(struct spdk_nvme_ctrlr *ctrlr) { - assert(ctrlr->trtype == SPDK_NVME_TRANSPORT_PCIE); + assert(ctrlr->trid.trtype == SPDK_NVME_TRANSPORT_PCIE); return (struct nvme_pcie_ctrlr *)((uintptr_t)ctrlr - offsetof(struct nvme_pcie_ctrlr, ctrlr)); } @@ -526,7 +526,7 @@ nvme_pcie_ctrlr_construct_admin_qpair(struct spdk_nvme_ctrlr *ctrlr) static int pcie_nvme_enum_cb(void *ctx, struct spdk_pci_device *pci_dev) { - struct spdk_nvme_probe_info probe_info = {}; + struct spdk_nvme_transport_id trid = {}; struct nvme_pcie_enum_ctx *enum_ctx = ctx; struct spdk_nvme_ctrlr *ctrlr; int rc = 0; @@ -534,8 +534,8 @@ pcie_nvme_enum_cb(void *ctx, struct spdk_pci_device *pci_dev) pci_addr = spdk_pci_device_get_addr(pci_dev); - probe_info.trid.trtype = SPDK_NVME_TRANSPORT_PCIE; - spdk_pci_addr_fmt(probe_info.trid.traddr, sizeof(probe_info.trid.traddr), &pci_addr); + trid.trtype = SPDK_NVME_TRANSPORT_PCIE; + spdk_pci_addr_fmt(trid.traddr, sizeof(trid.traddr), &pci_addr); /* Verify that this controller is not already attached */ TAILQ_FOREACH(ctrlr, &g_spdk_nvme_driver->attached_ctrlrs, tailq) { @@ -543,7 +543,7 @@ pcie_nvme_enum_cb(void *ctx, struct spdk_pci_device *pci_dev) * different per each process, we compare by BDF to determine whether it is the * same controller. */ - if (strcmp(probe_info.trid.traddr, ctrlr->probe_info.trid.traddr) == 0) { + if (strcmp(trid.traddr, ctrlr->trid.traddr) == 0) { if (!spdk_process_is_primary()) { rc = nvme_ctrlr_add_process(ctrlr, pci_dev); } @@ -551,7 +551,7 @@ pcie_nvme_enum_cb(void *ctx, struct spdk_pci_device *pci_dev) } } - return nvme_ctrlr_probe(&probe_info, pci_dev, + return nvme_ctrlr_probe(&trid, pci_dev, enum_ctx->probe_cb, enum_ctx->cb_ctx); } @@ -584,7 +584,7 @@ nvme_pcie_ctrlr_attach(enum spdk_nvme_transport_type trtype, struct spdk_nvme_ctrlr *nvme_pcie_ctrlr_construct(enum spdk_nvme_transport_type trtype, const struct spdk_nvme_ctrlr_opts *opts, - const struct spdk_nvme_probe_info *probe_info, + const struct spdk_nvme_transport_id *trid, void *devhandle) { struct spdk_pci_device *pci_dev = devhandle; @@ -602,10 +602,10 @@ struct spdk_nvme_ctrlr *nvme_pcie_ctrlr_construct(enum spdk_nvme_transport_type pctrlr->is_remapped = false; pctrlr->ctrlr.is_removed = false; - pctrlr->ctrlr.trtype = SPDK_NVME_TRANSPORT_PCIE; + pctrlr->ctrlr.trid.trtype = SPDK_NVME_TRANSPORT_PCIE; pctrlr->devhandle = devhandle; pctrlr->ctrlr.opts = *opts; - pctrlr->ctrlr.probe_info = *probe_info; + memcpy(&pctrlr->ctrlr.trid, trid, sizeof(pctrlr->ctrlr.trid)); rc = nvme_pcie_ctrlr_allocate_bars(pctrlr); if (rc != 0) { diff --git a/lib/nvme/nvme_qpair.c b/lib/nvme/nvme_qpair.c index c65548b7d..2e1a05ad5 100644 --- a/lib/nvme/nvme_qpair.c +++ b/lib/nvme/nvme_qpair.c @@ -352,7 +352,7 @@ nvme_qpair_construct(struct spdk_nvme_qpair *qpair, uint16_t id, qpair->qprio = qprio; qpair->ctrlr = ctrlr; - qpair->trtype = ctrlr->trtype; + qpair->trtype = ctrlr->trid.trtype; STAILQ_INIT(&qpair->queued_req); diff --git a/lib/nvme/nvme_rdma.c b/lib/nvme/nvme_rdma.c index f7294bbdc..081bc3d83 100644 --- a/lib/nvme/nvme_rdma.c +++ b/lib/nvme/nvme_rdma.c @@ -135,7 +135,7 @@ nvme_rdma_qpair(struct spdk_nvme_qpair *qpair) static inline struct nvme_rdma_ctrlr * nvme_rdma_ctrlr(struct spdk_nvme_ctrlr *ctrlr) { - assert(ctrlr->trtype == SPDK_NVME_TRANSPORT_RDMA); + assert(ctrlr->trid.trtype == SPDK_NVME_TRANSPORT_RDMA); return (struct nvme_rdma_ctrlr *)((uintptr_t)ctrlr - offsetof(struct nvme_rdma_ctrlr, ctrlr)); } @@ -640,8 +640,8 @@ nvme_rdma_qpair_connect(struct nvme_rdma_qpair *rqpair) ctrlr = rqpair->qpair.ctrlr; memset(&sin, 0, sizeof(struct sockaddr_storage)); - SPDK_TRACELOG(SPDK_TRACE_DEBUG, "trsvcid is %s\n", ctrlr->probe_info.trid.trsvcid); - rc = nvme_rdma_parse_addr(&sin, ctrlr->probe_info.trid.traddr, ctrlr->probe_info.trid.trsvcid); + SPDK_TRACELOG(SPDK_TRACE_DEBUG, "trsvcid is %s\n", ctrlr->trid.trsvcid); + rc = nvme_rdma_parse_addr(&sin, ctrlr->trid.traddr, ctrlr->trid.trsvcid); if (rc != 0) { SPDK_ERRLOG("nvme_rdma_parse_addr() failed\n"); return -1; @@ -776,7 +776,7 @@ nvme_rdma_qpair_fabric_connect(struct nvme_rdma_qpair *rqpair) strncpy((char *)&nvmf_data->hostid, (char *)NVME_HOST_ID_DEFAULT, strlen((char *)NVME_HOST_ID_DEFAULT)); strncpy((char *)nvmf_data->hostnqn, ctrlr->opts.hostnqn, sizeof(nvmf_data->hostnqn)); - strncpy((char *)nvmf_data->subnqn, ctrlr->probe_info.trid.subnqn, sizeof(nvmf_data->subnqn)); + strncpy((char *)nvmf_data->subnqn, ctrlr->trid.subnqn, sizeof(nvmf_data->subnqn)); if (nvme_qpair_is_admin_queue(&rqpair->qpair)) { rc = spdk_nvme_ctrlr_cmd_admin_raw(ctrlr, @@ -1051,12 +1051,12 @@ nvme_fabrics_get_log_discovery_page(struct spdk_nvme_ctrlr *ctrlr, /* This function must only be called while holding g_spdk_nvme_driver->lock */ int -nvme_rdma_ctrlr_scan(const struct spdk_nvme_transport_id *trid, +nvme_rdma_ctrlr_scan(const struct spdk_nvme_transport_id *discovery_trid, void *cb_ctx, spdk_nvme_probe_cb probe_cb, spdk_nvme_remove_cb remove_cb) { - struct spdk_nvme_probe_info probe_info; + struct spdk_nvme_transport_id trid; struct spdk_nvme_ctrlr_opts discovery_opts; struct spdk_nvme_ctrlr *discovery_ctrlr; struct spdk_nvmf_discovery_log_page *log_page; @@ -1069,13 +1069,9 @@ nvme_rdma_ctrlr_scan(const struct spdk_nvme_transport_id *trid, /* For discovery_ctrlr set the timeout to 0 */ discovery_opts.keep_alive_timeout_ms = 0; - probe_info.trid.trtype = SPDK_NVME_TRANSPORT_RDMA; - snprintf(probe_info.trid.subnqn, sizeof(probe_info.trid.subnqn), "%s", trid->subnqn); - snprintf(probe_info.trid.traddr, sizeof(probe_info.trid.traddr), "%s", trid->traddr); - snprintf(probe_info.trid.trsvcid, sizeof(probe_info.trid.trsvcid), "%s", trid->trsvcid); - memset(buffer, 0x0, 4096); - discovery_ctrlr = nvme_rdma_ctrlr_construct(SPDK_NVME_TRANSPORT_RDMA, &discovery_opts, &probe_info, + discovery_ctrlr = nvme_rdma_ctrlr_construct(SPDK_NVME_TRANSPORT_RDMA, &discovery_opts, + discovery_trid, NULL); if (discovery_ctrlr == NULL) { return -1; @@ -1115,10 +1111,10 @@ nvme_rdma_ctrlr_scan(const struct spdk_nvme_transport_id *trid, continue; } - probe_info.trid.trtype = entry->trtype; - if (!spdk_nvme_transport_available(probe_info.trid.trtype)) { + trid.trtype = entry->trtype; + if (!spdk_nvme_transport_available(trid.trtype)) { SPDK_WARNLOG("NVMe transport type %u not available; skipping probe\n", - probe_info.trid.trtype); + trid.trtype); continue; } @@ -1129,22 +1125,22 @@ nvme_rdma_ctrlr_scan(const struct spdk_nvme_transport_id *trid, continue; } len = end - entry->subnqn; - memcpy(probe_info.trid.subnqn, entry->subnqn, len); - probe_info.trid.subnqn[len] = '\0'; + memcpy(trid.subnqn, entry->subnqn, len); + trid.subnqn[len] = '\0'; /* Convert traddr to a null terminated string. */ len = spdk_strlen_pad(entry->traddr, sizeof(entry->traddr), ' '); - memcpy(probe_info.trid.traddr, entry->traddr, len); + memcpy(trid.traddr, entry->traddr, len); /* Convert trsvcid to a null terminated string. */ len = spdk_strlen_pad(entry->trsvcid, sizeof(entry->trsvcid), ' '); - memcpy(probe_info.trid.trsvcid, entry->trsvcid, len); + memcpy(trid.trsvcid, entry->trsvcid, len); SPDK_TRACELOG(SPDK_TRACE_DEBUG, "subnqn=%s, trtype=%u, traddr=%s, trsvcid=%s\n", - probe_info.trid.subnqn, probe_info.trid.trtype, - probe_info.trid.traddr, probe_info.trid.trsvcid); + trid.subnqn, trid.trtype, + trid.traddr, trid.trsvcid); - nvme_ctrlr_probe(&probe_info, NULL, probe_cb, cb_ctx); + nvme_ctrlr_probe(&trid, NULL, probe_cb, cb_ctx); } nvme_ctrlr_destruct(discovery_ctrlr); @@ -1163,7 +1159,7 @@ nvme_rdma_ctrlr_attach(enum spdk_nvme_transport_type trtype, struct spdk_nvme_ctrlr * nvme_rdma_ctrlr_construct(enum spdk_nvme_transport_type trtype, const struct spdk_nvme_ctrlr_opts *opts, - const struct spdk_nvme_probe_info *probe_info, + const struct spdk_nvme_transport_id *trid, void *devhandle) { struct nvme_rdma_ctrlr *rctrlr; @@ -1176,9 +1172,9 @@ struct spdk_nvme_ctrlr * return NULL; } - rctrlr->ctrlr.trtype = SPDK_NVME_TRANSPORT_RDMA; + rctrlr->ctrlr.trid.trtype = SPDK_NVME_TRANSPORT_RDMA; rctrlr->ctrlr.opts = *opts; - rctrlr->ctrlr.probe_info = *probe_info; + memcpy(&rctrlr->ctrlr.trid, trid, sizeof(rctrlr->ctrlr.trid)); rc = nvme_ctrlr_construct(&rctrlr->ctrlr); if (rc != 0) { diff --git a/lib/nvme/nvme_transport.c b/lib/nvme/nvme_transport.c index 545e78157..c62109dcf 100644 --- a/lib/nvme/nvme_transport.c +++ b/lib/nvme/nvme_transport.c @@ -84,10 +84,10 @@ spdk_nvme_transport_available(enum spdk_nvme_transport_type trtype) struct spdk_nvme_ctrlr * nvme_transport_ctrlr_construct(enum spdk_nvme_transport_type trtype, const struct spdk_nvme_ctrlr_opts *opts, - const struct spdk_nvme_probe_info *probe_info, + const struct spdk_nvme_transport_id *trid, void *devhandle) { - NVME_TRANSPORT_CALL(trtype, ctrlr_construct, (trtype, opts, probe_info, devhandle)); + NVME_TRANSPORT_CALL(trtype, ctrlr_construct, (trtype, opts, trid, devhandle)); } int @@ -110,68 +110,68 @@ nvme_transport_ctrlr_attach(enum spdk_nvme_transport_type trtype, int nvme_transport_ctrlr_destruct(struct spdk_nvme_ctrlr *ctrlr) { - NVME_TRANSPORT_CALL(ctrlr->trtype, ctrlr_destruct, (ctrlr)); + NVME_TRANSPORT_CALL(ctrlr->trid.trtype, ctrlr_destruct, (ctrlr)); } int nvme_transport_ctrlr_enable(struct spdk_nvme_ctrlr *ctrlr) { - NVME_TRANSPORT_CALL(ctrlr->trtype, ctrlr_enable, (ctrlr)); + NVME_TRANSPORT_CALL(ctrlr->trid.trtype, ctrlr_enable, (ctrlr)); } int nvme_transport_ctrlr_get_pci_id(struct spdk_nvme_ctrlr *ctrlr, struct spdk_pci_id *pci_id) { - NVME_TRANSPORT_CALL(ctrlr->trtype, ctrlr_get_pci_id, (ctrlr, pci_id)); + NVME_TRANSPORT_CALL(ctrlr->trid.trtype, ctrlr_get_pci_id, (ctrlr, pci_id)); } int nvme_transport_ctrlr_set_reg_4(struct spdk_nvme_ctrlr *ctrlr, uint32_t offset, uint32_t value) { - NVME_TRANSPORT_CALL(ctrlr->trtype, ctrlr_set_reg_4, (ctrlr, offset, value)); + NVME_TRANSPORT_CALL(ctrlr->trid.trtype, ctrlr_set_reg_4, (ctrlr, offset, value)); } int nvme_transport_ctrlr_set_reg_8(struct spdk_nvme_ctrlr *ctrlr, uint32_t offset, uint64_t value) { - NVME_TRANSPORT_CALL(ctrlr->trtype, ctrlr_set_reg_8, (ctrlr, offset, value)); + NVME_TRANSPORT_CALL(ctrlr->trid.trtype, ctrlr_set_reg_8, (ctrlr, offset, value)); } int nvme_transport_ctrlr_get_reg_4(struct spdk_nvme_ctrlr *ctrlr, uint32_t offset, uint32_t *value) { - NVME_TRANSPORT_CALL(ctrlr->trtype, ctrlr_get_reg_4, (ctrlr, offset, value)); + NVME_TRANSPORT_CALL(ctrlr->trid.trtype, ctrlr_get_reg_4, (ctrlr, offset, value)); } int nvme_transport_ctrlr_get_reg_8(struct spdk_nvme_ctrlr *ctrlr, uint32_t offset, uint64_t *value) { - NVME_TRANSPORT_CALL(ctrlr->trtype, ctrlr_get_reg_8, (ctrlr, offset, value)); + NVME_TRANSPORT_CALL(ctrlr->trid.trtype, ctrlr_get_reg_8, (ctrlr, offset, value)); } uint32_t nvme_transport_ctrlr_get_max_xfer_size(struct spdk_nvme_ctrlr *ctrlr) { - NVME_TRANSPORT_CALL(ctrlr->trtype, ctrlr_get_max_xfer_size, (ctrlr)); + NVME_TRANSPORT_CALL(ctrlr->trid.trtype, ctrlr_get_max_xfer_size, (ctrlr)); } struct spdk_nvme_qpair * nvme_transport_ctrlr_create_io_qpair(struct spdk_nvme_ctrlr *ctrlr, uint16_t qid, enum spdk_nvme_qprio qprio) { - NVME_TRANSPORT_CALL(ctrlr->trtype, ctrlr_create_io_qpair, (ctrlr, qid, qprio)); + NVME_TRANSPORT_CALL(ctrlr->trid.trtype, ctrlr_create_io_qpair, (ctrlr, qid, qprio)); } int nvme_transport_ctrlr_delete_io_qpair(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_qpair *qpair) { - NVME_TRANSPORT_CALL(ctrlr->trtype, ctrlr_delete_io_qpair, (ctrlr, qpair)); + NVME_TRANSPORT_CALL(ctrlr->trid.trtype, ctrlr_delete_io_qpair, (ctrlr, qpair)); } int nvme_transport_ctrlr_reinit_io_qpair(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_qpair *qpair) { - NVME_TRANSPORT_CALL(ctrlr->trtype, ctrlr_reinit_io_qpair, (ctrlr, qpair)); + NVME_TRANSPORT_CALL(ctrlr->trid.trtype, ctrlr_reinit_io_qpair, (ctrlr, qpair)); } int diff --git a/test/lib/nvme/aer/aer.c b/test/lib/nvme/aer/aer.c index d9da6abcc..7f05607b4 100644 --- a/test/lib/nvme/aer/aer.c +++ b/test/lib/nvme/aer/aer.c @@ -185,16 +185,16 @@ static void aer_cb(void *arg, const struct spdk_nvme_cpl *cpl) static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { - printf("Attaching to %s\n", probe_info->trid.traddr); + printf("Attaching to %s\n", trid->traddr); return true; } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { struct dev *dev; @@ -205,7 +205,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, dev->ctrlr = ctrlr; snprintf(dev->name, sizeof(dev->name), "%s", - probe_info->trid.traddr); + trid->traddr); printf("Attached to %s\n", dev->name); diff --git a/test/lib/nvme/e2edp/nvme_dp.c b/test/lib/nvme/e2edp/nvme_dp.c index ccdefb478..07148fcb6 100644 --- a/test/lib/nvme/e2edp/nvme_dp.c +++ b/test/lib/nvme/e2edp/nvme_dp.c @@ -606,16 +606,16 @@ write_read_e2e_dp_tests(struct dev *dev, nvme_build_io_req_fn_t build_io_fn, con } static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { - printf("Attaching to %s\n", probe_info->trid.traddr); + printf("Attaching to %s\n", trid->traddr); return true; } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { struct dev *dev; @@ -626,7 +626,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, dev->ctrlr = ctrlr; snprintf(dev->name, sizeof(dev->name), "%s", - probe_info->trid.traddr); + trid->traddr); printf("Attached to %s\n", dev->name); } diff --git a/test/lib/nvme/overhead/overhead.c b/test/lib/nvme/overhead/overhead.c index 7c9a2a577..6300c4290 100644 --- a/test/lib/nvme/overhead/overhead.c +++ b/test/lib/nvme/overhead/overhead.c @@ -530,7 +530,7 @@ parse_args(int argc, char **argv) } static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { static uint32_t ctrlr_found = 0; @@ -538,21 +538,21 @@ probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, if (ctrlr_found == 1) { fprintf(stderr, "only attching to one controller, so skipping\n"); fprintf(stderr, " controller at PCI address %s\n", - probe_info->trid.traddr); + trid->traddr); return false; } ctrlr_found = 1; - printf("Attaching to %s\n", probe_info->trid.traddr); + printf("Attaching to %s\n", trid->traddr); return true; } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { - printf("Attached to %s\n", probe_info->trid.traddr); + printf("Attached to %s\n", trid->traddr); register_ctrlr(ctrlr); } diff --git a/test/lib/nvme/reset/reset.c b/test/lib/nvme/reset/reset.c index d3a59f1f8..51ebfcbc8 100644 --- a/test/lib/nvme/reset/reset.c +++ b/test/lib/nvme/reset/reset.c @@ -508,14 +508,14 @@ register_workers(void) static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { return true; } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { register_ctrlr(ctrlr); diff --git a/test/lib/nvme/sgl/sgl.c b/test/lib/nvme/sgl/sgl.c index 3447a6d8b..1518c03af 100644 --- a/test/lib/nvme/sgl/sgl.c +++ b/test/lib/nvme/sgl/sgl.c @@ -380,16 +380,16 @@ writev_readv_tests(struct dev *dev, nvme_build_io_req_fn_t build_io_fn, const ch } static bool -probe_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { - printf("Attaching to %s\n", probe_info->trid.traddr); + printf("Attaching to %s\n", trid->traddr); return true; } static void -attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, +attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { struct dev *dev; @@ -400,7 +400,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_probe_info *probe_info, dev->ctrlr = ctrlr; snprintf(dev->name, sizeof(dev->name), "%s", - probe_info->trid.traddr); + trid->traddr); printf("Attached to %s\n", dev->name); } diff --git a/test/lib/nvme/unit/nvme_c/nvme_ut.c b/test/lib/nvme/unit/nvme_c/nvme_ut.c index bbbb37b9b..19432f642 100644 --- a/test/lib/nvme/unit/nvme_c/nvme_ut.c +++ b/test/lib/nvme/unit/nvme_c/nvme_ut.c @@ -64,7 +64,7 @@ spdk_nvme_transport_available(enum spdk_nvme_transport_type trtype) struct spdk_nvme_ctrlr * nvme_transport_ctrlr_construct(enum spdk_nvme_transport_type trtype, const struct spdk_nvme_ctrlr_opts *opts, - const struct spdk_nvme_probe_info *probe_info, + const struct spdk_nvme_transport_id *trid, void *devhandle) { return NULL; diff --git a/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c b/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c index 4a3f0d1e0..4c397d623 100644 --- a/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c +++ b/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c @@ -59,7 +59,7 @@ __thread int nvme_thread_ioq_index = -1; struct spdk_nvme_ctrlr * nvme_transport_ctrlr_construct(enum spdk_nvme_transport_type trtype, const struct spdk_nvme_ctrlr_opts *opts, - const struct spdk_nvme_probe_info *probe_info, + const struct spdk_nvme_transport_id *trid, void *devhandle) { return NULL; diff --git a/test/lib/nvme/unit/nvme_ns_cmd_c/nvme_ns_cmd_ut.c b/test/lib/nvme/unit/nvme_ns_cmd_c/nvme_ns_cmd_ut.c index 823e4de2c..c6051804d 100644 --- a/test/lib/nvme/unit/nvme_ns_cmd_c/nvme_ns_cmd_ut.c +++ b/test/lib/nvme/unit/nvme_ns_cmd_c/nvme_ns_cmd_ut.c @@ -78,7 +78,7 @@ spdk_nvme_transport_available(enum spdk_nvme_transport_type trtype) struct spdk_nvme_ctrlr * nvme_transport_ctrlr_construct(enum spdk_nvme_transport_type trtype, const struct spdk_nvme_ctrlr_opts *opts, - const struct spdk_nvme_probe_info *probe_info, + const struct spdk_nvme_transport_id *trid, void *devhandle) { return NULL;