Commit 6c6efee8 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

lib/nvme: Set Add ANA log page to be supported by controller



If ctrlr->cdata.cmic.ana_reporting is 1, set the corresponding
field to true.

Then use its API in the identify application.

Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4e74bc4c114883e4aecdbee7a6f1a02027db23a5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4156


Community-CI: Broadcom CI
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent a6db2f35
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -458,7 +458,7 @@ get_log_pages(struct spdk_nvme_ctrlr *ctrlr)
		}
	}

	if (cdata->cmic.ana_reporting) {
	if (spdk_nvme_ctrlr_is_log_page_supported(ctrlr, SPDK_NVME_LOG_ASYMMETRIC_NAMESPACE_ACCESS)) {
		/* We always set RGO (Return Groups Only) to 0 in this tool, an ANA group
		 * descriptor is returned only if that ANA group contains namespaces
		 * that are attached to the controller processing the command, and
+3 −0
Original line number Diff line number Diff line
@@ -690,6 +690,9 @@ nvme_ctrlr_set_supported_log_pages(struct spdk_nvme_ctrlr *ctrlr)
	if (ctrlr->cdata.vid == SPDK_PCI_VID_INTEL && !(ctrlr->quirks & NVME_INTEL_QUIRK_NO_LOG_PAGES)) {
		rc = nvme_ctrlr_set_intel_support_log_pages(ctrlr);
	}
	if (ctrlr->cdata.cmic.ana_reporting) {
		ctrlr->log_page_supported[SPDK_NVME_LOG_ASYMMETRIC_NAMESPACE_ACCESS] = true;
	}

	return rc;
}