Commit 516afb9a authored by Ben Walker's avatar Ben Walker Committed by Tomasz Zawadzki
Browse files

nvmf: Allow fabrics get/set on ASQ and ACQ



This is meaningless for network devices, but will be useful
when emulating the more complete register state of local devices.

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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 84479ab6
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -766,6 +766,34 @@ nvmf_prop_set_aqa(struct spdk_nvmf_ctrlr *ctrlr, uint64_t value)
	return true;
}

static uint64_t
nvmf_prop_get_asq(struct spdk_nvmf_ctrlr *ctrlr)
{
	return ctrlr->vcprop.asq;
}

static bool
nvmf_prop_set_asq(struct spdk_nvmf_ctrlr *ctrlr, uint64_t value)
{
	ctrlr->vcprop.asq = value;

	return true;
}

static uint64_t
nvmf_prop_get_acq(struct spdk_nvmf_ctrlr *ctrlr)
{
	return ctrlr->vcprop.acq;
}

static bool
nvmf_prop_set_acq(struct spdk_nvmf_ctrlr *ctrlr, uint64_t value)
{
	ctrlr->vcprop.acq = value;

	return true;
}

struct nvmf_prop {
	uint32_t ofst;
	uint8_t size;
@@ -788,6 +816,8 @@ static const struct nvmf_prop nvmf_props[] = {
	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),
	PROP(asq,  8, nvmf_prop_get_asq,  nvmf_prop_set_asq),
	PROP(acq,  8, nvmf_prop_get_acq,  nvmf_prop_set_acq),
};

static const struct nvmf_prop *
+2 −0
Original line number Diff line number Diff line
@@ -200,6 +200,8 @@ struct spdk_nvmf_ctrlr {
		union spdk_nvme_cc_register	cc;
		union spdk_nvme_csts_register	csts;
		union spdk_nvme_aqa_register	aqa;
		uint64_t			asq;
		uint64_t			acq;
	} vcprop; /* virtual controller properties */

	struct spdk_nvmf_ctrlr_feat feat;