nvmf: Make nvmf transport advertise compare

Compare command, when not supported natively by the underlying bdev
is emulated by the bdev layer.

Change nvmf ctrlr data to advertise compare command by default.

Signed-off-by: Alexis Lescouet <alexis.lescouet@nutanix.com>
Change-Id: I88646e6c1a7d7a2829be813ff0241661724bd127
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12918
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: John Levon <levon@movementarian.org>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Alexis Lescouet 2022-05-30 11:20:37 +01:00 committed by Tomasz Zawadzki
parent cbfd581c13
commit 16c65744d8

View File

@ -290,6 +290,7 @@ nvmf_ctrlr_cdata_init(struct spdk_nvmf_transport *transport, struct spdk_nvmf_su
cdata->ieee[0] = 0xe4;
cdata->ieee[1] = 0xd2;
cdata->ieee[2] = 0x5c;
cdata->oncs.compare = 1;
cdata->oncs.reservations = 1;
cdata->fuses.compare_and_write = 1;
cdata->sgls.supported = 1;
@ -2690,6 +2691,7 @@ spdk_nvmf_ctrlr_identify_ctrlr(struct spdk_nvmf_ctrlr *ctrlr, struct spdk_nvme_c
cdata->nvmf_specific = ctrlr->cdata.nvmf_specific;
cdata->oncs.compare = ctrlr->cdata.oncs.compare;
cdata->oncs.dsm = nvmf_ctrlr_dsm_supported(ctrlr);
cdata->oncs.write_zeroes = nvmf_ctrlr_write_zeroes_supported(ctrlr);
cdata->oncs.reservations = ctrlr->cdata.oncs.reservations;