26 #ifndef NVMF_DOCA_IO_H_
27 #define NVMF_DOCA_IO_H_
31 #include <sys/queue.h>
33 #include <spdk/nvmf_transport.h>
47 #define NVMF_DOCA_CQE_SIZE 16
48 #define NVMF_DOCA_SQE_SIZE 64
50 #define DMA_POOL_DATA_BUFFER_SIZE (1UL << 12)
61 struct doca_comch_msgq *
msgq;
87 struct doca_devemu_pci_db *
db;
111 struct spdk_nvmf_request
request;
147 struct spdk_nvmf_qpair
spdk_qp;
150 struct doca_devemu_pci_db *
db;
167 struct doca_buf *dst,
168 struct doca_buf *
src,
186 struct doca_devemu_pci_db_completion *
db_comp;
187 struct doca_devemu_pci_msix *
msix;
334 struct doca_buf *dst_buffer,
335 struct doca_buf *src_buffer,
static uint64_t *restrict src
uint64_t doca_dpa_dev_devemu_pci_db_t
DPA handle for emulated PCI device doorbell.
uint64_t doca_dpa_dev_uintptr_t
DPA pointer type definition.
enum doca_error doca_error_t
DOCA API return codes.
void(* nvmf_doca_req_cb)(struct nvmf_doca_request *doca_req, void *cb_arg)
void(* nvmf_doca_sq_stop_cb)(struct nvmf_doca_sq *sq)
struct doca_buf * nvmf_doca_sq_get_dpu_buffer(struct nvmf_doca_sq *sq)
struct doca_buf * nvmf_doca_sq_get_host_buffer(struct nvmf_doca_sq *sq, uintptr_t host_io_address)
void nvmf_doca_request_free(struct nvmf_doca_request *request)
void(* nvmf_doca_sq_fetch_sqe_cb)(struct nvmf_doca_sq *sq, struct nvmf_doca_sqe *sqe, uint16_t sqe_idx)
void nvmf_doca_io_add_sq(struct nvmf_doca_io *io, const struct nvmf_doca_io_add_sq_attr *attr, struct nvmf_doca_sq *sq)
void(* nvmf_doca_io_stop_cb)(struct nvmf_doca_io *io)
void nvmf_doca_request_complete(struct nvmf_doca_request *request)
@ NVMF_DOCA_SQ_STATE_UNBIND_DB_REQUESTED
@ NVMF_DOCA_SQ_STATE_READY
@ NVMF_DOCA_SQ_STATE_BIND_DB_DONE
@ NVMF_DOCA_SQ_STATE_BIND_DB_REQUESTED
@ NVMF_DOCA_SQ_STATE_UNBIND_DB_DONE
@ NVMF_DOCA_SQ_STATE_INITIAL
void(* nvmf_doca_sq_copy_data_cb)(struct nvmf_doca_sq *sq, struct doca_buf *dst, struct doca_buf *src, union doca_data user_data)
void nvmf_doca_sq_copy_data(struct nvmf_doca_sq *sq, struct doca_buf *dst_buffer, struct doca_buf *src_buffer, size_t length, union doca_data user_data)
void(* nvmf_doca_cq_post_cqe_cb)(struct nvmf_doca_cq *cq, union doca_data user_data)
struct nvmf_doca_request * nvmf_doca_request_get(struct nvmf_doca_sq *sq)
void nvmf_doca_io_destroy(struct nvmf_doca_io *io)
doca_error_t nvmf_doca_io_create(const struct nvmf_doca_io_create_attr *attr, struct nvmf_doca_io *io)
#define NVMF_DOCA_SQE_SIZE
void nvmf_doca_sq_stop(struct nvmf_doca_sq *sq)
@ NVMF_DOCA_SQ_DB_UNBOUND
@ NVMF_DOCA_SQ_DB_UNBIND_REQUESTED
@ NVMF_DOCA_SQ_DB_BIND_REQUESTED
void nvmf_doca_io_stop(struct nvmf_doca_io *io)
#define NVMF_DOCA_CQE_SIZE
void nvmf_doca_io_post_cqe(struct nvmf_doca_io *io, const struct nvmf_doca_cqe *cqe, union doca_data user_data)
void nvmf_doca_io_rm_sq(struct nvmf_doca_sq *sq)
__UINTPTR_TYPE__ uintptr_t
struct doca_devemu_pci_db * db
struct nvmf_doca_queue queue
uint8_t data[NVMF_DOCA_CQE_SIZE]
struct doca_buf_inventory * host_data_inventory
struct doca_mmap * host_data_mmap
struct doca_mmap * local_data_mmap
struct doca_buf_pool * local_data_pool
struct doca_comch_consumer_completion * consumer_comp
struct nvmf_doca_dpa_msgq recv
struct nvmf_doca_dpa_msgq send
struct doca_dpa_completion * producer_comp
struct doca_comch_consumer * consumer
struct doca_comch_msgq * msgq
struct doca_comch_producer * producer
doca_dpa_dev_uintptr_t arg
struct doca_dpa_thread * thread
struct spdk_nvmf_transport * transport
struct doca_devemu_pci_dev * nvme_dev
struct doca_mmap * host_sq_mmap
uintptr_t host_sq_address
struct doca_mmap * host_cq_mmap
nvmf_doca_sq_copy_data_cb copy_data_cb
nvmf_doca_cq_post_cqe_cb post_cqe_cb
uintptr_t host_cq_address
nvmf_doca_sq_fetch_sqe_cb fetch_sqe_cb
nvmf_doca_io_stop_cb stop_io_cb
nvmf_doca_sq_stop_cb stop_sq_cb
struct doca_devemu_pci_dev * nvme_dev
struct nvmf_doca_pci_dev_poll_group * poll_group
struct doca_devemu_pci_db_completion * db_comp
TAILQ_ENTRY(nvmf_doca_io) pci_dev_pg_link
struct nvmf_doca_dpa_comch comch
nvmf_doca_io_stop_cb stop_io_cb
TAILQ_HEAD(, nvmf_doca_sq) sq_list
struct nvmf_doca_pci_dev_admin * pci_dev_admin
struct nvmf_doca_dpa_thread dpa_thread
struct doca_devemu_pci_msix * msix
nvmf_doca_cq_post_cqe_cb post_cqe_cb
nvmf_doca_sq_stop_cb stop_sq_cb
nvmf_doca_sq_copy_data_cb copy_data_cb
TAILQ_ENTRY(nvmf_doca_io) pci_dev_admin_link
nvmf_doca_sq_fetch_sqe_cb fetch_sqe_cb
struct doca_mmap * local_queue_mmap
struct doca_buf_inventory * inventory
struct doca_dma_task_memcpy ** elements
void * local_queue_address
struct spdk_nvme_cpl cq_entry
struct doca_buf * prp_dpu_buf
struct doca_buf * dpu_buffer[NVMF_REQ_MAX_BUFFERS]
TAILQ_ENTRY(nvmf_doca_request) link
struct spdk_nvmf_request request
struct doca_buf * host_buffer[NVMF_REQ_MAX_BUFFERS]
struct nvmf_doca_sq * doca_sq
struct doca_buf * prp_host_buf
struct spdk_nvme_cmd command
enum nvmf_doca_sq_db_state db_state
struct nvmf_doca_request * request_pool_memory
TAILQ_ENTRY(nvmf_doca_sq) pci_dev_admin_link
TAILQ_ENTRY(nvmf_doca_sq) link
TAILQ_HEAD(, nvmf_doca_request) request_pool
doca_dpa_dev_devemu_pci_db_t db_handle
struct nvmf_doca_dma_pool dma_pool
struct doca_devemu_pci_db * db
struct spdk_nvmf_qpair spdk_qp
struct nvmf_doca_queue queue
enum nvmf_doca_sq_state state
uint8_t data[NVMF_DOCA_SQE_SIZE]
Convenience type for representing opaque data.