Commit 87b7f286 authored by Changpeng Liu's avatar Changpeng Liu Committed by Jim Harris
Browse files

examples/nvme/perf: enable no_shn_notification option



Users can use '-N' option to disable shutdown notification
for faster shutdown process.

Change-Id: I227dc4da3aa2f89d23f9b235e979cb6d3e25d635
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463950


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 2226750a
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -185,6 +185,7 @@ static bool g_no_pci;
static bool g_warn;
static bool g_header_digest;
static bool g_data_digest;
static bool g_no_shn_notification = false;
static uint32_t g_keep_alive_timeout_in_ms = 0;

static const char *g_core_mask;
@@ -869,6 +870,7 @@ static void usage(char *program_name)
	printf("\t[-D disable submission queue in controller memory buffer, default: enabled]\n");
	printf("\t[-H enable header digest for TCP transport, default: disabled]\n");
	printf("\t[-I enable data digest for TCP transport, default: disabled]\n");
	printf("\t[-N no shutdown notification process for controllers, default: disabled]\n");
	printf("\t[-r Transport ID for local PCIe NVMe or NVMeoF]\n");
	printf("\t Format: 'key:value [key:value] ...'\n");
	printf("\t Keys:\n");
@@ -1308,7 +1310,7 @@ parse_args(int argc, char **argv)
	g_core_mask = NULL;
	g_max_completions = 0;

	while ((op = getopt(argc, argv, "c:e:i:lm:n:o:q:r:k:s:t:w:DGHILM:U:V")) != -1) {
	while ((op = getopt(argc, argv, "c:e:i:lm:n:o:q:r:k:s:t:w:DGHILM:NU:V")) != -1) {
		switch (op) {
		case 'i':
		case 'm':
@@ -1403,6 +1405,9 @@ parse_args(int argc, char **argv)
		case 'L':
			g_latency_sw_tracking_level++;
			break;
		case 'N':
			g_no_shn_notification = true;
			break;
		case 'V':
			g_vmd = true;
			break;
@@ -1564,6 +1569,9 @@ probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
		if (g_disable_sq_cmb) {
			opts->use_cmb_sqs = false;
		}
		if (g_no_shn_notification) {
			opts->no_shn_notification = true;
		}

		printf("Attaching to NVMe Controller at %s\n",
		       trid->traddr);
+3 −1
Original line number Diff line number Diff line
@@ -104,7 +104,9 @@ done
timing_exit identify

timing_enter perf
$rootdir/examples/nvme/perf/perf -q 128 -w read -o 12288 -t 1 -LL -i 0
#enable no shutdown notification option
$rootdir/examples/nvme/perf/perf -q 128 -w read -o 12288 -t 1 -LL -i 0 -N
$rootdir/examples/nvme/perf/perf -q 128 -w write -o 12288 -t 1 -LL -i 0
timing_exit perf

timing_enter reserve