From 2a65e28e5693ebcde103d7b52e27fe295bafeba3 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Thu, 29 Aug 2019 03:18:17 -0400 Subject: [PATCH] examples/nvme/identify: display Arbitration Burst for round robin arbitration Arbitration Burst is valid for both round robin and weighted round robin arbitration. Change-Id: I0046194ef510bf255ac0527bc6b1d2dc0648b7cb Signed-off-by: Changpeng Liu Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466686 Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto Tested-by: SPDK CI Jenkins --- examples/nvme/identify/identify.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/nvme/identify/identify.c b/examples/nvme/identify/identify.c index 40beb758e..46aecbc45 100644 --- a/examples/nvme/identify/identify.c +++ b/examples/nvme/identify/identify.c @@ -1247,7 +1247,7 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_transport } printf("\n"); - if (features[SPDK_NVME_FEAT_ARBITRATION].valid && (cap.bits.ams & SPDK_NVME_CAP_AMS_WRR)) { + if (features[SPDK_NVME_FEAT_ARBITRATION].valid) { uint32_t arb = features[SPDK_NVME_FEAT_ARBITRATION].result; unsigned ab, lpw, mpw, hpw; @@ -1264,9 +1264,12 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_transport } else { printf("%u\n", 1u << ab); } - printf("Low Priority Weight: %u\n", lpw); - printf("Medium Priority Weight: %u\n", mpw); - printf("High Priority Weight: %u\n", hpw); + + if (cap.bits.ams & SPDK_NVME_CAP_AMS_WRR) { + printf("Low Priority Weight: %u\n", lpw); + printf("Medium Priority Weight: %u\n", mpw); + printf("High Priority Weight: %u\n", hpw); + } printf("\n"); }