nvme/rdma: check discovery entry subtype

We currently don't handle discovery service referrals, so skip those, as
well as any other unknown subsystem type.

Change-Id: I64f889e9272fb57b5cf9bb5467b3abca3955baf5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-11-28 13:46:13 -07:00
parent 4ea7938965
commit 22d8acbcf1

View File

@ -1166,6 +1166,14 @@ nvme_rdma_ctrlr_scan(enum spdk_nvme_transport transport,
uint8_t *end;
size_t len;
if (entry->subtype == SPDK_NVMF_SUBTYPE_DISCOVERY) {
SPDK_WARNLOG("Skipping unsupported discovery service referral\n");
continue;
} else if (entry->subtype != SPDK_NVMF_SUBTYPE_NVME) {
SPDK_WARNLOG("Skipping unknown subtype %u\n", entry->subtype);
continue;
}
probe_info.trtype = entry->trtype;
if (!spdk_nvme_transport_available(probe_info.trtype)) {
SPDK_WARNLOG("NVMe transport type %u not available; skipping probe\n",