Commit 84479ab6 authored by Ben Walker's avatar Ben Walker Committed by Tomasz Zawadzki
Browse files

nvmf: Allow fabrics commands to get and set aqa



This doesn't do anything for a network fabric, but it doesn't
hurt to allow these commands to set the emulated register
values for AQA. This will be more useful when emulating a
physical NVMe device.

Change-Id: I2891d7a07a5dceff50c6d66a8ce0b6b7c22a79f8
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/419


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 50132e48
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -752,6 +752,20 @@ nvmf_prop_get_csts(struct spdk_nvmf_ctrlr *ctrlr)
	return ctrlr->vcprop.csts.raw;
}

static uint64_t
nvmf_prop_get_aqa(struct spdk_nvmf_ctrlr *ctrlr)
{
	return ctrlr->vcprop.aqa.raw;
}

static bool
nvmf_prop_set_aqa(struct spdk_nvmf_ctrlr *ctrlr, uint64_t value)
{
	ctrlr->vcprop.aqa.raw = (uint32_t)value;

	return true;
}

struct nvmf_prop {
	uint32_t ofst;
	uint8_t size;
@@ -773,6 +787,7 @@ static const struct nvmf_prop nvmf_props[] = {
	PROP(vs,   4, nvmf_prop_get_vs,   NULL),
	PROP(cc,   4, nvmf_prop_get_cc,   nvmf_prop_set_cc),
	PROP(csts, 4, nvmf_prop_get_csts, NULL),
	PROP(aqa,  4, nvmf_prop_get_aqa,  nvmf_prop_set_aqa),
};

static const struct nvmf_prop *
+1 −0
Original line number Diff line number Diff line
@@ -199,6 +199,7 @@ struct spdk_nvmf_ctrlr {
		union spdk_nvme_vs_register	vs;
		union spdk_nvme_cc_register	cc;
		union spdk_nvme_csts_register	csts;
		union spdk_nvme_aqa_register	aqa;
	} vcprop; /* virtual controller properties */

	struct spdk_nvmf_ctrlr_feat feat;