Backends#

Below is a list of backends and the system interfaces and libraries they encapsulate. These backends implement the Backend Interface within the xNVMe library, offering a unified interface through the xNVMe API. This enables you to switch between system interfaces, libraries, and drivers at runtime without altering your application logic.

While xNVMe abstracts away most differences, it’s still important to understand the specifics related to your platform, system interfaces, and supporting libraries. For each backend we will cover the following topics: System configuration, device identification, and backend instrumentation.

System Configuration

Some backends or I/O interfaces require you to configure your system in a certain way to use them. Examples include using a specific OS kernel or running a script to attach or detach devices.

Device Identification

The schema for identifying devices differ across platforms and interfaces. Varying from file device handles, e.g. /dev/nvme0n1, to PCI device handles, e.g. 0000:02:00.0, and NVMe/TCP endpoints, e.g. 172.10.10.10:4420.

Backend Instrumentation

On a given platform multiple interface may be available. At runtime, the xNVMe library makes a decision on which interface to use. You can overrule this decision, however, to do so, you need to know what the available options are, what they are named, and what they offer.

The valid combinations of interfaces and backends are listed below:

Asynchronous I/O#

Linux

FreeBSD

Windows

macOS

SPDK

libvfn

io_uring

yes

no

no

no

no

no

io_uring passthru

yes

no

no

no

no

no

libaio

yes

no

no

no

no

no

kqueue

no

yes

no

no

no

no

POSIX aio

yes

yes

no

yes

no

no

NVMe Driver (vfio-pci)

no

no

no

no

yes

yes

NVMe Driver (uio-generic)

no

no

no

no

yes

no

I/O Control Ports

no

no

yes

no

no

no

I/O Ring

no

no

yes

no

no

no

emu

yes

yes

yes

yes

yes

yes

thrpool

yes

yes

yes

yes

yes

yes

nil

yes

yes

yes

yes

yes

yes

Synchronous I/O and Admin Commands#

Linux

FreeBSD

Windows

macOS

SPDK

libvfn

psync

yes

yes

yes

yes

no

no

Block-Layer ioctl()

yes

no

yes

no

no

no

NVMe Driver ioctl()

yes

yes

yes

no

no

no

NVMe Driver (vfio-pci)

no

no

no

no

yes

yes

NVMe Driver (uio-generic)

no

no

no

no

yes

no

Memory interfaces#

Linux

FreeBSD

Windows

macOS

SPDK

libvfn

libc

yes

yes

yes

yes

yes

yes

hugepages

yes

no

no

no

no

no