Commit 11379837 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

nvme_perf: Check completion status for each IO



Perf tool had checked status of each NVMe IO command submission but
had not checked completion status of each NVMe IO command processing.

This patch checks the completion status of each NVMe IO command
processing and prints error if found.

No error handling is not implemented yet but this addtion will be
of any help for subsequent DIF patches.

Change-Id: I8da52d97584d7688cff04092efee658556cf7d86
Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/439966


Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarwuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 3f836b03
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -619,7 +619,7 @@ task_extended_lba_pi_verify(struct ns_entry *entry, struct perf_task *task,
	}
}

static void io_complete(void *ctx, const struct spdk_nvme_cpl *completion);
static void io_complete(void *ctx, const struct spdk_nvme_cpl *cpl);

static __thread unsigned int seed = 0;

@@ -738,9 +738,17 @@ task_complete(struct perf_task *task)
}

static void
io_complete(void *ctx, const struct spdk_nvme_cpl *completion)
io_complete(void *ctx, const struct spdk_nvme_cpl *cpl)
{
	task_complete((struct perf_task *)ctx);
	struct perf_task *task = ctx;

	if (spdk_nvme_cpl_is_error(cpl)) {
		fprintf(stderr, "%s completed with error (sct=%d, sc=%d)\n",
			task->is_read ? "Read" : "Write",
			cpl->status.sct, cpl->status.sc);
	}

	task_complete(task);
}

static void