Commit 22d8acbc authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 4ea79389
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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",