Commit ffc7c4a9 authored by Evgeniy Kochetov's avatar Evgeniy Kochetov Committed by Tomasz Zawadzki
Browse files

nvme: Rename 'delay_pcie_doorbell' to 'delay_cmd_submit'



'delay_pcie_doorbel' parameter in 'spdk_nvme_io_qpair_opts' structure
was renamed to 'delay_cmd_submit' to make it suitable for every
transport. Old name is also kept for backward compatibility.

Signed-off-by: default avatarEvgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: default avatarSasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: default avatarAlexey Marchuk <alexeymar@mellanox.com>
Change-Id: I09ef8028133c4a3d4a5bbc5329ced1f065bcaa46
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475305


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
parent 5170ac8d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -25,6 +25,11 @@ Added `blobfs_set_cache_size` RPC method to set cache size for blobstore filesys
`spdk_pipe`, a new utility for buffering data from sockets or files for parsing
has been added. The public API is available at `include/spdk/pipe.h`.

### nvme

`delayed_pcie_doorbell` parameter in `spdk_nvme_io_qpair_opts` was renamed to `delay_cmd_submit`
to allow reuse in other transports.

## v19.10:

### rpc
+3 −3
Original line number Diff line number Diff line
/*-
 *   BSD LICENSE
 *
 *   Copyright (c) Intel Corporation.
 *   All rights reserved.
 *   Copyright (c) Intel Corporation. All rights reserved.
 *   Copyright (c) 2019 Mellanox Technologies LTD. All rights reserved.
 *
 *   Redistribution and use in source and binary forms, with or without
 *   modification, are permitted provided that the following conditions
@@ -313,7 +313,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
	}

	spdk_nvme_ctrlr_get_default_io_qpair_opts(fio_ctrlr->ctrlr, &qpopts, sizeof(qpopts));
	qpopts.delay_pcie_doorbell = true;
	qpopts.delay_cmd_submit = true;

	fio_qpair->qpair = spdk_nvme_ctrlr_alloc_io_qpair(fio_ctrlr->ctrlr, &qpopts, sizeof(qpopts));
	if (!fio_qpair->qpair) {
+1 −1
Original line number Diff line number Diff line
@@ -597,7 +597,7 @@ nvme_init_ns_worker_ctx(struct ns_worker_ctx *ns_ctx)
	if (opts.io_queue_requests < entry->num_io_requests) {
		opts.io_queue_requests = entry->num_io_requests;
	}
	opts.delay_pcie_doorbell = true;
	opts.delay_cmd_submit = true;

	for (i = 0; i < ns_ctx->u.nvme.num_qpairs; i++) {
		ns_ctx->u.nvme.qpair[i] = spdk_nvme_ctrlr_alloc_io_qpair(entry->u.nvme.ctrlr, &opts,
+16 −8
Original line number Diff line number Diff line
/*-
 *   BSD LICENSE
 *
 *   Copyright (c) Intel Corporation.
 *   All rights reserved.
 *   Copyright (c) Intel Corporation. All rights reserved.
 *   Copyright (c) 2019 Mellanox Technologies LTD. All rights reserved.
 *
 *   Redistribution and use in source and binary forms, with or without
 *   modification, are permitted provided that the following conditions
@@ -1032,14 +1032,22 @@ struct spdk_nvme_io_qpair_opts {

	/**
	 * When submitting I/O via spdk_nvme_ns_read/write and similar functions,
	 * don't immediately write the submission queue doorbell. Instead, write
	 * to the doorbell as necessary inside spdk_nvme_qpair_process_completions().
	 * don't immediately submit it to hardware. Instead, queue up new commands
	 * and submit them to the hardware inside spdk_nvme_qpair_process_completions().
	 *
	 * This results in better batching of I/O submission and consequently fewer
	 * MMIO writes to the doorbell, which may increase performance.
	 * This results in better batching of I/O commands. Often, it is more efficient
	 * to submit batches of commands to the underlying hardware than each command
	 * individually.
	 *
	 * This only applies to local PCIe devices. */
	 * This only applies to PCIe and RDMA transports.
	 *
	 * The flag was originally named delay_pcie_doorbell. To allow backward compatibility
	 * both names are kept in unnamed union.
	 */
	union {
		bool delay_cmd_submit;
		bool delay_pcie_doorbell;
	};

	/**
	 * These fields allow specifying the memory buffers for the submission and/or
+4 −4
Original line number Diff line number Diff line
/*-
 *   BSD LICENSE
 *
 *   Copyright (c) Intel Corporation.
 *   All rights reserved.
 *   Copyright (c) Intel Corporation. All rights reserved.
 *   Copyright (c) 2019 Mellanox Technologies LTD. All rights reserved.
 *
 *   Redistribution and use in source and binary forms, with or without
 *   modification, are permitted provided that the following conditions
@@ -253,8 +253,8 @@ spdk_nvme_ctrlr_get_default_io_qpair_opts(struct spdk_nvme_ctrlr *ctrlr,
		opts->io_queue_requests = ctrlr->opts.io_queue_requests;
	}

	if (FIELD_OK(delay_pcie_doorbell)) {
		opts->delay_pcie_doorbell = false;
	if (FIELD_OK(delay_cmd_submit)) {
		opts->delay_cmd_submit = false;
	}

	if (FIELD_OK(sq.vaddr)) {
Loading