掌握SPDK 常用的API是深入理解SPDK的好方法。下面总结了SPDK 最主要的一些API。
主要的feature列表
spdk/nvme.h
Key Functions Description
spdk_nvme_probe() Enumerate the bus indicated by the transport ID and attach the userspace NVMe driver to each device found if desired.
spdk_nvme_ctrlr_alloc_io_qpair() Allocate an I/O queue pair (submission and completion queue).
spdk_nvme_ctrlr_get_ns() Get a handle to a namespace for the given controller.
spdk_nvme_ns_cmd_read() Submits a read I/O to the specified NVMe namespace.
spdk_nvme_ns_cmd_readv() Submit a read I/O to the specified NVMe namespace.
spdk_nvme_ns_cmd_read_with_md() Submits a read I/O to the specified NVMe namespace.
spdk_nvme_ns_cmd_write() Submit a write I/O to the specified NVMe namespace.
spdk_nvme_ns_cmd_writev() Submit a write I/O to the specified NVMe namespace.
spdk_nvme_ns_cmd_write_with_md() Submit a write I/O to the specified NVMe namespace.
spdk_nvme_ns_cmd_write_zeroes() Submit a write zeroes I/O to the specified NVMe namespace.
spdk_nvme_ns_cmd_dataset_management() Submit a data set management request to the specified NVMe namespace.
spdk_nvme_ns_cmd_flush() Submit a flush request to the specified NVMe namespace.
spdk_nvme_qpair_process_completions() Process any outstanding completions for I/O submitted on a queue pair.
spdk_nvme_ctrlr_cmd_admin_raw() Send the given admin command to the NVMe controller.
spdk_nvme_ctrlr_process_admin_completions() Process any outstanding completions for admin commands.
spdk_nvme_ctrlr_cmd_io_raw() Send the given NVM I/O command to the NVMe controller.
spdk_nvme_ctrlr_cmd_io_raw_with_md() Send the given NVM I/O command with metadata to the NVMe controller.
原文地址:http://blog.51cto.com/xiamachao/2350486
时间: 2024-10-26 21:24:08