spdk_nvme_io_qpair_opts Struct Reference

NVMe I/O queue pair initialization options. More...

Collaboration diagram for spdk_nvme_io_qpair_opts:

Data Fields

enum spdk_nvme_qprio qprio
 Queue priority for weighted round robin arbitration. More...
 
uint32_t io_queue_size
 The queue depth of this NVMe I/O queue. More...
 
uint32_t io_queue_requests
 The number of requests to allocate for this NVMe I/O queue. More...
 
bool delay_pcie_doorbell
 When submitting I/O via spdk_nvme_ns_read/write and similar functions, don't immediately write the submission queue doorbell. More...
 
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. More...
 
struct {
   struct spdk_nvme_cpl *   vaddr
 
   uint64_t   paddr
 
   uint64_t   buffer_size
 
cq
 

Detailed Description

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().

Field Documentation

◆ delay_pcie_doorbell

bool spdk_nvme_io_qpair_opts::delay_pcie_doorbell

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().

This results in better batching of I/O submission and consequently fewer MMIO writes to the doorbell, which may increase performance.

This only applies to local PCIe devices.

◆ io_queue_requests

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.

◆ io_queue_size

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.

◆ qprio

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.

◆ sq

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.


The documentation for this struct was generated from the following file: