Skip to content

Commit 78c4f85

Browse files
committed
fabrics: add additional debug messages for --tls and --concat
Add additional debug messages when --tls and --concat is set respectively based on the treq and sectype fields for a given record in the discovery log page data during a nvme connect-all. This makes it easier to debug, otherwise can be quite confusing to the end user. Signed-off-by: Martin George <[email protected]>
1 parent 9f84578 commit 78c4f85

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

libnvme/src/nvme/fabrics.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,10 +1209,16 @@ static int nvmf_connect_disc_entry(nvme_host_t h,
12091209

12101210
if (e->trtype == NVMF_TRTYPE_TCP &&
12111211
e->tsas.tcp.sectype != NVMF_TCP_SECTYPE_NONE) {
1212-
if (e->treq & NVMF_TREQ_REQUIRED)
1212+
if (e->treq & NVMF_TREQ_REQUIRED) {
1213+
nvme_msg(h->ctx, LOG_DEBUG, "setting --tls due to treq %s and sectype %s\n",
1214+
nvmf_treq_str(e->treq), nvmf_sectype_str(e->tsas.tcp.sectype));
12131215
c->cfg.tls = true;
1214-
else if (e->treq & NVMF_TREQ_NOT_REQUIRED)
1216+
}
1217+
else if (e->treq & NVMF_TREQ_NOT_REQUIRED) {
1218+
nvme_msg(h->ctx, LOG_DEBUG, "setting --concat due to treq %s and sectype %s\n",
1219+
nvmf_treq_str(e->treq), nvmf_sectype_str(e->tsas.tcp.sectype));
12151220
c->cfg.concat = true;
1221+
}
12161222
}
12171223

12181224
ret = nvmf_add_ctrl(h, c, cfg);

0 commit comments

Comments
 (0)