30 #include <spdk/util.h>
39 #define CACHELINE_SIZE_BYTES 64
110 DOCA_LOG_ERR(
"Failed to handle DPA message: Received unknown message type %d", msg->
type);
126 (void)task_user_data;
136 DOCA_LOG_ERR(
"DPA MsgQ receive callback failed: Failed to resubmit receive task - %s",
155 (void)task_user_data;
174 (void)task_user_data;
193 (void)task_user_data;
210 struct doca_ctx *
ctx,
219 switch (next_state) {
256 struct doca_ctx *consumer_ctx;
257 struct doca_ctx *producer_ctx;
260 memset(msgq, 0,
sizeof(*msgq));
266 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA MsgQ: Failed to create MsgQ - %s",
272 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA MsgQ: Failed to set max number of consumers - %s",
278 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA MsgQ: Failed to set max number of producers - %s",
286 "Failed to create NVMf DOCA DPA MsgQ: Failed to failed to set consumer to DPA - %s",
294 "Failed to create NVMf DOCA DPA MsgQ: Failed to failed to set producer to DPA - %s",
301 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA MsgQ: Failed to start MsgQ - %s",
308 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA MsgQ: Failed to create consumer - %s",
315 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA MsgQ: Failed to set consumer immediate data length - %s",
324 "Failed to create NVMf DOCA DPA MsgQ: Failed to set consumer data path to DPA - %s",
330 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA MsgQ: Failed to set consumer completion - %s",
337 "Failed to create NVMf DOCA DPA MsgQ: Failed to set consumer max number of receive messages - %s",
347 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA MsgQ: Failed to set consumer user data - %s",
354 "Failed to create NVMf DOCA DPA MsgQ: Failed to set consumer context state changed callback - %s",
361 "Failed to create NVMf DOCA DPA MsgQ: Failed to connect consumer to progress engine - %s",
371 "Failed to create NVMf DOCA DPA MsgQ: Failed to set consumer task configurations - %s",
378 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA MsgQ: Failed to start consumer - %s",
385 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA MsgQ: Failed to create producer - %s",
396 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA MsgQ: Failed to set producer user data - %s",
403 "Failed to create NVMf DOCA DPA MsgQ: Failed to set producer context state changed callback - %s",
410 "Failed to create NVMf DOCA DPA MsgQ: Failed to connect producer to progress engine - %s",
420 "Failed to create NVMf DOCA DPA MsgQ: Failed to set producer task configurations - %s",
429 "Failed to create NVMf DOCA DPA MsgQ: Failed to set producer data path to DPA - %s",
436 "Failed to create NVMf DOCA DPA MsgQ: Failed to set producer max number of send messages - %s",
442 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA MsgQ: Failed to set producer completion - %s",
449 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA MsgQ: Failed to start producer - %s",
467 struct doca_ctx *
ctx;
494 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DPA MsgQ: Failed to stop producer - %s",
499 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DPA MsgQ: Failed to destroy producer - %s",
508 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DPA MsgQ: Failed to stop consumer - %s",
513 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DPA MsgQ: Failed to destroy consumer - %s",
522 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DPA MsgQ: Failed to stop MsgQ - %s",
527 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DPA MsgQ: Failed to destroy MsgQ - %s",
546 struct doca_comch_producer_task_send *send_task;
554 DOCA_LOG_ERR(
"Failed to send msg using NVMf DOCA DPA MsgQ: Failed to allocate send task - %s",
562 DOCA_LOG_ERR(
"Failed to send msg using NVMf DOCA DPA MsgQ: Failed to submit send task - %s",
592 memset(comch, 0,
sizeof(*comch));
596 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA comch: Failed to create consumer completion - %s",
603 "Failed to create NVMf DOCA DPA comch: Failed to set consumer completion max number of receive messages - %s",
610 "Failed to create NVMf DOCA DPA comch: Failed to set consumer completion immediate data length - %s",
616 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA comch: Failed to set consumer completion DPA thread - %s",
622 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA comch: Failed to start consumer completion - %s",
629 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA comch: Failed to create producer completion - %s",
635 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA comch: Failed to set producer completion DPA thread - %s",
641 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA comch: Failed to start producer completion - %s",
666 for (uint32_t idx = 0; idx < attr->
max_num_msg; idx++) {
667 struct doca_comch_consumer_task_post_recv *recv_task;
671 "Failed to create NVMf DOCA DPA comch: Failed to allocate receive message at idx %u - %s",
680 "Failed to create NVMf DOCA DPA comch: Failed to submit receive message at idx %u - %s",
704 DOCA_LOG_ERR(
"Failed to check if context is idle: Failed to get context state - %s",
767 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DPA comch: Failed to stop producer completion - %s",
772 "Failed to destroy NVMf DOCA DPA comch: Failed to destroy producer completion - %s",
780 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DPA comch: Failed to stop consumer completion - %s",
785 "Failed to destroy NVMf DOCA DPA comch: Failed to destroy consumer completion - %s",
815 struct doca_ctx *dma_ctx;
818 memset(queue, 0,
sizeof(*queue));
824 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to create inventory - %s",
830 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to start inventory - %s",
837 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to create DMA context - %s",
843 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to set DMA context task consigurations - %s",
850 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to connect DMA context to progress engine - %s",
858 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to set DMA context user data - %s",
864 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to set DMA context state changed callback - %s",
870 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to start DMA context - %s",
875 uint32_t queue_size = num_elements * attr->
element_size;
878 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to allocate memory for local queue");
884 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to create local queue mmap - %s",
890 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to create local queue mmap - %s",
898 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to set local queue mmap permissions - %s",
904 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to add device to local queue mmap - %s",
910 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to start local queue mmap - %s",
917 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to allocate memory for queue element tasks");
921 for (uint32_t idx = 0; idx < num_elements; idx++) {
923 struct doca_buf *local_element_buf;
926 local_element_address,
930 DOCA_LOG_ERR(
"Failed to create NVMf DOCA Queue: Failed to get local buffer from inventory - %s",
936 struct doca_buf *remote_element_buf;
939 remote_element_address,
941 &remote_element_buf);
944 "Failed to create NVMf DOCA Queue: Failed to get remote buffer from inventory - %s",
950 struct doca_buf *src_buf = attr->
is_read_from_remote ? remote_element_buf : local_element_buf;
951 struct doca_buf *dst_buf = attr->
is_read_from_remote ? local_element_buf : remote_element_buf;
956 "Failed to create NVMf DOCA Queue: Failed to set data length of source buffer for element at index %u - %s",
970 "Failed to create NVMf DOCA Queue: Failed to allocate DMA task for element at index %u - %s",
995 for (uint32_t idx = 0; idx < queue->
num_elements; idx++) {
996 struct doca_dma_task_memcpy *element = queue->
elements[idx];
1007 "Failed to destroy NVMf DOCA Queue: Failed to free source buffer at index %u - %s",
1013 "Failed to destroy NVMf DOCA Queue: Failed to free destination buffer at index %u - %s",
1037 DOCA_LOG_ERR(
"Failed to check if context is idle: Failed to get context state - %s",
1056 size_t num_inflight;
1064 DOCA_LOG_ERR(
"Failed to stop NVMf DOCA Queue: Failed to stop DMA context - %s",
1070 DOCA_LOG_ERR(
"Failed to stop NVMf DOCA Queue: Failed to get number of inflight DMA tasks - %s",
1074 if (num_inflight == 0) {
1093 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA Queue: Failed to destroy local queue mmap %s",
1106 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA Queue: Failed to stop DMA context %s",
1110 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA Queue: Failed to destroy DMA context %s",
1118 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA Queue: Failed to destroy inventory %s",
1165 struct doca_buf *host_cqe_buf;
1166 const struct doca_buf *dpu_cqe_buf;
1170 struct doca_dma_task_memcpy *cqe_task = cq->
queue.
elements[cqe_idx];
1184 ((
struct spdk_nvme_cpl *)dpu_cqe)->status.p = cqe_phase;
1224 (void)task_user_data;
1226 size_t num_inflight;
1232 DOCA_LOG_ERR(
"Failed to stop NVMf DOCA CQ: Failed to get number of inflight DMA tasks - %s",
1236 if (num_inflight == 0) {
1250 struct doca_ctx *
ctx,
1259 switch (next_state) {
1282 memset(cq, 0,
sizeof(*cq));
1294 .is_read_from_remote =
false,
1298 .dma_user_data = cq,
1306 uint32_t cq_db_id = 2 * attr->
cq_id + 1;
1379 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA CQ: Failed to stop DB - %s",
1383 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA CQ: Failed to destroy DB - %s",
1409 memset(dpa_thread, 0,
sizeof(*dpa_thread));
1411 dpa_thread->
dpa = attr->
dpa;
1415 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA thread: Failed to allocate thread argument memory - %s",
1422 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA thread: Failed to create DPA thread - %s",
1428 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA thread: Failed to set DPA thread function - %s",
1434 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA thread: Failed to start DPA thread - %s",
1456 DOCA_LOG_ERR(
"Failed to run NVMf DOCA DPA thread: Failed to update DPA thread argument - %s",
1463 DOCA_LOG_ERR(
"Failed to run NVMf DOCA DPA thread: Failed to run DPA thread - %s",
1483 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DPA thread: Failed to stop DPA thread - %s",
1487 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DPA thread: Failed to destroy DPA thread - %s",
1492 if (dpa_thread->
arg != 0) {
1495 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DPA thread: Failed to free DPA thread argument - %s",
1497 dpa_thread->
arg = 0;
1522 "Failed to fill NVMf DOCA IO thread argument: Failed to get consumer completion context DPA handle - %s",
1529 "Failed to fill NVMf DOCA IO thread argument: Failed to get producer completion context DPA handle - %s",
1535 DOCA_LOG_ERR(
"Failed to fill NVMf DOCA IO thread argument: Failed to get consumer DPA handle - %s",
1541 DOCA_LOG_ERR(
"Failed to fill NVMf DOCA IO thread argument: Failed to get producer DPA handle - %s",
1549 "Failed to fill NVMf DOCA IO thread argument: Failed to get DB completion context DPA handle - %s",
1558 DOCA_LOG_ERR(
"Failed to fill NVMf DOCA IO thread argument: Failed to get MSI-X DPA handle - %s",
1594 DOCA_LOG_ERR(
"Failed to run IO DPA thread: Failed to get CQ DB DPA handle");
1606 DOCA_LOG_ERR(
"Failed to run IO DPA thread: Failed to issue initialize thread RPC - %s",
1611 DOCA_LOG_ERR(
"Failed to run IO DPA thread: The initialize thread RPC has failed");
1643 .ctx_user_data = io,
1653 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA IO: Failed to create DB completion context - %s",
1661 "Failed to create NVMf DOCA DPA IO: Failed to set DB completion context max number of doorbells - %s",
1668 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DPA IO: Failed to start DB completion context - %s",
1695 .cq_id = attr->
cq_id,
1710 TAILQ_INIT(&
io->sq_list);
1729 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA IO: Failed to destroy MSI-X");
1736 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA IO: Failed to stop DB completion context");
1739 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA IO: Failed to destroy DB completion context");
1750 if (!TAILQ_EMPTY(&
io->sq_list)) {
1751 DOCA_LOG_ERR(
"Failed to stop IO: Not all SQs have been removed");
1796 struct doca_buf *buf;
1805 struct doca_buf *buf;
1809 (
void *)host_io_address,
1817 struct doca_buf *dst_buffer,
1818 struct doca_buf *src_buffer,
1822 struct doca_dma_task_memcpy *dma_task;
1862 (void)task_user_data;
1863 (void)ctx_user_data;
1877 struct doca_ctx *
ctx,
1886 switch (next_state) {
1915 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DMA pool: Failed to allocate memory for local data");
1921 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DMA pool: Failed to create local data mmap - %s",
1927 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DMA pool: Failed to create local data mmap - %s",
1933 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DMA pool: Failed to set local data mmap permissions - %s",
1939 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DMA pool: Failed to add device to local dma mmap - %s",
1945 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DMA pool: Failed to start local dma mmap - %s",
1955 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DMA pool: Failed to create local data pool - %s",
1961 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DMA pool: Failed to start local data pool - %s",
1968 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DMA pool: Failed to create Host data inventory - %s",
1974 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DMA pool: Failed to start Host data inventory - %s",
1982 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DMA pool: Failed to create DMA context - %s",
1991 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DMA pool: Failed to set DMA context task consigurations - %s",
1999 "Failed to create NVMf DOCA DMA pool: Failed to connect DMA context to progress engine - %s",
2007 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DMA pool: Failed to set DMA context user data - %s",
2014 "Failed to create NVMf DOCA DMA pool: Failed to set DMA context state changed callback - %s",
2020 DOCA_LOG_ERR(
"Failed to create NVMf DOCA DMA pool: Failed to start DMA context - %s",
2045 DOCA_LOG_ERR(
"Failed to stop NVMf DOCA DMA pool: Failed to stop context - %s",
2062 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DMA pool: Failed to stop DMA context %s",
2066 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DMA pool: Failed to destroy DMA context %s",
2075 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DMA pool: Failed to destroy host data inventory %s",
2083 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DMA pool: Failed to destroy local data pool %s",
2091 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA DMA pool: Failed to destroy local data mmap %s",
2112 struct doca_dma_task_memcpy *sqe_task;
2113 struct doca_buf *dst_buffer;
2115 uint16_t pi = sq->
pi;
2118 num_sqes = (new_pi - pi);
2123 for (uint16_t sqe_count = 0; sqe_count < num_sqes; sqe_count++) {
2129 if (sqe_count == (num_sqes - 1)) {
2169 struct doca_buf *sqe_buf;
2172 uint16_t sqe_idx = task_user_data.
u64;
2192 (void)task_user_data;
2194 size_t num_inflight;
2200 DOCA_LOG_ERR(
"Failed to stop NVMf DOCA SQ: Failed to get number of inflight DMA tasks - %s",
2204 if (num_inflight == 0) {
2218 struct doca_ctx *
ctx,
2227 switch (next_state) {
2251 DOCA_LOG_ERR(
"Failed to create NVMf DOCA SQ SPDK request pool: Failed to allocate memory for requests");
2255 TAILQ_INIT(&sq->request_pool);
2256 for (
size_t request_idx = 0; request_idx < num_requests; request_idx++) {
2262 TAILQ_INSERT_TAIL(&(sq->request_pool), request, link);
2276 TAILQ_INIT(&(sq->request_pool));
2298 TAILQ_REMOVE(&(sq->request_pool),
request, link);
2314 request->data_from_alloc =
false;
2326 TAILQ_INSERT_TAIL(&sq->request_pool,
request, link);
2350 int used_host_bufs = request->
request.iovcnt;
2351 int used_dpu_bufs = request->
request.iovcnt;
2352 while (used_dpu_bufs > 0) {
2358 while (used_host_bufs > 0) {
2391 DOCA_LOG_ERR(
"Failed to destroy NVMf DOCA SQ: Failed to destroy DB - %s",
2441 .is_read_from_remote =
true,
2445 .dma_user_data = sq,
2453 const uint32_t num_sq_elements = attr->
sq_depth;
2457 .max_dma_operations = num_sq_elements * NVMF_REQ_MAX_BUFFERS,
2463 .dma_user_data = sq,
2471 const uint32_t sq_db_id = 2 * attr->
sq_id;
2486 DOCA_LOG_ERR(
"Failed to add SQ to NVMf DOCA IO: Failed to SQ DB DPA handle - %s",
2503 TAILQ_REMOVE(&sq->
io->sq_list, sq, link);
2527 struct spdk_nvmf_tgt *target;
2532 DOCA_LOG_ERR(
"Failed to add SQ to NVMf DOCA IO: Failed to start DB - %s",
2537 target = spdk_nvmf_get_first_tgt();
2538 spdk_nvmf_tgt_new_qpair(target, &sq->
spdk_qp);
2548 if (sq->
spdk_qp.state != SPDK_NVMF_QPAIR_ERROR && sq->
spdk_qp.state != SPDK_NVMF_QPAIR_UNINITIALIZED) {
2556 .unbind_sq_db_data =
2559 .cookie = (uint64_t)sq,
2572 "Failed to remove SQ from NVMf DOCA IO: Failed to send unbind SQ DB message to DPA - %s",
2612 .sq_id = attr->
sq_id,
2621 TAILQ_INSERT_TAIL(&
io->sq_list, sq, link);
2628 .cookie = (uint64_t)sq,
2633 DOCA_LOG_ERR(
"Failed to add SQ to NVMf DOCA IO: Failed to send bind SQ DB message to DPA - %s",
uint64_t dpa_consumer_comp
uint64_t dpa_producer_comp
#define MAX_NUM_COMCH_MSGS
#define RPC_RETURN_STATUS_SUCCESS
@ COMCH_MSG_TYPE_RAISE_MSIX
@ COMCH_MSG_TYPE_BIND_SQ_DB_DONE
@ COMCH_MSG_TYPE_UNBIND_SQ_DB_DONE
@ COMCH_MSG_TYPE_UNBIND_SQ_DB
@ COMCH_MSG_TYPE_BIND_SQ_DB
static uint64_t *restrict src
if(bitoffset % 64+bitlength > 64) result|
DOCA_STABLE doca_error_t doca_buf_inventory_destroy(struct doca_buf_inventory *inventory)
Destroy buffer inventory structure.
static doca_error_t doca_buf_inventory_buf_get_by_addr(struct doca_buf_inventory *inventory, struct doca_mmap *mmap, void *addr, size_t len, struct doca_buf **buf)
Allocate single element from buffer inventory and point it to the buffer defined by addr & len argume...
DOCA_STABLE doca_error_t doca_buf_inventory_start(struct doca_buf_inventory *inventory)
Start element retrieval from inventory.
DOCA_STABLE doca_error_t doca_buf_inventory_create(size_t num_elements, struct doca_buf_inventory **inventory)
Allocates buffer inventory with default/unset attributes.
DOCA_STABLE doca_error_t doca_buf_pool_create(size_t num_elements, size_t element_size, const struct doca_mmap *mmap, struct doca_buf_pool **buf_pool)
Allocates a buffer pool and sets it with doca_buf objects.
DOCA_STABLE doca_error_t doca_buf_pool_buf_alloc(struct doca_buf_pool *buf_pool, struct doca_buf **buf)
This method acquires a doca_buf from a DOCA buffer pool, pointing to an allocated empty buffer.
DOCA_STABLE doca_error_t doca_buf_pool_destroy(struct doca_buf_pool *buf_pool)
Destroy a buffer pool structure.
DOCA_STABLE doca_error_t doca_buf_pool_start(struct doca_buf_pool *buf_pool)
Start a DOCA buffer pool.
DOCA_STABLE doca_error_t doca_buf_dec_refcount(struct doca_buf *buf, uint16_t *refcount)
Decrease the object reference count by 1, if 0 reached, return the element back to the inventory.
DOCA_STABLE doca_error_t doca_buf_set_data_len(struct doca_buf *buf, size_t data_len)
DOCA_STABLE doca_error_t doca_buf_get_data(const struct doca_buf *buf, void **data)
Get the buffer's data.
DOCA_STABLE doca_error_t doca_buf_get_head(const struct doca_buf *buf, void **head)
Get the buffer's head.
DOCA_STABLE doca_error_t doca_buf_reset_data_len(struct doca_buf *buf)
DOCA_STABLE doca_error_t doca_comch_consumer_set_imm_data_len(struct doca_comch_consumer *consumer, uint32_t imm_data_len)
DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_create(struct doca_comch_consumer_completion **consumer_comp)
Allocate DOCA Comch consumer completion context on DPA.
DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_set_completion(struct doca_comch_consumer *consumer, struct doca_comch_consumer_completion *consumer_comp, uint32_t user_data)
Associate consumer with DPA completion context.
uint64_t doca_dpa_dev_comch_consumer_completion_t
DPA handle for DPA consumer completion context.
DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_stop(struct doca_comch_consumer_completion *consumer_comp)
Stop DOCA Comch consumer completion context.
DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_set_max_num_recv(struct doca_comch_consumer_completion *consumer_comp, uint32_t max_num_recv)
Set the maximal number of receive operations across all consumers associated with the completion cont...
uint64_t doca_dpa_dev_comch_consumer_t
DPA handle for DPA consumer.
DOCA_STABLE doca_error_t doca_comch_consumer_destroy(struct doca_comch_consumer *consumer)
DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_get_dpa_handle(struct doca_comch_consumer *consumer, doca_dpa_dev_comch_consumer_t *dpa_consumer)
Retrieve the handle in the dpa memory space of a doca_comch_consumer.
DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_get_dpa_handle(struct doca_comch_consumer_completion *consumer_comp, doca_dpa_dev_comch_consumer_completion_t *consumer_comp_handle)
Get the DPA handle for the DOCA Comch consumer completion context.
DOCA_STABLE doca_error_t doca_comch_consumer_task_post_recv_set_conf(struct doca_comch_consumer *consumer, doca_comch_consumer_task_post_recv_completion_cb_t task_completion_cb, doca_comch_consumer_task_post_recv_completion_cb_t task_error_cb, uint32_t num_post_recv_tasks)
DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_destroy(struct doca_comch_consumer_completion *consumer_comp)
Destroy the DOCA Comch consumer completion context.
DOCA_STABLE const uint8_t * doca_comch_consumer_task_post_recv_get_imm_data(const struct doca_comch_consumer_task_post_recv *task)
DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_set_dev_max_num_recv(struct doca_comch_consumer *consumer, uint32_t dev_num_recv)
Set the maximal number of receive operations for a DPA consumer.
DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_set_imm_data_len(struct doca_comch_consumer_completion *consumer_comp, uint32_t imm_data_len)
DOCA_STABLE doca_error_t doca_comch_consumer_task_post_recv_alloc_init(struct doca_comch_consumer *consumer, struct doca_buf *buf, struct doca_comch_consumer_task_post_recv **task)
Allocate and initialize a doca_consumer post receive task.
DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_set_dpa_thread(struct doca_comch_consumer_completion *consumer_comp, struct doca_dpa_thread *dpa_thread)
Set the DOCA DPA thread of the completion context.
DOCA_STABLE struct doca_ctx * doca_comch_consumer_as_ctx(struct doca_comch_consumer *consumer)
DOCA_STABLE struct doca_task * doca_comch_consumer_task_post_recv_as_task(struct doca_comch_consumer_task_post_recv *task)
DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_start(struct doca_comch_consumer_completion *consumer_comp)
Start DOCA Comch consumer completion context.
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_create(struct doca_dev *dev, struct doca_comch_msgq **msgq)
Create a DOCA Comch MsgQ instance.
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_producer_create(struct doca_comch_msgq *msgq, struct doca_comch_producer **producer)
Create a DOCA Comch producer instance.
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_consumer_create(struct doca_comch_msgq *msgq, struct doca_comch_consumer **consumer)
Create a DOCA Comch consumer instance.
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_set_dpa_producer(struct doca_comch_msgq *msgq, struct doca_dpa *dpa)
Set producers to DPA. All producers on this MsgQ will be created for DPA.
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_set_max_num_consumers(struct doca_comch_msgq *msgq, uint32_t max_num_consumers)
Set the maximal number of consumers that can be created using this MsgQ.
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_set_dpa_consumer(struct doca_comch_msgq *msgq, struct doca_dpa *dpa)
Set consumers to DPA. All consumers on this MsgQ will be created for DPA.
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_stop(struct doca_comch_msgq *msgq)
Stop DOCA Comch MsgQ.
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_set_max_num_producers(struct doca_comch_msgq *msgq, uint32_t max_num_producers)
Set the maximal number of producers that can be created using this MsgQ.
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_start(struct doca_comch_msgq *msgq)
Start DOCA Comch MsgQ.
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_destroy(struct doca_comch_msgq *msgq)
Destroy a DOCA Comch MsgQ instance.
DOCA_EXPERIMENTAL doca_error_t doca_comch_producer_get_dpa_handle(struct doca_comch_producer *producer, doca_dpa_dev_comch_producer_t *dpa_producer)
Retrieve the handle in the dpa memory space of a doca_comch_producer.
DOCA_EXPERIMENTAL doca_error_t doca_comch_producer_set_dev_max_num_send(struct doca_comch_producer *producer, uint32_t dev_num_send)
Set the maximal number of send operations for a DPA producer.
DOCA_STABLE struct doca_task * doca_comch_producer_task_send_as_task(struct doca_comch_producer_task_send *task)
DOCA_STABLE doca_error_t doca_comch_producer_task_send_set_conf(struct doca_comch_producer *producer, doca_comch_producer_task_send_completion_cb_t task_completion_cb, doca_comch_producer_task_send_completion_cb_t task_error_cb, uint32_t num_send_tasks)
DOCA_STABLE doca_error_t doca_comch_producer_destroy(struct doca_comch_producer *producer)
DOCA_STABLE struct doca_ctx * doca_comch_producer_as_ctx(struct doca_comch_producer *producer)
DOCA_EXPERIMENTAL doca_error_t doca_comch_producer_dpa_completion_attach(struct doca_comch_producer *producer, struct doca_dpa_completion *dpa_comp)
Associate producer with DPA completion context.
DOCA_STABLE doca_error_t doca_comch_producer_task_send_alloc_init(struct doca_comch_producer *producer, const struct doca_buf *buf, uint8_t *imm_data, uint32_t imm_data_len, uint32_t consumer_id, struct doca_comch_producer_task_send **task)
uint64_t doca_dpa_dev_comch_producer_t
DPA handle for DPA producer.
void(* doca_ctx_state_changed_callback_t)(const union doca_data user_data, struct doca_ctx *ctx, enum doca_ctx_states prev_state, enum doca_ctx_states next_state)
Function to execute on context state change.
DOCA_STABLE doca_error_t doca_ctx_start(struct doca_ctx *ctx)
Finalizes all configurations, and starts the DOCA CTX.
DOCA_EXPERIMENTAL doca_error_t doca_ctx_set_datapath_on_dpa(struct doca_ctx *ctx, struct doca_dpa *dpa_dev)
This function binds the DOCA context to a dpa device.
DOCA_STABLE doca_error_t doca_ctx_get_state(const struct doca_ctx *ctx, enum doca_ctx_states *state)
Get context state.
DOCA_STABLE doca_error_t doca_ctx_set_state_changed_cb(struct doca_ctx *ctx, doca_ctx_state_changed_callback_t cb)
Set state changed callback.
DOCA_STABLE doca_error_t doca_ctx_set_user_data(struct doca_ctx *ctx, union doca_data user_data)
set user data to context
DOCA_STABLE doca_error_t doca_ctx_get_num_inflight_tasks(const struct doca_ctx *ctx, size_t *num_inflight_tasks)
Get number of in flight tasks in a doca context.
DOCA_STABLE doca_error_t doca_ctx_stop(struct doca_ctx *ctx)
Stops the context allowing reconfiguration.
doca_ctx_states
This enum defines the states of a context.
@ DOCA_CTX_STATE_STARTING
@ DOCA_CTX_STATE_STOPPING
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_completion_create(struct doca_dpa_thread *th, struct doca_devemu_pci_db_completion **db_comp)
Allocate DOCA devemu PCI device doorbell completion context on DPA. The created completion context wi...
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_completion_stop(struct doca_devemu_pci_db_completion *db_comp)
Stop DOCA devemu PCI device doorbell completion context.
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_get_dpa_handle(struct doca_devemu_pci_db *db, doca_dpa_dev_devemu_pci_db_t *db_handle)
Get the DPA handle for the DOCA devemu PCI device doorbell.
uint64_t doca_dpa_dev_devemu_pci_db_completion_t
DPA handle for emulated PCI device doorbell completion context.
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_destroy(struct doca_devemu_pci_db *db)
Destroy the DOCA devemu PCI device doorbell.
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_msix_create_on_dpa(struct doca_devemu_pci_dev *pci_dev, uint8_t bar_id, uint64_t bar_start_addr, uint16_t msix_idx, uint64_t user_data_on_dpa, struct doca_devemu_pci_msix **msix)
Allocate DOCA devemu PCI device MSI-X context on DPA.
uint64_t doca_dpa_dev_devemu_pci_db_t
DPA handle for emulated PCI device doorbell.
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_msix_get_dpa_handle(struct doca_devemu_pci_msix *msix, doca_dpa_dev_devemu_pci_msix_t *msix_handle)
Get the DPA handle for the DOCA devemu PCI device MSI-X.
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_msix_destroy(struct doca_devemu_pci_msix *msix)
Destroy the DOCA devemu PCI device MSI-X.
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_completion_get_dpa_handle(struct doca_devemu_pci_db_completion *db_comp, doca_dpa_dev_devemu_pci_db_completion_t *db_comp_handle)
Get the DPA handle for the DOCA devemu PCI device doorbell completion context.
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_completion_destroy(struct doca_devemu_pci_db_completion *db_comp)
Destroy the DOCA devemu PCI device doorbell completion context.
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_completion_start(struct doca_devemu_pci_db_completion *db_comp)
Start DOCA devemu PCI device doorbell completion context.
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_stop(struct doca_devemu_pci_db *db)
Stop DOCA devemu PCI device doorbell. A stopped doorbell will not trigger completions on the associat...
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_completion_set_max_num_dbs(struct doca_devemu_pci_db_completion *db_comp, uint32_t num_dbs)
Set the maximal number of doorbells that can be associated with the completion context.
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_create_on_dpa(struct doca_devemu_pci_dev *pci_dev, struct doca_devemu_pci_db_completion *db_comp, uint8_t bar_id, uint64_t bar_start_addr, uint32_t db_id, uint64_t user_data_on_dpa, struct doca_devemu_pci_db **db)
Allocate DOCA devemu PCI device doorbell on DPA. The created doorbell will be associated with a singl...
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_start(struct doca_devemu_pci_db *db)
Start DOCA devemu PCI device doorbell. A started doorbell will be able to trigger completions on the ...
uint64_t doca_dpa_dev_devemu_pci_msix_t
DPA handle for emulated PCI device MSI-X.
DOCA_STABLE const struct doca_buf * doca_dma_task_memcpy_get_src(const struct doca_dma_task_memcpy *task)
This method gets source buffer from memcpy task.
DOCA_STABLE struct doca_task * doca_dma_task_memcpy_as_task(struct doca_dma_task_memcpy *task)
This method converts a memcpy task to doca_task.
DOCA_STABLE doca_error_t doca_dma_task_memcpy_alloc_init(struct doca_dma *dma, const struct doca_buf *src, struct doca_buf *dst, union doca_data user_data, struct doca_dma_task_memcpy **task)
This method allocates and initializes a DMA memcpy task.
DOCA_STABLE struct doca_ctx * doca_dma_as_ctx(struct doca_dma *dma)
DOCA_STABLE struct doca_buf * doca_dma_task_memcpy_get_dst(const struct doca_dma_task_memcpy *task)
This method gets destination buffer from memcpy task.
DOCA_STABLE doca_error_t doca_dma_task_memcpy_set_conf(struct doca_dma *dma, doca_dma_task_memcpy_completion_cb_t task_completion_cb, doca_dma_task_memcpy_completion_cb_t task_error_cb, uint32_t num_memcpy_tasks)
This method sets the DMA memcpy tasks configuration.
void(* doca_dma_task_memcpy_completion_cb_t)(struct doca_dma_task_memcpy *task, union doca_data task_user_data, union doca_data ctx_user_data)
Function to execute on DMA memcpy task completion.
DOCA_STABLE doca_error_t doca_dma_create(struct doca_dev *dev, struct doca_dma **dma)
DOCA_STABLE doca_error_t doca_dma_destroy(struct doca_dma *dma)
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_run(struct doca_dpa_thread *dpa_thread)
Run DPA thread.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_create(struct doca_dpa *dpa, struct doca_dpa_thread **dpa_thread)
Create DPA thread.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_destroy(struct doca_dpa_completion *dpa_comp)
Destroy DPA completion context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_set_thread(struct doca_dpa_completion *dpa_comp, struct doca_dpa_thread *dpa_thread)
Set DPA completion context thread.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_mem_alloc(struct doca_dpa *dpa, size_t size, doca_dpa_dev_uintptr_t *dev_ptr)
Allocate DPA heap memory.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_start(struct doca_dpa_completion *dpa_comp)
Start DPA completion context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_mem_free(struct doca_dpa *dpa, doca_dpa_dev_uintptr_t dev_ptr)
Free the previously allocated DPA memory.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_rpc(struct doca_dpa *dpa, doca_dpa_func_t *func, uint64_t *retval,...)
RPC to run DPA kernel.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_get_dpa_handle(struct doca_dpa_completion *dpa_comp, doca_dpa_dev_completion_t *handle)
Get DPA completion context handle.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_create(struct doca_dpa *dpa, unsigned int queue_size, struct doca_dpa_completion **dpa_comp)
Create DPA completion context.
void() doca_dpa_func_t(void)
Generic function pointer type.
uint64_t doca_dpa_dev_completion_t
DPA completion handle type definition.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_set_func_arg(struct doca_dpa_thread *dpa_thread, doca_dpa_func_t *func, uint64_t arg)
Set DPA thread entry point and its argument.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_h2d_memcpy(struct doca_dpa *dpa, doca_dpa_dev_uintptr_t dst_ptr, void *src_ptr, size_t size)
Copy from host memory to DPA Heap.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_stop(struct doca_dpa_completion *dpa_comp)
Stop DPA completion context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_start(struct doca_dpa_thread *dpa_thread)
Start DPA thread.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_stop(struct doca_dpa_thread *dpa_thread)
Stop DPA thread.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_destroy(struct doca_dpa_thread *dpa_thread)
Destroy DPA thread.
enum doca_error doca_error_t
DOCA API return codes.
DOCA_STABLE const char * doca_error_get_name(doca_error_t error)
Returns the string representation of an error code name.
#define DOCA_LOG_ERR(format,...)
Generates an ERROR application log message.
DOCA_STABLE doca_error_t doca_mmap_set_memrange(struct doca_mmap *mmap, void *addr, size_t len)
Set the memory range of DOCA memory map.
DOCA_STABLE doca_error_t doca_mmap_destroy(struct doca_mmap *mmap)
Destroy DOCA Memory Map structure.
DOCA_STABLE doca_error_t doca_mmap_create(struct doca_mmap **mmap)
Allocates zero size memory map object with default/unset attributes.
DOCA_STABLE doca_error_t doca_mmap_set_permissions(struct doca_mmap *mmap, uint32_t access_mask)
Set access flags of the registered memory.
DOCA_STABLE doca_error_t doca_mmap_start(struct doca_mmap *mmap)
Start DOCA Memory Map.
DOCA_STABLE doca_error_t doca_mmap_add_dev(struct doca_mmap *mmap, struct doca_dev *dev)
Register DOCA memory map on a given device.
DOCA_EXPERIMENTAL doca_error_t doca_task_submit_ex(struct doca_task *task, uint32_t flags)
Extended version of doca_task_submit.
DOCA_STABLE doca_error_t doca_pe_connect_ctx(struct doca_pe *pe, struct doca_ctx *ctx)
This method connects a context to a progress engine.
DOCA_STABLE doca_error_t doca_task_submit(struct doca_task *task)
Submit a task to a progress engine.
DOCA_STABLE void doca_task_set_user_data(struct doca_task *task, union doca_data user_data)
Set user data to a task.
DOCA_STABLE void doca_task_free(struct doca_task *task)
Free a task back to where it was allocated from.
@ DOCA_TASK_SUBMIT_FLAG_FLUSH
@ DOCA_TASK_SUBMIT_FLAG_OPTIMIZE_REPORTS
@ DOCA_ACCESS_FLAG_LOCAL_READ_WRITE
@ DOCA_ACCESS_FLAG_LOCAL_READ_ONLY
static const struct bar_db_region_config db_configs[PCI_TYPE_NUM_BAR_DB_REGIONS]
static const struct bar_region_config msix_table_configs[PCI_TYPE_NUM_BAR_MSIX_TABLE_REGIONS]
static void nvmf_doca_dpa_thread_destroy(struct nvmf_doca_dpa_thread *dpa_thread)
static void nvmf_doca_dma_pool_copy_error_cb(struct doca_dma_task_memcpy *task, union doca_data task_user_data, union doca_data ctx_user_data)
static void nvmf_doca_cq_stop_continue(struct nvmf_doca_cq *cq)
struct doca_buf * nvmf_doca_sq_get_dpu_buffer(struct nvmf_doca_sq *sq)
static void nvmf_doca_dma_pool_dma_state_changed_cb(const union doca_data user_data, struct doca_ctx *ctx, enum doca_ctx_states prev_state, enum doca_ctx_states next_state)
static void nvmf_doca_dpa_msgq_destroy(struct nvmf_doca_dpa_msgq *msgq)
#define CACHELINE_SIZE_BYTES
static void nvmf_doca_dpa_msgq_send_cb(struct doca_comch_producer_task_send *send_task, union doca_data task_user_data, union doca_data ctx_user_data)
static void nvmf_doca_dma_pool_destroy(struct nvmf_doca_dma_pool *dma_pool)
static void nvmf_doca_dpa_comch_destroy(struct nvmf_doca_dpa_comch *comch)
struct doca_buf * nvmf_doca_sq_get_host_buffer(struct nvmf_doca_sq *sq, uintptr_t host_io_address)
static void nvmf_doca_request_free_impl(struct nvmf_doca_sq *sq, struct nvmf_doca_request *request)
void nvmf_doca_request_free(struct nvmf_doca_request *request)
static void nvmf_doca_sq_add_continue(struct nvmf_doca_sq *sq)
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)
static doca_error_t nvmf_doca_io_fill_thread_arg(struct nvmf_doca_io *io, struct io_thread_arg *arg)
static void nvmf_doca_cq_queue_dma_state_changed_cb(const union doca_data user_data, struct doca_ctx *ctx, enum doca_ctx_states prev_state, enum doca_ctx_states next_state)
static void nvmf_doca_dma_pool_copy_cb(struct doca_dma_task_memcpy *task, union doca_data task_user_data, union doca_data ctx_user_data)
static doca_error_t nvmf_doca_request_pool_destroy(struct nvmf_doca_sq *sq)
static void nvmf_doca_dpa_comch_stop_continue(struct nvmf_doca_dpa_comch *comch)
static void nvmf_doca_cq_destroy(struct nvmf_doca_cq *cq)
static void nvmf_doca_io_stop_continue(struct nvmf_doca_io *io)
static void nvmf_doca_dma_pool_stop(struct nvmf_doca_dma_pool *dma_pool)
static doca_error_t nvmf_doca_cq_create(const struct nvmf_doca_cq_create_attr *attr, struct nvmf_doca_cq *cq)
doca_dpa_func_t io_thread
static doca_error_t nvmf_doca_queue_create(const struct nvmf_doca_queue_create_attr *attr, struct nvmf_doca_queue *queue)
static doca_error_t nvmf_doca_dpa_thread_run(struct nvmf_doca_dpa_thread *dpa_thread, void *arg, size_t arg_size)
static void nvmf_doca_dpa_msgq_recv_error_cb(struct doca_comch_consumer_task_post_recv *recv_task, union doca_data task_user_data, union doca_data ctx_user_data)
void nvmf_doca_request_complete(struct nvmf_doca_request *request)
static doca_error_t nvmf_doca_dma_pool_create(const struct nvmf_doca_dma_pool_create_attr *attr, struct nvmf_doca_dma_pool *dma_pool)
static void nvmf_doca_sq_update_pi(struct nvmf_doca_sq *sq, uint32_t new_pi)
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)
static void nvmf_doca_io_handle_unbind_sq_db_done_msg(const struct comch_msg *msg)
static void nvmf_doca_cq_cqe_post_error_cb(struct doca_dma_task_memcpy *task, union doca_data task_user_data, union doca_data ctx_user_data)
static void nvmf_doca_io_raise_msix(struct nvmf_doca_io *io)
static void nvmf_doca_cq_cqe_post_cb(struct doca_dma_task_memcpy *task, union doca_data task_user_data, union doca_data ctx_user_data)
DOCA_LOG_REGISTER(NVME_PCI_COMMON)
static void nvmf_doca_dpa_comch_msgq_ctx_state_changed_cb(const union doca_data user_data, struct doca_ctx *ctx, enum doca_ctx_states prev_state, enum doca_ctx_states next_state)
static void nvmf_doca_dpa_msgq_recv_cb(struct doca_comch_consumer_task_post_recv *recv_task, union doca_data task_user_data, union doca_data ctx_user_data)
static void nvmf_doca_io_handle_host_db_msg(struct nvmf_doca_io *io, const struct comch_msg *msg)
static doca_error_t nvmf_doca_dpa_comch_create(const struct nvmf_doca_dpa_comch_create_attr *attr, struct nvmf_doca_dpa_comch *comch)
struct nvmf_doca_request * nvmf_doca_request_get(struct nvmf_doca_sq *sq)
static bool nvmf_doca_cq_idle(struct nvmf_doca_cq *cq)
void nvmf_doca_io_destroy(struct nvmf_doca_io *io)
static void nvmf_doca_sq_destroy(struct nvmf_doca_sq *sq)
static void nvmf_doca_sq_sqe_read_cb(struct doca_dma_task_memcpy *task, union doca_data task_user_data, union doca_data ctx_user_data)
static doca_error_t nvmf_doca_dpa_msgq_send(struct nvmf_doca_dpa_msgq *msgq, void *msg, uint32_t msg_size)
static void nvmf_doca_sq_sqe_read_error_cb(struct doca_dma_task_memcpy *task, union doca_data task_user_data, union doca_data ctx_user_data)
static doca_error_t nvmf_doca_dpa_msgq_create(const struct nvmf_doca_dpa_msgq_create_attr *attr, struct nvmf_doca_dpa_msgq *msgq)
static bool is_ctx_idle(struct doca_ctx *ctx)
doca_dpa_func_t io_thread_init_rpc
static void nvmf_doca_queue_destroy(struct nvmf_doca_queue *queue)
static bool is_ctx_running(struct doca_ctx *ctx)
static void nvmf_doca_queue_free_elements(struct nvmf_doca_queue *queue)
doca_error_t nvmf_doca_io_create(const struct nvmf_doca_io_create_attr *attr, struct nvmf_doca_io *io)
static doca_error_t nvmf_doca_sq_create(const struct nvmf_doca_sq_create_attr *attr, struct nvmf_doca_sq *sq)
static void nvmf_doca_io_handle_dpa_msg(struct nvmf_doca_io *io, const struct comch_msg *msg)
static doca_error_t nvmf_doca_request_pool_create(struct nvmf_doca_sq *sq, size_t num_requests)
void nvmf_doca_sq_stop(struct nvmf_doca_sq *sq)
static void nvmf_doca_dpa_msgq_stop(struct nvmf_doca_dpa_msgq *msgq)
void nvmf_doca_io_stop(struct nvmf_doca_io *io)
static void nvmf_doca_queue_stop(struct nvmf_doca_queue *queue)
static void nvmf_doca_dpa_msgq_send_error_cb(struct doca_comch_producer_task_send *send_task, union doca_data task_user_data, union doca_data ctx_user_data)
static void nvmf_doca_sq_queue_dma_state_changed_cb(const union doca_data user_data, struct doca_ctx *ctx, enum doca_ctx_states prev_state, enum doca_ctx_states next_state)
void nvmf_doca_io_post_cqe(struct nvmf_doca_io *io, const struct nvmf_doca_cqe *cqe, union doca_data user_data)
static bool nvmf_doca_dpa_comch_idle(struct nvmf_doca_dpa_comch *comch)
static void nvmf_doca_io_handle_bind_sq_db_done_msg(const struct comch_msg *msg)
static void nvmf_doca_cq_update_ci(struct nvmf_doca_cq *cq, uint32_t new_ci)
static void nvmf_doca_cq_stop(struct nvmf_doca_cq *cq)
static doca_error_t nvmf_doca_dpa_thread_create(const struct nvmf_doca_dpa_thread_create_attr *attr, struct nvmf_doca_dpa_thread *dpa_thread)
void nvmf_doca_io_rm_sq(struct nvmf_doca_sq *sq)
static void nvmf_doca_sq_stop_continue(struct nvmf_doca_sq *sq)
static doca_error_t nvmf_doca_io_run_dpa_thread(struct nvmf_doca_io *io)
static void nvmf_doca_dpa_comch_stop(struct nvmf_doca_dpa_comch *comch)
#define DMA_POOL_DATA_BUFFER_SIZE
@ NVMF_DOCA_SQ_DB_UNBOUND
@ NVMF_DOCA_SQ_DB_UNBIND_REQUESTED
@ NVMF_DOCA_SQ_DB_BIND_REQUESTED
__UINTPTR_TYPE__ uintptr_t
struct bar_region_config region
struct comch_msg::@18::@20 bind_sq_db_done_data
struct comch_msg::@18::@23 host_db_data
struct comch_msg::@18::@22 unbind_sq_db_done_data
uint64_t dpa_consumer_comp
uint64_t dpa_producer_comp
struct doca_devemu_pci_db_completion * db_comp
struct doca_mmap * host_cq_mmap
uintptr_t host_cq_address
struct doca_devemu_pci_dev * nvme_dev
struct doca_devemu_pci_db * db
struct nvmf_doca_queue queue
struct doca_mmap * host_data_mmap
doca_dma_task_memcpy_completion_cb_t success_cb
doca_ctx_state_changed_callback_t dma_state_changed_cb
uint32_t max_dma_operations
doca_dma_task_memcpy_completion_cb_t error_cb
uint32_t max_dma_operation_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_dpa_thread * dpa_thread
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
doca_ctx_state_changed_callback_t ctx_state_changed_cb
struct doca_comch_consumer_completion * consumer_comp
struct doca_dpa_completion * producer_comp
struct doca_comch_consumer * consumer
struct doca_comch_msgq * msgq
struct doca_comch_producer * producer
doca_dpa_func_t * thread_handler
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 doca_devemu_pci_db_completion * db_comp
struct nvmf_doca_dpa_comch comch
nvmf_doca_io_stop_cb stop_io_cb
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
nvmf_doca_sq_fetch_sqe_cb fetch_sqe_cb
doca_dma_task_memcpy_completion_cb_t error_cb
doca_dma_task_memcpy_completion_cb_t success_cb
uintptr_t remote_queue_address
struct doca_mmap * remote_queue_mmap
doca_ctx_state_changed_callback_t dma_state_changed_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]
struct spdk_nvmf_request request
struct doca_buf * host_buffer[NVMF_REQ_MAX_BUFFERS]
struct doca_buf * prp_host_buf
struct spdk_nvme_cmd command
uintptr_t host_sq_address
struct spdk_nvmf_transport * transport
struct doca_devemu_pci_db_completion * db_comp
struct doca_devemu_pci_dev * nvme_dev
struct doca_mmap * host_sq_mmap
enum nvmf_doca_sq_db_state db_state
struct nvmf_doca_request * request_pool_memory
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
Convenience type for representing opaque data.
struct upf_accel_ctx * ctx