| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |
#include "spdk/nvmf_transport.h"#include "spdk/util.h"#include "spdk/thread.h"#include <spdk/nvme_spec.h>#include <doca_error.h>#include <doca_log.h>#include <doca_dev.h>#include <doca_dpa.h>#include <doca_pe.h>#include <doca_transport_common.h>#include "nvme_pci_common.h"#include "nvme_pci_type_config.h"#include "nvmf_doca_io.h"
Go to the source code of this file.
Data Structures | |
| struct | nvmf_doca_nvme_registers |
| struct | nvmf_doca_emulation_manager |
| struct | nvmf_doca_admin_qp |
| struct | nvmf_doca_pci_dev_poll_group |
| struct | nvmf_doca_poll_group |
| struct | nvmf_doca_pci_dev_admin |
| struct | nvmf_doca_admin_poll_group |
| struct | nvmf_doca_transport |
| struct | nvmf_doca_poll_group_delete_io_sq_ctx |
| struct | nvmf_doca_poll_group_delete_io_cq_ctx |
| struct | nvmf_doca_create_admin_qp_ctx |
| struct | nvmf_doca_poll_group_create_io_sq_ctx |
| struct | nvmf_doca_poll_group_create_io_cq_ctx |
Functions | |
| DOCA_LOG_REGISTER (NVME_EMULATION_DOCA_TRANSPORT) | |
| static void | post_cqe_from_response (struct nvmf_doca_request *request, void *arg) |
| static void | nvmf_doca_on_post_cqe_complete (struct nvmf_doca_cq *cq, union doca_data user_data) |
| static void | nvmf_doca_on_fetch_sqe_complete (struct nvmf_doca_sq *sq, struct nvmf_doca_sqe *sqe, uint16_t sqe_idx) |
| static void | nvmf_doca_on_copy_data_complete (struct nvmf_doca_sq *sq, struct doca_buf *dst, struct doca_buf *src, union doca_data user_data) |
| static void | nvmf_doca_on_post_nvm_cqe_complete (struct nvmf_doca_cq *cq, union doca_data user_data) |
| static void | nvmf_doca_on_fetch_nvm_sqe_complete (struct nvmf_doca_sq *sq, struct nvmf_doca_sqe *sqe, uint16_t sqe_idx) |
| static void | nvmf_doca_on_copy_nvm_data_complete (struct nvmf_doca_sq *sq, struct doca_buf *dst, struct doca_buf *src, union doca_data user_data) |
| static void | nvmf_doca_pci_dev_admin_reset_continue (struct nvmf_doca_pci_dev_admin *pci_dev_admin) |
| static void | handle_controller_register_events (struct doca_devemu_pci_dev *pci_dev, const struct bar_region_config *config) |
| static void | nvmf_doca_destroy_pci_dev_poll_group (struct nvmf_doca_pci_dev_poll_group *pci_dev_pg) |
| static void | nvmf_doca_destroy_admin_qp_continue (struct nvmf_doca_pci_dev_admin *pci_dev_admin) |
| static void | nvmf_doca_on_initialization_error (void *cb_arg) |
| static void | nvmf_doca_on_admin_sq_stop (struct nvmf_doca_sq *sq) |
| static doca_error_t | nvmf_doca_create_host_mmap (struct doca_devemu_pci_dev *pci_dev, struct doca_dev *emulation_manager, struct doca_mmap **mmap_out) |
| static void | buffers_ready_copy_data_dpu_to_host (struct nvmf_doca_request *request) |
| static void | buffers_ready_copy_data_host_to_dpu (struct nvmf_doca_request *request) |
| static void | nvmf_doca_opts_init (struct spdk_nvmf_transport_opts *opts) |
| static struct nvmf_doca_poll_group * | choose_poll_group (struct nvmf_doca_transport *transport) |
| static struct nvmf_doca_pci_dev_poll_group * | get_pci_dev_poll_group (struct nvmf_doca_poll_group *doca_poll_group, struct doca_devemu_pci_dev *pci_dev) |
| static doca_error_t | nvmf_doca_destroy_emulation_manager (struct nvmf_doca_emulation_manager *doca_emulation_manager) |
| static doca_error_t | nvmf_doca_pci_type_create_and_start (struct nvmf_doca_emulation_manager *doca_emulation_manager) |
| static doca_error_t | nvmf_doca_create_emulation_manager (struct doca_devinfo *dev_info, struct nvmf_doca_emulation_manager **ret_emulation_manager) |
| static int | nvmf_doca_admin_poll_group_poll (void *arg) |
| static void | nvmf_doca_admin_poll_group_destroy (struct nvmf_doca_admin_poll_group *admin_pg) |
| static doca_error_t | nvmf_doca_admin_poll_group_create (struct nvmf_doca_admin_poll_group *admin_pg) |
| static struct spdk_nvmf_transport * | nvmf_doca_create (struct spdk_nvmf_transport_opts *opts) |
| static void | nvmf_doca_dump_opts (struct spdk_nvmf_transport *transport, struct spdk_json_write_ctx *w) |
| static int | nvmf_doca_destroy (struct spdk_nvmf_transport *transport, spdk_nvmf_transport_destroy_done_cb cb_fn, void *cb_arg) |
| static struct nvmf_doca_pci_dev_admin * | nvmf_doca_transport_find_pci_dev_admin (struct nvmf_doca_transport *doca_transport, const char *vuid) |
| static doca_error_t | check_for_duplicate (struct nvmf_doca_transport *doca_transport, const char *vuid) |
| static doca_error_t | find_emulation_manager_and_function_by_vuid (struct nvmf_doca_transport *doca_transport, const char *vuid, struct nvmf_doca_emulation_manager **ret_emulation_manager, struct doca_dev_rep **ret_device_rep) |
| static void | nvmf_doca_on_admin_cq_stop (struct nvmf_doca_io *io) |
| static void | devemu_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_pci_dev_poll_group_stop_io_sq (void *ctx) |
| static void | nvmf_doca_pci_dev_poll_group_stop_io_sq_done (void *ctx) |
| static void | nvmf_doca_admin_qp_stop_all_io_sqs (struct nvmf_doca_admin_qp *admin_qp) |
| static void | nvmf_doca_pci_dev_poll_group_stop_io_cq (void *ctx) |
| static void | nvmf_doca_pci_dev_poll_group_stop_io_cq_done (void *ctx) |
| static void | nvmf_doca_admin_qp_stop_all_io_cqs (struct nvmf_doca_admin_qp *admin_qp) |
| static doca_error_t | nvmf_doca_create_pci_dev_poll_group (struct nvmf_doca_pci_dev_admin *pci_dev_admin, struct nvmf_doca_admin_qp *admin_qp, struct nvmf_doca_poll_group *doca_poll_group, struct nvmf_doca_pci_dev_poll_group **ret_pci_dev_pg) |
| static void | nvmf_doca_destroy_admin_qp_done (void *cb_arg) |
| static void | nvmf_doca_destroy_admin_qp (void *cb_arg) |
| static void | nvmf_doca_create_admin_qp_done (void *cb_arg) |
| static void | nvmf_doca_create_admin_qp (void *cb_arg) |
| static void | nvmf_doca_pci_dev_admin_reset (struct nvmf_doca_pci_dev_admin *pci_dev_admin) |
| static void | flr_event_handler_cb (struct doca_devemu_pci_dev *pci_dev, union doca_data user_data) |
| static void | hotplug_state_change_handler_cb (struct doca_devemu_pci_dev *pci_dev, union doca_data user_data) |
| static void | stateful_region_write_event_handler_cb (struct doca_devemu_pci_dev_event_bar_stateful_region_driver_write *event, union doca_data user_data) |
| static doca_error_t | register_to_stateful_region_write_events (struct doca_devemu_pci_dev *pci_dev, struct nvmf_doca_pci_dev_admin *pci_dev_admin) |
| static doca_error_t | register_handlers_set_datapath_and_start (struct nvmf_doca_emulation_manager *doca_emulation_manager, struct nvmf_doca_pci_dev_admin *pci_dev_admin) |
| static void | nvmf_doca_pci_dev_admin_destroy (struct nvmf_doca_pci_dev_admin *pci_dev_admin) |
| static int | nvmf_doca_pci_dev_admin_create (struct nvmf_doca_transport *doca_transport, const struct spdk_nvme_transport_id *trid, struct nvmf_doca_pci_dev_admin **pci_dev_admin_out) |
| static doca_error_t | devemu_hotplug_transition_wait (struct nvmf_doca_pci_dev_admin *pci_dev_admin, enum doca_devemu_pci_hotplug_state new_state, size_t timeout_in_micros) |
| static int | nvmf_doca_listen (struct spdk_nvmf_transport *transport, const struct spdk_nvme_transport_id *trid, struct spdk_nvmf_listen_opts *listen_opts) |
| static void | nvmf_doca_stop_listen (struct spdk_nvmf_transport *transport, const struct spdk_nvme_transport_id *trid) |
| static int | nvmf_doca_listen_associate (struct spdk_nvmf_transport *transport, const struct spdk_nvmf_subsystem *subsystem, const struct spdk_nvme_transport_id *trid) |
| static struct spdk_nvmf_transport_poll_group * | nvmf_doca_poll_group_create (struct spdk_nvmf_transport *transport, struct spdk_nvmf_poll_group *group) |
| static void | nvmf_doca_poll_group_destroy (struct spdk_nvmf_transport_poll_group *group) |
| static struct spdk_nvmf_transport_poll_group * | nvmf_doca_get_optimal_poll_group (struct spdk_nvmf_qpair *qpair) |
| static void | enable_nvmf_controller_cb (struct nvmf_doca_request *request, void *cb_arg) |
| static void | nvmf_doca_set_property (struct nvmf_doca_sq *doca_sq) |
| static void | nvmf_doca_poll_group_create_io_sq_done (void *args) |
| static void | nvmf_doca_connect_spdk_qp_done (struct nvmf_doca_request *request, void *cb_arg) |
| static int | nvmf_doca_connect_spdk_qp (struct nvmf_doca_sq *sq) |
| static int | nvmf_doca_poll_group_add (struct spdk_nvmf_transport_poll_group *group, struct spdk_nvmf_qpair *qpair) |
| static int | nvmf_doca_poll_group_remove (struct spdk_nvmf_transport_poll_group *group, struct spdk_nvmf_qpair *qpair) |
| static int | nvmf_doca_poll_group_poll (struct spdk_nvmf_transport_poll_group *group) |
| static int | nvmf_doca_req_free (struct spdk_nvmf_request *req) |
| static int | nvmf_doca_req_complete (struct spdk_nvmf_request *req) |
| static void | nvmf_doca_close_qpair (struct spdk_nvmf_qpair *qpair, spdk_nvmf_transport_qpair_fini_cb cb_fn, void *cb_arg) |
| static int | nvmf_doca_qpair_get_listen_trid (struct spdk_nvmf_qpair *qpair, struct spdk_nvme_transport_id *trid) |
| static void | copy_prp_list_data (struct nvmf_doca_request *request, void *arg) |
| static void | nvme_cmd_map_prps (struct nvmf_doca_request *request) |
| static void | init_dpu_host_buffers (struct nvmf_doca_request *request) |
| static void | post_error_cqe_from_response (struct nvmf_doca_request *request) |
| static void | copy_dpu_data_to_host (struct nvmf_doca_request *request, void *arg) |
| static void | copy_nvme_dpu_data_to_host (struct nvmf_doca_request *request, void *arg) |
| static void | begin_nvme_admin_cmd_data_dpu_to_host (struct nvmf_doca_request *request) |
| static void | begin_nvme_cmd_data_dpu_to_host (struct nvmf_doca_request *request) |
| static void | execute_spdk_request (struct nvmf_doca_request *request, void *arg) |
| static void | begin_nvme_admin_cmd_data_host_to_dpu (struct nvmf_doca_request *request) |
| static void | begin_nvme_cmd_data_host_to_dpu (struct nvmf_doca_request *request) |
| static void | begin_nvme_cmd_data_none (struct nvmf_doca_request *request) |
| static void | nvmf_doca_poll_group_create_io_cq_done (void *args) |
| static struct nvmf_doca_sq * | admin_qp_find_io_sq_by_id (struct nvmf_doca_admin_qp *admin_qp, uint32_t io_sq_id) |
| static void | nvmf_doca_on_io_sq_stop (struct nvmf_doca_sq *sq) |
| static struct nvmf_doca_io * | admin_qp_find_io_cq_by_id (struct nvmf_doca_admin_qp *admin_qp, uint32_t io_cq_id) |
| static void | nvmf_doca_on_io_cq_stop (struct nvmf_doca_io *io) |
| static void | nvmf_doca_poll_group_create_io_cq (void *args) |
| static void | handle_create_io_cq (struct nvmf_doca_sq *sq, struct nvmf_doca_request *request) |
| static void | handle_delete_io_cq (struct nvmf_doca_sq *sq, struct nvmf_doca_request *request) |
| static void | nvmf_doca_poll_group_create_io_sq (void *args) |
| static void | handle_create_io_sq (struct nvmf_doca_sq *sq, struct nvmf_doca_request *request) |
| static void | handle_delete_io_sq (struct nvmf_doca_sq *sq, struct nvmf_doca_request *request) |
| SPDK_NVMF_TRANSPORT_REGISTER (doca, &spdk_nvmf_transport_doca) | |
Variables | |
| struct doca_dpa_app * | nvmf_doca_transport_app |
| const struct spdk_nvmf_transport_ops | spdk_nvmf_transport_doca |
| #define ADMIN_QP_POLL_RATE_LIMIT 1000 |
Definition at line 58 of file doca_transport.c.
| #define FEAT_CMD_AUTONOMOUS_POWER_STATE_TRANSITION_SIZE 256 |
Definition at line 2408 of file doca_transport.c.
| #define FEAT_CMD_HOST_BEHAVIOR_SUPPORT_SIZE 512 |
Definition at line 2410 of file doca_transport.c.
| #define FEAT_CMD_HOST_IDENTIFIER_EXT_SIZE 16 |
Definition at line 2411 of file doca_transport.c.
| #define FEAT_CMD_HOST_IDENTIFIER_SIZE 8 |
Definition at line 2412 of file doca_transport.c.
| #define FEAT_CMD_LBA_RANGE_SIZE 4096 |
Definition at line 2407 of file doca_transport.c.
| #define FEAT_CMD_TIMESTAMP_SIZE 8 |
Definition at line 2409 of file doca_transport.c.
| #define HOTPLUG_TIMEOUT_IN_MICROS (5 * 1000 * 1000) /* Set timeout to 5 seconds */ |
Definition at line 44 of file doca_transport.c.
| #define IDENTIFY_CMD_DATA_BUFFER_SIZE 4096 |
Definition at line 2406 of file doca_transport.c.
| #define LBA_SIZE 512 |
Definition at line 3301 of file doca_transport.c.
| #define NVME_PAGE_SIZE 4096 |
Definition at line 177 of file doca_transport.c.
| #define NVMF_ADMIN_QUEUE_ID 0 |
Definition at line 57 of file doca_transport.c.
| #define NVMF_DOCA_DEFAULT_ABORT_TIMEOUT_SEC 1 |
Definition at line 55 of file doca_transport.c.
| #define NVMF_DOCA_DEFAULT_AQ_DEPTH 256 |
Definition at line 51 of file doca_transport.c.
| #define NVMF_DOCA_DEFAULT_BUFFER_CACHE_SIZE 0 |
Definition at line 53 of file doca_transport.c.
| #define NVMF_DOCA_DEFAULT_IN_CAPSULE_DATA_SIZE 4096 |
Definition at line 48 of file doca_transport.c.
| #define NVMF_DOCA_DEFAULT_IO_UINT_SIZE 128 |
Definition at line 50 of file doca_transport.c.
| #define NVMF_DOCA_DEFAULT_MAX_IO_SIZE 131072 |
Definition at line 49 of file doca_transport.c.
| #define NVMF_DOCA_DEFAULT_MAX_QPAIRS_PER_CTRLR 128 |
Definition at line 47 of file doca_transport.c.
| #define NVMF_DOCA_DEFAULT_MAX_QUEUE_DEPTH 512 |
Definition at line 46 of file doca_transport.c.
| #define NVMF_DOCA_DEFAULT_NUM_SHARED_BUFFER 1 |
Definition at line 52 of file doca_transport.c.
| #define NVMF_DOCA_DIF_INSERT_OR_STRIP false |
Definition at line 54 of file doca_transport.c.
| #define TAILQ_FOREACH_SAFE | ( | var, | |
| head, | |||
| field, | |||
| tvar | |||
| ) | for ((var) = ((head)->tqh_first); (var) && ((tvar) = ((var)->field.tqe_next), 1); (var) = (tvar)) |
Definition at line 64 of file doca_transport.c.
| Enumerator | |
|---|---|
| NVMF_DOCA_LISTENER_UNINITIALIZED | |
| NVMF_DOCA_LISTENER_INITIALIZING | |
| NVMF_DOCA_LISTENER_INITIALIZATION_ERROR | |
| NVMF_DOCA_LISTENER_INITIALIZED | |
| NVMF_DOCA_LISTENER_RESETTING | |
Definition at line 97 of file doca_transport.c.
|
static |
Definition at line 2858 of file doca_transport.c.
|
static |
Definition at line 2825 of file doca_transport.c.
|
static |
Definition at line 2660 of file doca_transport.c.
|
static |
Definition at line 2718 of file doca_transport.c.
|
static |
Definition at line 2677 of file doca_transport.c.
|
static |
Definition at line 2741 of file doca_transport.c.
|
static |
Definition at line 2779 of file doca_transport.c.
|
static |
Definition at line 2690 of file doca_transport.c.
|
static |
Definition at line 2754 of file doca_transport.c.
|
static |
Definition at line 749 of file doca_transport.c.
|
static |
Definition at line 227 of file doca_transport.c.
|
static |
Definition at line 2606 of file doca_transport.c.
|
static |
Definition at line 2635 of file doca_transport.c.
|
static |
Definition at line 2420 of file doca_transport.c.
|
static |
Definition at line 1801 of file doca_transport.c.
|
static |
Definition at line 844 of file doca_transport.c.
| DOCA_LOG_REGISTER | ( | NVME_EMULATION_DOCA_TRANSPORT | ) |
|
static |
Definition at line 2078 of file doca_transport.c.
|
static |
Definition at line 2705 of file doca_transport.c.
|
static |
Definition at line 766 of file doca_transport.c.
|
static |
Definition at line 1355 of file doca_transport.c.
|
static |
Definition at line 254 of file doca_transport.c.
|
static |
Definition at line 1429 of file doca_transport.c.
|
static |
Definition at line 2967 of file doca_transport.c.
|
static |
Definition at line 3088 of file doca_transport.c.
|
static |
Definition at line 3002 of file doca_transport.c.
|
static |
Definition at line 3131 of file doca_transport.c.
|
static |
Definition at line 1374 of file doca_transport.c.
|
static |
Definition at line 2546 of file doca_transport.c.
|
static |
Definition at line 2467 of file doca_transport.c.
|
static |
Definition at line 566 of file doca_transport.c.
|
static |
Definition at line 553 of file doca_transport.c.
|
static |
Definition at line 546 of file doca_transport.c.
|
static |
Definition at line 1006 of file doca_transport.c.
|
static |
Definition at line 936 of file doca_transport.c.
|
static |
Definition at line 2371 of file doca_transport.c.
|
static |
Definition at line 2200 of file doca_transport.c.
|
static |
Definition at line 2167 of file doca_transport.c.
|
static |
Definition at line 601 of file doca_transport.c.
|
static |
Definition at line 1194 of file doca_transport.c.
|
static |
Definition at line 1167 of file doca_transport.c.
|
static |
Definition at line 492 of file doca_transport.c.
|
static |
Definition at line 1654 of file doca_transport.c.
|
static |
Definition at line 1050 of file doca_transport.c.
|
static |
Definition at line 700 of file doca_transport.c.
|
static |
Definition at line 1137 of file doca_transport.c.
|
static |
Definition at line 1101 of file doca_transport.c.
|
static |
Definition at line 1088 of file doca_transport.c.
|
static |
Definition at line 275 of file doca_transport.c.
|
static |
Definition at line 1024 of file doca_transport.c.
|
static |
Definition at line 682 of file doca_transport.c.
|
static |
Definition at line 2060 of file doca_transport.c.
|
static |
Definition at line 1846 of file doca_transport.c.
|
static |
Definition at line 1960 of file doca_transport.c.
|
static |
Definition at line 818 of file doca_transport.c.
|
static |
Definition at line 1397 of file doca_transport.c.
|
static |
Definition at line 3409 of file doca_transport.c.
|
static |
Definition at line 3433 of file doca_transport.c.
|
static |
This will begin an async flow passing through the following methods begin_nvme_cmd_data_none —> post_cqe_from_response —> nvmf_doca_on_post_cqe_complete
This will begin an async flow passing through the following methods begin_nvme_cmd_data_host_to_dpu —> nvme_cmd_map_prps —> buffers_ready_copy_data_host_to_dpu --> execute_spdk_request —> post_cqe_from_response —> nvmf_doca_on_post_cqe_complete
This will begin an async flow passing through the following methods begin_nvme_cmd_data_dpu_to_host —> nvme_cmd_map_prps —> buffers_ready_copy_data_dpu_to_host —> copy_dpu_data_to_host —> post_cqe_from_response —> nvmf_doca_on_post_cqe_complete
Definition at line 3310 of file doca_transport.c.
|
static |
This will begin an async flow passing through the following methods begin_nvme_cmd_data_none —> post_cqe_from_response —> nvmf_doca_on_post_cqe_complete
This will begin an async flow passing through the following methods begin_nvme_admin_cmd_data_host_to_dpu —> execute_spdk_request —> post_cqe_from_response —> nvmf_doca_on_post_cqe_complete
This will begin an async flow passing through the following methods begin_nvme_admin_cmd_data_dpu_to_host —> copy_dpu_data_to_host —> post_cqe_from_response —> nvmf_doca_on_post_cqe_complete
Definition at line 3165 of file doca_transport.c.
|
static |
Definition at line 1415 of file doca_transport.c.
|
static |
The PCI device poll group should be destroyed only after all CQs have been destroyed Admin QP thread is expected to poll admin CQs along with IO CQs In that case need to destroy the poll group only after admin CQ is destroyed
Definition at line 2875 of file doca_transport.c.
|
static |
Definition at line 2842 of file doca_transport.c.
|
static |
Definition at line 3375 of file doca_transport.c.
|
static |
Definition at line 3390 of file doca_transport.c.
|
static |
Definition at line 204 of file doca_transport.c.
|
static |
Definition at line 1742 of file doca_transport.c.
|
static |
Definition at line 1708 of file doca_transport.c.
|
static |
Definition at line 1330 of file doca_transport.c.
|
static |
Definition at line 1290 of file doca_transport.c.
|
static |
Definition at line 958 of file doca_transport.c.
|
static |
Definition at line 977 of file doca_transport.c.
|
static |
Definition at line 888 of file doca_transport.c.
|
static |
Definition at line 907 of file doca_transport.c.
|
static |
Definition at line 306 of file doca_transport.c.
|
static |
Definition at line 2263 of file doca_transport.c.
|
static |
Definition at line 1988 of file doca_transport.c.
|
static |
Definition at line 2903 of file doca_transport.c.
|
static |
Definition at line 2797 of file doca_transport.c.
|
static |
Definition at line 3059 of file doca_transport.c.
|
static |
Definition at line 3034 of file doca_transport.c.
|
static |
Definition at line 2036 of file doca_transport.c.
|
static |
Definition at line 2306 of file doca_transport.c.
|
static |
Definition at line 2288 of file doca_transport.c.
|
static |
Definition at line 2389 of file doca_transport.c.
|
static |
Definition at line 2353 of file doca_transport.c.
|
static |
Definition at line 2336 of file doca_transport.c.
|
static |
Definition at line 2100 of file doca_transport.c.
|
static |
Definition at line 1911 of file doca_transport.c.
|
static |
Definition at line 727 of file doca_transport.c.
|
static |
Definition at line 2572 of file doca_transport.c.
|
static |
Definition at line 2592 of file doca_transport.c.
|
static |
Definition at line 1587 of file doca_transport.c.
|
static |
Definition at line 1533 of file doca_transport.c.
| SPDK_NVMF_TRANSPORT_REGISTER | ( | doca | , |
| & | spdk_nvmf_transport_doca | ||
| ) |
|
static |
Definition at line 1513 of file doca_transport.c.
|
extern |
| const struct spdk_nvmf_transport_ops spdk_nvmf_transport_doca |
Implementation of the DOCA transport
Definition at line 3433 of file doca_transport.c.