### Start DPA Tracer Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Initiates the execution of a previously created and configured DPA tracer. ```c flexio_status flexio_dtrace_start(flexio_process* process); ``` -------------------------------- ### Start FlexIO DPA Tracer in Lossless Mode Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Starts the DPA tracer in lossless mode. Tracing in this mode continues until the device-side memory limit is reached. Note that lossless mode is not native for tracers, and using regular print mechanisms might be a better alternative. ```c flexio_status flexio_dtrace_ll_start ( flexio_process* process ) Start DPA tracer in lossless mode. ``` -------------------------------- ### FUSE Header and Initialization Structures Source: https://docs.nvidia.com/doca/api/3-3-0/doca-libraries-api/annotated.html Documentation for the core FUSE header and initialization structures used to manage file system requests and session setup. ```APIDOC ## Struct: fuse_in_header ### Description The header structure for all incoming FUSE requests. ### Parameters - **gid** (uint32_t) - Group ID - **len** (uint32_t) - Length of the request - **nodeid** (uint64_t) - Node ID - **opcode** (uint32_t) - Operation code - **pid** (uint32_t) - Process ID - **uid** (uint32_t) - User ID - **unique** (uint64_t) - Unique request identifier ## Struct: fuse_init_in ### Description Initialization parameters sent by the FUSE client. ### Parameters - **major** (uint32_t) - Major version - **minor** (uint32_t) - Minor version - **max_readahead** (uint32_t) - Max readahead size - **flags** (uint32_t) - Feature flags ## Struct: fuse_init_out ### Description Initialization response parameters from the FUSE server. ### Parameters - **major** (uint32_t) - Major version - **minor** (uint32_t) - Minor version - **max_write** (uint32_t) - Max write size - **max_background** (uint16_t) - Max background requests ``` -------------------------------- ### FlexIO Process Memory Info Get Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Gets process memory information. ```APIDOC ## flexio_process_mem_info_get ### Description Get process memory info. ### Method N/A (Function) ### Endpoint N/A (Function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **flexio_heap_mem_info** - Information about the process memory. #### Response Example N/A ``` -------------------------------- ### DPA Tracer (DTrace) Management Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Functions for creating, destroying, initializing, and configuring the DPA tracer for FlexIO processes. Includes starting in lossless mode and setting various limits. ```c flexio_status flexio_dtrace_create ( flexio_process* process ); flexio_status flexio_dtrace_destroy ( flexio_process* process ); flexio_status flexio_dtrace_info_get ( flexio_process* process, flexio_dtrace_info* info, size_t info_bsize ); flexio_status flexio_dtrace_init ( flexio_process* process ); flexio_status flexio_dtrace_ll_start ( flexio_process* process ); flexio_status flexio_dtrace_set_batch_depth ( flexio_process* process, size_t po2sz ); flexio_status flexio_dtrace_set_cli_mgmt ( flexio_process* process, const char* mgmt_fname ); flexio_status flexio_dtrace_set_dev_mem_limit ( flexio_process* process, size_t po2sz ); flexio_status flexio_dtrace_set_diskspace_limit ( flexio_process* process, size_t size ); ``` -------------------------------- ### Manage FlexIO Applications Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Functions for extracting symbol data, retrieving ELF binaries and their sizes, getting application lists, and managing application names. Includes functions to free application lists. ```c flexio_status flexio_app_extract_symbol ( flexio_app* app, const char* symbol_name, void* symbol_data, size_t* sym_data_size ); flexio_status flexio_app_get ( flexio_app_select_attr* fattr, flexio_app** app ); flexio_status flexio_app_get_elf ( flexio_app* app, uint64_t* bin_buff, size_t bin_size ); FLEXIO_EXPERIMENTAL size_t flexio_app_get_elf_size ( flexio_app* app ); flexio_status flexio_app_get_list ( flexio_app*** app_list, uint32_t* num_apps ); const FLEXIO_EXPERIMENTAL char* flexio_app_get_name ( flexio_app* app ); flexio_status flexio_app_list_free ( flexio_app** apps_list ); ``` -------------------------------- ### FlexIO Completion Queue (CQ) Management Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Functions for creating, destroying, and querying FlexIO Completion Queues. Includes getting CQ number, the underlying object, and modifying moderation settings. ```c flexio_status flexio_cq_create ( flexio_process* process, ibv_context* ibv_ctx, const flexio_cq_attr* fattr, flexio_cq** cq ); flexio_status flexio_cq_destroy ( flexio_cq* cq ); FLEXIO_EXPERIMENTAL uint32_t flexio_cq_get_cq_num ( flexio_cq* cq ); mlx5dv_devx_obj* flexio_cq_get_obj ( flexio_cq* cq ); flexio_status flexio_cq_modify_moderation ( flexio_cq* cq, uint16_t max_count, uint16_t period, uint16_t mode ); flexio_status flexio_cq_query_moderation ( flexio_cq* cq, uint16_t* max_count, uint16_t* period, uint16_t* mode ); ``` -------------------------------- ### Get FlexIO DPA Tracer Info Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Reports the resources allocated and used by the DPA tracer. This function can only be called after the DPA tracer has been created (i.e., after calling flexio_dtrace_create()). ```c flexio_status flexio_dtrace_info_get ( flexio_process* process, flexio_dtrace_info* info, size_t info_bsize ) Reports resources, allocated and used by dTrace. ``` -------------------------------- ### Start and Stop FlexIO Tracing Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Functions to control the DPA tracer for FlexIO processes. `flexio_dtrace_start` initiates tracing, resetting output files. `flexio_dtrace_stop` halts tracing, flushing incomplete data and closing output files. ```c flexio_status flexio_dtrace_start ( flexio_process* process ); flexio_status flexio_dtrace_stop ( flexio_process* process ); ``` -------------------------------- ### Get FlexIO RQ Object Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Retrieves the underlying mlx5dv_devx_obj for a FlexIO Receive Queue (RQ). This function is relevant for hostful applications only and returns a pointer to the devx object. It requires a pointer to the RQ context. ```c FLEXIO_EXPERIMENTAL mlx5dv_devx_obj* flexio_rq_get_object ( flexio_rq* rq ) ``` -------------------------------- ### FlexIO Process Get UAR Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Gets a FlexIO UAR object from a FlexIO process. ```APIDOC ## flexio_process_get_uar ### Description Gets a FlexIO UAR object from a FlexIO process. ### Method FLEXIO_EXPERIMENTAL ### Endpoint N/A (Function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **flexio_uar*** - The FlexIO process UAR object or NULL on error. #### Response Example N/A ``` -------------------------------- ### POST /flexio/mkey/create Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Creates an MKey to the process device UMEM. ```APIDOC ## POST /flexio/mkey/create ### Description Creates an MKey over the provided PD for the provided process device UMEM. ### Method POST ### Parameters #### Request Body - **process** (pointer) - Required - Pointer to the FlexIO process context. - **fattr** (pointer) - Required - Pointer to a FlexIO MKey attribute struct. - **mkey** (pointer) - Required - Pointer to the created MKey struct. ### Response #### Success Response (200) - **status** (flexio_status) - Returns the flexio status value. ``` -------------------------------- ### Create FlexIO Queue Pair (QP) Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Creates a FlexIO Queue Pair (QP). This function requires a FlexIO process context, an optional IBV device context, QP attributes, and a pointer to store the created QP context. It returns a flexio status value. ```c flexio_status flexio_qp_create ( flexio_process* process, ibv_context* ibv_ctx, flexio_qp_attr* qp_fattr, flexio_qp** qp_ptr ) ``` -------------------------------- ### FlexIO Process Get DUMEM ID Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Gets the FlexIO process DUMEM ID. ```APIDOC ## flexio_process_get_dumem_id ### Description Gets the FlexIO process DUMEM ID. ### Method FLEXIO_EXPERIMENTAL ### Endpoint N/A (Function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **uint32_t** - The FlexIO process DUMEM ID or UINT32_MAX on error. #### Response Example N/A ``` -------------------------------- ### POST /flexio/cq/create Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Creates a new FlexIO Completion Queue (CQ). ```APIDOC ## POST /flexio/cq/create ### Description Initializes and creates a FlexIO Completion Queue. ### Method POST ### Parameters #### Request Body - **process** (pointer) - Required - Pointer to the FlexIO process. - **ibv_ctx** (pointer) - Optional - Pointer to an IBV device context. - **fattr** (pointer) - Required - Pointer to the CQ attributes struct. - **cq** (pointer) - Required - Pointer to the created CQ context pointer. ### Response #### Success Response (200) - **status** (flexio_status) - Returns the flexio status value. ``` -------------------------------- ### FlexIO Process Get PD Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Gets a FlexIO IBV PD object from a FlexIO process. Relevant for hostful applications only. ```APIDOC ## flexio_process_get_pd ### Description Gets a FlexIO IBV PD object from a FlexIO process. Relevant for hostful applications only. ### Method FLEXIO_EXPERIMENTAL ### Endpoint N/A (Function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **ibv_pd*** - The process's PD object or NULL on error. #### Response Example N/A ``` -------------------------------- ### flexio_mkey_get_id Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Gets the FlexIO MKey ID. This is an experimental function. ```APIDOC ## flexio_mkey_get_id ### Description Gets the FlexIO MKey ID. This is an experimental function. ### Method (Not specified, likely a function call in C) ### Endpoint (Not applicable, this is a library function) ### Parameters #### Path Parameters (None) #### Query Parameters (None) #### Request Body (None) ### Request Example (Not applicable) ### Response #### Success Response - **return value** (uint32_t) - the FlexIO mkey ID or UINT32_MAX on error. #### Response Example (Not applicable) ``` -------------------------------- ### Create FlexIO Receive Queue Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Creates a FlexIO Receive Queue (RQ) associated with a specific process and IBV context. Returns a status code and populates the provided pointer. ```C flexio_status flexio_rq_create(flexio_process* process, ibv_context* ibv_ctx, uint32_t cq_num, const flexio_wq_attr* fattr, flexio_rq** flexio_rq_ptr); ``` -------------------------------- ### FlexIO Process Create Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Creates a new FlexIO process with the requested image. Relevant for hostful applications only. ```APIDOC ## flexio_process_create ### Description Creates a new FlexIO process with the requested image. Relevant for hostful applications only. ### Method N/A (Function) ### Endpoint N/A (Function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **flexio_status** - The status of the operation. #### Response Example N/A ``` -------------------------------- ### fuse_setupmapping_in Struct Source: https://docs.nvidia.com/doca/api/3-3-0/doca-libraries-api/annotated.html Parameters for setting up a memory mapping in FUSE. ```APIDOC ## fuse_setupmapping_in Struct Reference ### Description Parameters for setting up a memory mapping in FUSE. ### Fields - **fh** (uint64_t) - An already open handle. - **flags** (uint64_t) - Flags for the mapping. - **foffset** (uint64_t) - Offset into the file to start the mapping. - **len** (uint64_t) - Length of the mapping required. - **moffset** (uint64_t) - Offset in the memory window. ``` -------------------------------- ### GET /telemetry/phy/rx_power Source: https://docs.nvidia.com/doca/api/3-3-0/doca-libraries-api/annotated.html Retrieves the RX power thresholds and current power levels per lane in dBm. ```APIDOC ## GET /telemetry/phy/rx_power ### Description Retrieves RX power telemetry data including high/low alarm thresholds and per-lane power levels. ### Method GET ### Endpoint /telemetry/phy/rx_power ### Response #### Success Response (200) - **rx_power_high** (float) - Alarm high threshold in dBm. - **rx_power_low** (float) - Alarm low threshold in dBm. - **rx_power_per_lane** (array) - Current RX power in dBm per lane. #### Response Example { "rx_power_high": 2.5, "rx_power_low": -10.0, "rx_power_per_lane": [-1.2, -1.5, -1.3, -1.4] } ``` -------------------------------- ### FlexIO Outbox UAR Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Gets a FlexIO UAR object from a FlexIO outbox. Relevant for hostful applications only. ```APIDOC ## flexio_outbox_get_uar ### Description Gets a FlexIO UAR object from a FlexIO outbox. Relevant for hostful applications only. ### Method FLEXIO_EXPERIMENTAL ### Endpoint N/A (Function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **flexio_uar*** - A pointer to a FlexIO UAR object or NULL on error. #### Response Example N/A ``` -------------------------------- ### Create FlexIO Send Queue Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Initializes a FlexIO Send Queue (SQ) for data transmission. Requires a process, IBV context, and completion queue number. ```C flexio_status flexio_sq_create(flexio_process* process, ibv_context* ibv_ctx, uint32_t cq_num, const flexio_wq_attr* fattr, flexio_sq** flexio_sq_ptr); ``` -------------------------------- ### Create FlexIO RQ Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Creates a FlexIO Receive Queue (RQ). This function assumes cross VHCA_ID without explicit checking and is relevant for hostful applications only. It requires pointers to the FlexIO process, an IBV device context, a CQ number, RQ attributes, and a pointer to store the created RQ context. ```c flexio_status flexio_rq_create ( flexio_process* process, ibv_context* ibv_ctx, uint32_t cq_num, const flexio_wq_attr* fattr, flexio_rq** flexio_rq_ptr ) ``` -------------------------------- ### flexio_hw_model_id_get Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Get the FlexIO HW model ID for the given IBV device. Relevant for hostful applications only. ```APIDOC ## flexio_hw_model_id_get ### Description Get FlexIO HW model ID. This function gets the FlexIO HW model ID for the given IBV device. Relevant for hostful applications only. ### Method (Not specified, likely a function call in C) ### Endpoint (Not applicable, this is a library function) ### Parameters #### Path Parameters (None) #### Query Parameters (None) #### Request Body (None) ### Request Example (Not applicable) ### Response #### Success Response - **flexio_hw_model_id** (flexio_hw_model_id) - flexio HW model ID value. #### Response Example (Not applicable) ``` -------------------------------- ### GET /telemetry/phy/cable/general_properties Source: https://docs.nvidia.com/doca/api/3-3-0/doca-libraries-api/annotated.html Retrieves the general physical properties of a connected cable, such as cable type, technology, and compliance codes. ```APIDOC ## GET /telemetry/phy/cable/general_properties ### Description Retrieves general properties of the physical cable, including identifiers, technology, and compliance information. ### Method GET ### Endpoint /telemetry/phy/cable/general_properties ### Parameters #### Query Parameters - **cable_id** (string) - Required - The unique identifier for the cable interface. ### Response #### Success Response (200) - **cable_type** (enum) - The type of cable. - **cable_technology** (union) - The underlying technology of the cable. - **smf_length** (uint32) - SMF length in meters. - **transfer_distance** (float) - Cable length in meters. #### Response Example { "cable_type": "QSFP", "cable_technology": "optical", "smf_length": 100, "transfer_distance": 10.5 } ``` -------------------------------- ### GET /telemetry/phy/raw_error Source: https://docs.nvidia.com/doca/api/3-3-0/doca-libraries-api/annotated.html Retrieves the raw bit error rate (BER) and error counts per lane for the physical interface. ```APIDOC ## GET /telemetry/phy/raw_error ### Description Retrieves raw error statistics including Bit Error Rate (BER) and error counts per lane. ### Method GET ### Endpoint /telemetry/phy/raw_error ### Response #### Success Response (200) - **raw_ber** (object) - Global raw BER information. - **raw_ber_per_lane** (array) - Array of BER objects per lane. - **raw_errors_per_lane** (array) - Array of error counts per lane. #### Response Example { "raw_ber": { "ber_coef": 1, "ber_magnitude": 12 }, "raw_errors_per_lane": [0, 0, 0, 0] } ``` -------------------------------- ### Window Management Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Functions to create and destroy FlexIO memory windows. ```APIDOC ## POST /flexio_window_create ### Description Creates a FlexIO window for the given process and protection domain. ### Method POST ### Parameters #### Request Body - **process** (flexio_process*) - Required - A pointer to the FlexIO process. - **pd** (ibv_pd*) - Required - A pointer to a protection domain struct. - **window** (flexio_window**) - Required - A pointer to the created window context pointer. ## POST /flexio_window_destroy ### Description Destroys a FlexIO window. ### Method POST ### Parameters #### Request Body - **window** (flexio_window*) - Required - A pointer to a window context. ``` -------------------------------- ### GET /telemetry/phy/cable/power_and_temp Source: https://docs.nvidia.com/doca/api/3-3-0/doca-libraries-api/annotated.html Retrieves real-time power and temperature telemetry data for the cable, including DDM support status and voltage levels. ```APIDOC ## GET /telemetry/phy/cable/power_and_temp ### Description Retrieves power and temperature diagnostic information for the cable, provided Digital Diagnostic Monitoring (DDM) is supported. ### Method GET ### Endpoint /telemetry/phy/cable/power_and_temp ### Parameters #### Query Parameters - **cable_id** (string) - Required - The unique identifier for the cable interface. ### Response #### Success Response (200) - **ddm_supported** (uint8) - Indicates if DDM is supported. - **max_power** (float) - Maximum power consumption in Watts. - **module_temperature** (struct) - Current temperature readings. - **module_voltage** (struct) - Current voltage readings. #### Response Example { "ddm_supported": 1, "max_power": 2.5, "module_temperature": { "current": 45.0 }, "module_voltage": { "current": 3.3 } } ``` -------------------------------- ### Get FlexIO MKey ID Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Retrieves the unique identifier for a given FlexIO Memory Key (MKey). Returns UINT32_MAX if an error occurs. ```c FLEXIO_EXPERIMENTAL uint32_t flexio_mkey_get_id ( flexio_mkey* mkey ) ``` -------------------------------- ### POST /flexio/process/core_dump Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Creates a core dump image of a process and its threads for debugging purposes. ```APIDOC ## POST /flexio/process/core_dump ### Description Creates a core dump image of a process and all its threads, intended for debugging DPA application code after fatal errors. ### Method POST ### Parameters #### Request Body - **process** (pointer) - Required - A pointer to a flexio_process. - **outfile** (string) - Optional - Pathname to write ELF formatted core dump data. If NULL, defaults to flexio_dev.NNN.core. ### Response #### Success Response (200) - **status** (flexio_status) - Returns the flexio status value. ``` -------------------------------- ### Create FlexIO SQ Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Creates a FlexIO Send Queue (SQ). This function allows specifying an IBV device context that might be different from the process's context. It requires pointers to the FlexIO process, an IBV device context, a CQ number, SQ attributes, and a pointer to store the created SQ context. ```c flexio_status flexio_sq_create ( flexio_process* process, ibv_context* ibv_ctx, uint32_t cq_num, const flexio_wq_attr* fattr, flexio_sq** flexio_sq_ptr ) ``` -------------------------------- ### FlexIO Message Stream API Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Functions for managing FlexIO message streams, including getting IDs, setting levels, and retrieving queue pair numbers. ```APIDOC ## flexio_msg_stream_get_id ### Description Gets the FlexIO device message stream's ID (aka file descriptor). ### Method N/A (C function) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **ID** (int) - The message stream's ID. #### Response Example N/A ## flexio_msg_stream_level_set ### Description Change the provided device message stream's level. ### Method N/A (C function) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **Status** (flexio_status) - Indicates success or failure. #### Response Example N/A ## flexio_msg_stream_qp_numbers_get ### Description Gets the FlexIO device message stream's QPs numbers. ### Method N/A (C function) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **host_qp_number** (uint32_t*) - Pointer to store the host QP number. - **dev_qp_number** (uint32_t*) - Pointer to store the device QP number. #### Response Example N/A ``` -------------------------------- ### Manage FlexIO Message Streams Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Functions to retrieve stream IDs, modify stream levels, and get queue pair numbers for FlexIO message streams. ```c int flexio_msg_stream_get_id(flexio_msg_stream* stream); flexio_status flexio_msg_stream_level_set(flexio_msg_stream* stream, flexio_msg_dev_level level); flexio_status flexio_msg_stream_qp_numbers_get(flexio_msg_stream* stream, uint32_t* host_qp_number, uint32_t* dev_qp_number); ``` -------------------------------- ### flexio_log_dev_init Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Deprecated function. Use flexio_msg_stream_create() instead. ```APIDOC ## flexio_log_dev_init ### Description Deprecated function. Use flexio_msg_stream_create() instead. ### Method (Not specified, likely a function call in C) ### Endpoint (Not applicable, this is a library function) ### Parameters #### Path Parameters (None) #### Query Parameters (None) #### Request Body (None) ### Request Example (Not applicable) ### Response #### Success Response (0 for success, non-zero for error) - **flexio_status** (flexio_status) - flexio status value. #### Response Example (Not applicable) ``` -------------------------------- ### Get FlexIO Hardware Model ID Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Retrieves the FlexIO Hardware Model ID for a given IBV (InfiniBand Verbs) context. This function is relevant for hostful applications only. ```c flexio_hw_model_id flexio_hw_model_id_get ( ibv_context* ibv_ctx ) ``` -------------------------------- ### FlexIO Command Queue Management Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Functions to create, destroy, and manage asynchronous RPC command queues. Includes checking if a queue is empty and adding tasks. ```c flexio_status flexio_cmdq_create ( flexio_process* process, flexio_cmdq_attr* fattr, flexio_cmdq** cmdq ); flexio_status flexio_cmdq_destroy ( flexio_cmdq* cmdq ); FLEXIO_EXPERIMENTAL int flexio_cmdq_is_empty ( flexio_cmdq* cmdq ); flexio_status flexio_cmdq_state_running ( flexio_cmdq* cmdq ); flexio_status flexio_cmdq_task_add ( flexio_cmdq* cmdq, flexio_func_t* host_func, uint64_t arg ); ``` -------------------------------- ### Manage FlexIO Completion Queues (CQ) Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Functions to create, destroy, query, and modify FlexIO completion queues. Includes support for moderation settings. ```c flexio_status flexio_cq_create(flexio_process* process, ibv_context* ibv_ctx, const flexio_cq_attr* fattr, flexio_cq** cq); flexio_status flexio_cq_destroy(flexio_cq* cq); flexio_status flexio_cq_modify_moderation(flexio_cq* cq, uint16_t max_count, uint16_t period, uint16_t mode); flexio_status flexio_cq_query_moderation(flexio_cq* cq, uint16_t* max_count, uint16_t* period, uint16_t* mode); uint32_t flexio_cq_get_cq_num(flexio_cq* cq); mlx5dv_devx_obj* flexio_cq_get_obj(flexio_cq* cq); ``` -------------------------------- ### DOCA Logging Registration Source: https://docs.nvidia.com/doca/api/3-3-0/doca-libraries-api/annotated.html Registers a log source for DOCA. The macro handles registration and teardown logic. Example shows how to register 'dpi' and log an informational message. ```c DOCA_LOG_REGISTER(dpi) void foo() { DOCA_LOG_INFO("Message"); } ``` -------------------------------- ### Initialize FlexIO DPA Tracer Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Initiates the process of creating a DPA tracer for a FlexIO process using default parameters. Tracer parameters can be modified later using specific flexio_dtrace_set_XXX functions. ```c flexio_status flexio_dtrace_init ( flexio_process* process ) Initiates process of creating a DPA tracer for FlexIO process. ``` -------------------------------- ### Manage FlexIO Resources Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Functions to create and destroy resource structures and retrieve metadata like application names and execution unit groups. ```c flexio_status flexio_resources_create(const char* key, const void* buf, size_t buf_bsize, flexio_resource** res); flexio_status flexio_resources_destroy(flexio_resource* res); char* flexio_resources_get_app_name(flexio_resource* res); uint32_t* flexio_resources_get_eugs(flexio_resource* res); ``` -------------------------------- ### Struct flexio_dev_mini_cqe64 Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/annotated.html Describes the Flex IO device compressed CQE structure used for efficient completion queue management. ```APIDOC ## Struct flexio_dev_mini_cqe64 ### Description Describes Flex IO dev compressed CQE (Completion Queue Entry). ### Parameters - **mini_cqe** (__be64[7]) - Required - Array containing mini CQE data (00h-37h). - **num_and_type** (uint8_t) - Required - Number of mini CQEs and format type (3fh). - **rsvd0** (uint8_t[6]) - Required - Reserved space (38h-3dh). - **validity_iteration_count** (uint8_t) - Required - Validity iteration count (3eh). ### Response Example { "mini_cqe": ["0x...", "0x..."], "num_and_type": 1, "validity_iteration_count": 0 } ``` -------------------------------- ### Define DOCA Telemetry PHY Structures Source: https://docs.nvidia.com/doca/api/3-3-0/doca-libraries-api/annotated.html Examples of C structures used to define cable attenuation and bit error rate telemetry data in the DOCA PHY API. ```c struct doca_telemetry_phy_ber { uint8_t ber_coef; uint8_t ber_magnitude; }; struct doca_telemetry_phy_cable_attenuation { uint8_t ca_12g; uint8_t ca_25g; uint8_t ca_53g; uint8_t ca_5g; uint8_t ca_7g; }; ``` -------------------------------- ### FlexIO Version and Window Management API Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html APIs for setting the FlexIO version and managing FlexIO windows. ```APIDOC ## flexio_version_set ### Description Set version for flexio. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters - **version** (*uint64_t*) - Description ### Response - **flexio_status** - Description ## flexio_window_create ### Description Creates a FlexIO window. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters - **process** (*flexio_process*) - Description - **pd** (*ibv_pd*) - Description - **window** (*flexio_window**) - Description ### Response - **flexio_status** - Description ## flexio_window_destroy ### Description Destroys a FlexIO window. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters - **window** (*flexio_window*) - Description ### Response - **flexio_status** - Description ## flexio_window_get_id ### Description Gets the FlexIO window ID. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters - **window** (*flexio_window*) - Description ### Response - **uint32_t** - Description ``` -------------------------------- ### Get FlexIO Queue Pair (QP) State Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Retrieves the current state of the FlexIO Queue Pair (QP) on the device. It takes a pointer to the FlexIO QP and returns an enum flexio_qp_state. ```c flexio_qp_state flexio_qp_state_get ( flexio_qp* qp ) ``` -------------------------------- ### Get FlexIO Queue Pair (QP) Number Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Retrieves the number of a FlexIO Queue Pair (QP). It takes a pointer to the FlexIO QP and returns the QP number or UINT32_MAX on error. ```c FLEXIO_EXPERIMENTAL uint32_t flexio_qp_get_qp_num ( flexio_qp* qp ) ``` -------------------------------- ### Manage FlexIO Device MKeys Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Functions to create and destroy memory keys (MKeys) for accessing process device UMEM. ```c flexio_status flexio_device_mkey_create(flexio_process* process, flexio_mkey_attr* fattr, flexio_mkey** mkey); flexio_status flexio_device_mkey_destroy(flexio_mkey* mkey); ``` -------------------------------- ### Create FlexIO SQ Cross Device Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Creates a FlexIO Send Queue (SQ) assuming a cross-device configuration. This function explicitly handles scenarios where the SQ might be on a different VHCA ID and requires the IBV device context to be different from the process's. It is relevant for hostful applications only. Parameters include pointers to the FlexIO process, IBV device context, CQ number, SQ attributes, and a pointer for the created SQ context. ```c flexio_status flexio_sq_create_cross_dev ( flexio_process* process, ibv_context* ibv_ctx, uint32_t cq_num, const flexio_wq_attr* fattr, flexio_sq** flexio_sq_ptr ) ``` -------------------------------- ### Get Maximum Continuous DPA Thread Run Time Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Retrieves the maximum time in seconds that DPA threads are allowed to execute continuously. It requires a pointer to the FlexIO process context. ```c FLEXIO_EXPERIMENTAL unsigned int flexio_process_thread_cont_run_time_max_get ( flexio_process* process ) ``` -------------------------------- ### Enable FlexIO DPA Tracer Console Management Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Enables management of the DPA tracer from the console via a FIFO pipe. If a management filename is not provided, a default path is used. This feature is relevant only for hostful applications. ```c flexio_status flexio_dtrace_set_cli_mgmt ( flexio_process* process, const char* mgmt_fname ) Enable a DPA tracer management from console. ``` -------------------------------- ### Manage FlexIO RMP and RQ Objects Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Functions for creating and destroying Receive Message Queue Pairs (RMP) and Receive Queues (RQ) in hostful and cross-device environments. ```C flexio_status flexio_rmp_create(flexio_process* process, ibv_context* ibv_ctx, const flexio_wq_attr* fattr, flexio_rmp** flexio_rmp_ptr); flexio_status flexio_rmp_destroy(flexio_rmp* flexio_rmp); FLEXIO_EXPERIMENTAL uint32_t flexio_rmp_get_wq_num(flexio_rmp* rmp); flexio_status flexio_rq_create(flexio_process* process, ibv_context* ibv_ctx, uint32_t cq_num, const flexio_wq_attr* fattr, flexio_rq** flexio_rq_ptr); flexio_status flexio_rq_create_cross_dev(flexio_process* process, ibv_context* ibv_ctx, uint32_t cq_num, const flexio_wq_attr* fattr, flexio_rq** flexio_rq_ptr); ``` -------------------------------- ### Run FlexIO Event Handler Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Executes a previously created FlexIO event handler. The `flexio_event_handler_run` function starts the event handler's operation, accepting a user-defined argument for its thread. ```c flexio_status flexio_event_handler_run ( flexio_event_handler* event_handler, uint64_t user_arg ); ``` -------------------------------- ### Create DPA Core Dump Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Generates a core dump of the specified FlexIO process for debugging purposes. ```C flexio_status flexio_coredump_create(flexio_process* process, const char* outfile); ``` -------------------------------- ### Set FlexIO DPA Tracer Disk Space Limit Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Sets the disk space limit in bytes for the DPA tracer. ```c flexio_status flexio_dtrace_set_diskspace_limit ( flexio_process* process, size_t size ) Set a DPA tracer disk space limit (in bytes). ``` -------------------------------- ### Get FlexIO SQ Number Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Retrieves the unique number assigned to a FlexIO Send Queue (SQ). This function takes a pointer to the SQ context and returns the SQ number, or UINT32_MAX if an error occurs. ```c FLEXIO_EXPERIMENTAL uint32_t flexio_sq_get_wq_num ( flexio_sq* sq ) ``` -------------------------------- ### Get FlexIO RQ Number Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Retrieves the unique number assigned to a FlexIO Receive Queue (RQ). This function takes a pointer to the RQ context and returns the RQ number, or UINT32_MAX if an error occurs. ```c FLEXIO_EXPERIMENTAL uint32_t flexio_rq_get_wq_num ( flexio_rq* rq ) ``` -------------------------------- ### FlexIO QP Attributes Configuration Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/annotated.html Defines attributes for configuring and modifying Queue Pairs (QPs) in the FlexIO system. Includes parameters for destination MAC, loopback, GID table index, GRH, isolated VL/TC, RQ/SQ depth, retry counts, and more. It also includes masks to indicate which parameters are being modified. ```c typedef struct flexio_qp_attr { uint8_t * dest_mac; uint8_t fl; uint8_t gid_table_index; uint8_t grh; uint8_t isolate_vl_tc; int log_rq_depth; uint8_t log_rra_max; int log_sq_depth; uint8_t log_sra_max; uint32_t min_rnr_nak_timer; uint32_t next_rcv_psn; uint32_t next_send_psn; enum flexio_qp_state next_state; int no_sq; int ops_flag; enum flexio_qp_mtu path_mtu; ibv_pd * pd; uint32_t q_key; int qp_access_mask; struct flexio_qmem qp_wq_buff_qmem; struct flexio_qmem qp_wq_dbr_qmem; uint32_t remote_qp_num; uint8_t retry_count; ibv_gid rgid_or_rip; uint16_t rlid; uint32_t rmpqn; uint32_t rq_cqn; int rq_type; uint32_t sq_cqn; enum flexio_qp_transport_type transport_type; uint32_t uar_id; uint16_t udp_sport; uint32_t user_index; uint8_t vhca_port_num; } flexio_qp_attr; typedef struct flexio_qp_attr_opt_param_mask { bool min_rnr_nak_timer; bool qp_access_mask; bool min_rnr_nak_timer; bool qp_access_mask; } flexio_qp_attr_opt_param_mask; ``` -------------------------------- ### FlexIO Outbox and Process Management Functions Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Functions for managing FlexIO outbox UARs and the lifecycle of FlexIO processes, including creation, destruction, and error handler configuration. ```c flexio_uar* flexio_outbox_get_uar(flexio_outbox* outbox); flexio_status flexio_process_create(ibv_context* ibv_ctx, flexio_app* app, const flexio_process_attr* process_attr, flexio_process** process_ptr); flexio_status flexio_process_destroy(flexio_process* process); flexio_status flexio_process_error_handler_set(flexio_process* process, flexio_func_t* error_handler); ``` -------------------------------- ### Get FlexIO Process Debug Token Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Obtains the token required for user debug syscall access for a FlexIO process. This is relevant only for hostful applications. A zero value indicates that user debug access is not allowed. ```c FLEXIO_EXPERIMENTAL uint64_t flexio_process_udbg_token_get ( flexio_process* process ) ``` -------------------------------- ### Configure FlexIO Library Version Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Sets the required library version for FlexIO. This must be called once and cannot exceed the current library version. ```c flexio_status flexio_version_set(uint64_t version); ``` -------------------------------- ### Get FlexIO Process Heap Memory Info Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Retrieves the base address and available size of the FlexIO process heap memory. It takes a pointer to the FlexIO process context and a pointer to a flexio_heap_mem_info struct to be filled with the memory information. ```c flexio_status flexio_process_heap_mem_info_get ( flexio_process* process, flexio_heap_mem_info* info ) ``` -------------------------------- ### Create FlexIO DPA Tracer Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Creates a DPA tracer for a FlexIO process. This function finalizes the tracer creation process with the currently set parameters. No further parameter modifications are allowed after calling this function. Use flexio_dtrace_destroy() to clean up the tracer. ```c flexio_status flexio_dtrace_create ( flexio_process* process ) Create a DPA tracer for FlexIO process. ``` -------------------------------- ### Get FlexIO RQ TIR Object Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Retrieves the Transport Trigger (TIR) object associated with a FlexIO Receive Queue (RQ). This function is relevant for hostful applications only and returns a pointer to the TIR object or NULL on error. It requires a pointer to the RQ context. ```c FLEXIO_EXPERIMENTAL mlx5dv_devx_obj* flexio_rq_get_tir ( flexio_rq* rq ) ``` -------------------------------- ### FlexIO SDK Host Resource Management Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Overview of the primary structures and types used for managing DPA resources via the FlexIO SDK host interface. ```APIDOC ## FlexIO SDK Host Resource Management ### Description The FlexIO SDK host module provides the interface for DPA resource management, including process attributes, memory allocation, and queue configuration. ### Key Structures - **flexio_process_attr** - Attributes for defining a DPA process. - **flexio_cmdq_attr** - Configuration attributes for command queues. - **flexio_cq_attr** - Configuration attributes for completion queues. - **flexio_mem** - Structure representing memory resources for DPA. ### Key Defines - **FLEXIO_EXPERIMENTAL** - Macro to mark symbols as experimental. - **FLEXIO_MAX_NAME_LEN** - Maximum length for FlexIO resource names (256). ### Key Enumerations - **flexio_status** - Status codes returned by FlexIO operations. - **flexio_memtype** - Memory type definitions for DPA operations. - **flexio_qp_state** - Queue pair state definitions. ### Usage Example ```c // Example of initializing process attributes struct flexio_process_attr proc_attr; memset(&proc_attr, 0, sizeof(proc_attr)); // Configure process attributes here... ``` ``` -------------------------------- ### Get FlexIO Registered Function Info Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Obtains information for a previously registered FlexIO function. This function is intended for composing higher-level libraries and is not for direct user use. Callers must ensure string pointers are adequately allocated (at least FLEXIO_MAX_NAME_LEN + 1) to prevent copy failures. Relevant for hostful applications only. ```c flexio_status flexio_func_get_register_info ( flexio_app* app, flexio_func_t* dev_func_host_key, uint32_t* pup, char* dev_func_name, char* dev_unpack_func_name, size_t func_name_size, size_t* argbuf_size, flexio_func_arg_pack_fn_t** host_pack_func, flexio_uintptr_t* dev_func_addr, flexio_uintptr_t* dev_unpack_func_addr ) ``` -------------------------------- ### Define FUSE Initialization Structures Source: https://docs.nvidia.com/doca/api/3-3-0/doca-libraries-api/annotated.html These structures define the input and output parameters used during the FUSE filesystem initialization handshake, including versioning and feature flags. ```c struct fuse_init_in { uint32_t major; uint32_t minor; uint32_t max_readahead; uint32_t flags; uint32_t flags2; uint32_t unused[11]; }; struct fuse_init_out { uint32_t major; uint32_t minor; uint32_t max_readahead; uint32_t flags; uint16_t max_background; uint16_t congestion_threshold; uint32_t max_write; uint32_t time_gran; uint16_t max_pages; uint16_t map_alignment; uint32_t flags2; uint32_t max_stack_depth; uint16_t request_timeout; uint16_t unused[11]; }; ``` -------------------------------- ### FlexIO Queue and Transport Configuration Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Configuration constants for Queue Pairs (QP), Work Queues (WQ), and messaging transport modes. ```APIDOC ## Queue and Transport Configuration ### Description Defines the states and transport modes for Queue Pairs and Work Queues within the FlexIO architecture. ### QP States (flexio_qp_state) - **FLEXIO_QP_STATE_RST** (0x0) - Reset state. - **FLEXIO_QP_STATE_INIT** (0x1) - Initialized state. - **FLEXIO_QP_STATE_RTR** (0x2) - Ready to receive. - **FLEXIO_QP_STATE_RTS** (0x3) - Ready to send. - **FLEXIO_QP_STATE_ERR** (0x6) - Error state. ### Transport Types (flexio_qp_transport_type) - **FLEXIO_QPC_ST_RC** (0x0) - Reliable Connected. - **FLEXIO_QPC_ST_UC** (0x1) - Unreliable Connected. - **FLEXIO_QPC_ST_UD** (0x2) - Unreliable Datagram. - **FLEXIO_QPC_ST_XRC** (0x3) - Extended Reliable Connected. ``` -------------------------------- ### FlexIO Queue and Transport Enumerations Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Definitions for Queue Pair (QP) states, transport types, and MTU values used in FlexIO communication. ```c enum flexio_qp_state { FLEXIO_QP_STATE_RST = 0x0, FLEXIO_QP_STATE_INIT = 0x1, FLEXIO_QP_STATE_RTR = 0x2, FLEXIO_QP_STATE_RTS = 0x3, FLEXIO_QP_STATE_ERR = 0x6 }; enum flexio_qp_transport_type { FLEXIO_QPC_ST_RC = 0x0, FLEXIO_QPC_ST_UC = 0x1, FLEXIO_QPC_ST_UD = 0x2, FLEXIO_QPC_ST_XRC = 0x3 }; ``` -------------------------------- ### Manage FlexIO Outboxes Source: https://docs.nvidia.com/doca/api/3-3-0/flexio-sdk-api/modules.html Functions for creating, destroying, and querying attributes of FlexIO outbox objects. ```c flexio_status flexio_outbox_create(flexio_process* process, flexio_outbox_attr* fattr, flexio_outbox** outbox); flexio_status flexio_outbox_destroy(flexio_outbox* outbox); uint32_t flexio_outbox_get_id(flexio_outbox* outbox); flexio_uar* flexio_outbox_get_uar(flexio_outbox* outbox); ```