Skip to content

Commit 2cf92c6

Browse files
authored
Merge pull request #253 from igaw/port-default-port-for-discovery
fabrics: add default port number for NVMe/TCP I/O controllers
2 parents 1adc191 + 9b17a87 commit 2cf92c6

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/nvme/tree.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,8 +922,13 @@ void nvme_free_ctrl(nvme_ctrl_t c)
922922
static void discovery_trsvcid(nvme_ctrl_t c)
923923
{
924924
if (!strcmp(c->transport, "tcp")) {
925-
/* Default port for NVMe/TCP discovery controllers */
926-
c->trsvcid = strdup(__stringify(NVME_DISC_IP_PORT));
925+
if (c->discovery_ctrl) {
926+
/* Default port for NVMe/TCP discovery controllers */
927+
c->trsvcid = strdup(__stringify(NVME_DISC_IP_PORT));
928+
} else {
929+
/* Default port for NVMe/TCP io controllers */
930+
c->trsvcid = __stringify(NVME_RDMA_IP_PORT);
931+
}
927932
} else if (!strcmp(c->transport, "rdma")) {
928933
/* Default port for NVMe/RDMA controllers */
929934
c->trsvcid = strdup(__stringify(NVME_RDMA_IP_PORT));

0 commit comments

Comments
 (0)