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: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/419 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
50132e4810
commit
84479ab6e3
@ -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 *
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user