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...
 
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. 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
 
bool create_only
 This flag indicates to the alloc_io_qpair function that it should not perform the connect portion on this qpair. More...
 

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

◆ @25

union { ... }

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.

◆ create_only

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.

◆ 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: