NVMe I/O queue pair initialization options. More...
#include <nvme.h>
Data Fields | ||
enum spdk_nvme_qprio | qprio | |
Queue priority for weighted round robin arbitration. | ||
uint32_t | io_queue_size | |
The queue depth of this NVMe I/O queue. | ||
uint32_t | io_queue_requests | |
The number of requests to allocate for this NVMe I/O queue. | ||
union { | ||
bool delay_cmd_submit | ||
bool delay_pcie_doorbell | ||
}; | ||
When submitting I/O via spdk_nvme_ns_read/write and similar functions, don't immediately submit it to hardware. | ||
uint8_t | reserved13 [3] | |
struct { | ||
struct spdk_nvme_cmd * vaddr | ||
uint64_t paddr | ||
uint64_t buffer_size | ||
} | sq | |
These fields allow specifying the memory buffers for the submission and/or completion queues. | ||
struct { | ||
struct spdk_nvme_cpl * vaddr | ||
uint64_t paddr | ||
uint64_t buffer_size | ||
} | cq | |
bool | create_only | |
This flag indicates to the alloc_io_qpair function that it should not perform the connect portion on this qpair. | ||
bool | async_mode | |
This flag if set to true enables the creation of submission and completion queue asynchronously. | ||
bool | disable_pcie_sgl_merge | |
This flag if set to true disables the merging of physically contiguous SGL elements. | ||
uint8_t | reserved67 [5] | |
size_t | opts_size | |
The size of spdk_nvme_io_qpair_opts according to the caller of this library is used for ABI compatibility. | ||
NVMe I/O queue pair initialization options.
These options may be passed to spdk_nvme_ctrlr_alloc_io_qpair() to configure queue pair options at queue creation time.
The user may retrieve the default I/O queue pair creation options for a controller using spdk_nvme_ctrlr_get_default_io_qpair_opts().
union { ... } spdk_nvme_io_qpair_opts |
When submitting I/O via spdk_nvme_ns_read/write and similar functions, 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 commands. Often, it is more efficient to submit batches of commands to the underlying hardware than each command individually.
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.
bool spdk_nvme_io_qpair_opts::async_mode |
This flag if set to true enables the creation of submission and completion queue asynchronously.
Default mode is set to false to create io qpair synchronously.
bool spdk_nvme_io_qpair_opts::create_only |
This flag indicates to the alloc_io_qpair function that it should not perform the connect portion on this qpair.
This allows the user to add the qpair to a poll group and then connect it later.
bool spdk_nvme_io_qpair_opts::disable_pcie_sgl_merge |
This flag if set to true disables the merging of physically contiguous SGL elements.
Default mode is set to false to allow merging of physically contiguous SGL elements.
uint32_t spdk_nvme_io_qpair_opts::io_queue_requests |
The number of requests to allocate for this NVMe I/O queue.
Overrides spdk_nvme_ctrlr_opts::io_queue_requests.
This should be at least as large as io_queue_size.
A single I/O may allocate more than one request, since splitting may be necessary to conform to the device's maximum transfer size, PRP list compatibility requirements, or driver-assisted striping.
uint32_t spdk_nvme_io_qpair_opts::io_queue_size |
The queue depth of this NVMe I/O queue.
Overrides spdk_nvme_ctrlr_opts::io_queue_size.
size_t spdk_nvme_io_qpair_opts::opts_size |
The size of spdk_nvme_io_qpair_opts according to the caller of this library is used for ABI compatibility.
The library uses this field to know how many fields in this structure are valid. And the library will populate any remaining fields with default values. New added fields should be put at the end of the struct.
enum spdk_nvme_qprio spdk_nvme_io_qpair_opts::qprio |
Queue priority for weighted round robin arbitration.
If a different arbitration method is in use, pass 0.
struct { ... } spdk_nvme_io_qpair_opts::sq |
These fields allow specifying the memory buffers for the submission and/or completion queues.
By default, vaddr is set to NULL meaning SPDK will allocate the memory to be used. If vaddr is NULL then paddr must be set to 0. If vaddr is non-NULL, and paddr is zero, SPDK derives the physical address for the NVMe device, in this case the memory must be registered. If a paddr value is non-zero, SPDK uses the vaddr and paddr as passed SPDK assumes that the memory passed is both virtually and physically contiguous. If these fields are used, SPDK will NOT impose any restriction on the number of elements in the queues. The buffer sizes are in number of bytes, and are used to confirm that the buffers are large enough to contain the appropriate queue. These fields are only used by PCIe attached NVMe devices. They are presently ignored for other transports.