Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions libnvme/src/nvme/fabrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,8 +1193,12 @@ static int nvmf_connect_disc_entry(nvme_host_t h,
c->cfg.disable_sqflow = true;

if (e->trtype == NVMF_TRTYPE_TCP &&
e->tsas.tcp.sectype != NVMF_TCP_SECTYPE_NONE)
c->cfg.tls = true;
e->tsas.tcp.sectype != NVMF_TCP_SECTYPE_NONE) {
if (e->treq & NVMF_TREQ_REQUIRED)
c->cfg.tls = true;
else if (e->treq & NVMF_TREQ_NOT_REQUIRED)
c->cfg.concat = true;
}

ret = nvmf_add_ctrl(h, c, cfg);
if (!ret) {
Expand Down Expand Up @@ -2313,6 +2317,12 @@ static int nvmf_create_discovery_ctrl(struct nvme_global_ctx *ctx,
return -ENOMEM;
}

ret = nvme_open(ctx, c->name, &c->hdl);
if (ret) {
nvme_msg(ctx, LOG_ERR, "failed to open %s\n", c->name);
return ret;
}

/* Find out the name of discovery controller */
ret = nvme_ctrl_identify(c, id);
if (ret) {
Expand Down