examples/nvme/arbitration: only do the arbitration get/set_features for supported controllers
Change-Id: Ia34564688bdc0dca95d337519b80ef92ef90239d Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463488 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
b97aa6dace
commit
5a8033a5f3
@ -253,6 +253,7 @@ register_ctrlr(struct spdk_nvme_ctrlr *ctrlr)
|
||||
int nsid, num_ns;
|
||||
struct spdk_nvme_ns *ns;
|
||||
struct ctrlr_entry *entry = calloc(1, sizeof(struct ctrlr_entry));
|
||||
union spdk_nvme_cap_register cap = spdk_nvme_ctrlr_get_regs_cap(ctrlr);
|
||||
const struct spdk_nvme_ctrlr_data *cdata = spdk_nvme_ctrlr_get_data(ctrlr);
|
||||
|
||||
if (entry == NULL) {
|
||||
@ -280,7 +281,8 @@ register_ctrlr(struct spdk_nvme_ctrlr *ctrlr)
|
||||
register_ns(ctrlr, ns);
|
||||
}
|
||||
|
||||
if (g_arbitration.arbitration_mechanism == SPDK_NVME_CAP_AMS_WRR) {
|
||||
if (g_arbitration.arbitration_mechanism == SPDK_NVME_CAP_AMS_WRR &&
|
||||
(cap.bits.ams & SPDK_NVME_CAP_AMS_WRR)) {
|
||||
get_arb_feature(ctrlr);
|
||||
|
||||
if (g_arbitration.arbitration_config != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user