| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |

Modules | |
| DOCA Device Emulation - PCI Device Types | |
Typedefs | |
| typedef uint64_t | doca_dpa_dev_devemu_pci_db_t |
| DPA handle for emulated PCI device doorbell. More... | |
| typedef uint64_t | doca_dpa_dev_devemu_pci_db_completion_t |
| DPA handle for emulated PCI device doorbell completion context. More... | |
| typedef uint64_t | doca_dpa_dev_devemu_pci_msix_t |
| DPA handle for emulated PCI device MSI-X. More... | |
| typedef void(* | doca_devemu_pci_dev_event_hotplug_state_change_handler_cb_t) (struct doca_devemu_pci_dev *pci_dev, union doca_data user_data) |
| Function to be executed on hotplug state change event occurrence. More... | |
| typedef void(* | doca_devemu_pci_dev_event_bar_stateful_region_driver_write_handler_cb_t) (struct doca_devemu_pci_dev_event_bar_stateful_region_driver_write *event, union doca_data user_data) |
| Function to be executed on PCI write transactions to BAR stateful region. More... | |
| typedef void(* | doca_devemu_pci_dev_event_flr_handler_cb_t) (struct doca_devemu_pci_dev *pci_dev, union doca_data user_data) |
| Function to be executed on PCI FLR (Function Level Reset). The event handler will enable users to quiesce, flush and reset the necessary resources associated with the emulated PCI device. Upon event, all PCI I/O transactions to/from the host memory are disabled. Additionally, the user should re-configure the emulated PCI device. This re-configuration requires flushing of all the outstanding resources associated with the emulated PCI device, which were initially owned by the PCI device and moved the the ownership of the user. The re-configuration also requires destruction of all the associated resources (e.g. DBs, MSIXs, MMAPs), resetting the associated emulated PCI device (perform stop() and start() operations) and re-creating all the needed resources. More... | |
Enumerations | |
| enum | doca_devemu_pci_hotplug_state { DOCA_DEVEMU_PCI_HP_STATE_POWER_OFF = 0 , DOCA_DEVEMU_PCI_HP_STATE_UNPLUG_IN_PROGRESS , DOCA_DEVEMU_PCI_HP_STATE_PLUG_IN_PROGRESS , DOCA_DEVEMU_PCI_HP_STATE_POWER_ON } |
| DOCA devemu pci hotplug state. More... | |
Functions | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_get_max_hotplug_devices (const struct doca_devinfo *devinfo, uint32_t *max_hotplug_devices) |
| Get the maximum number of PCI devices, across all PCI types, that can be hot-plugged by the device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_is_mmap_add_dev_supported (const struct doca_devinfo *devinfo, uint8_t *supported) |
| Check if adding the device to a DOCA mmap associated with a DOCA devemu PCI device is supported. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_create (struct doca_devemu_pci_type *pci_type, struct doca_dev_rep *dev_rep, struct doca_pe *progress_engine, struct doca_devemu_pci_dev **pci_dev) |
| Allocate DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_destroy (struct doca_devemu_pci_dev *pci_dev) |
| Free a DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_get_device_id (const struct doca_devemu_pci_dev *pci_dev, uint16_t *device_id) |
| Get the PCI Device ID configured to DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_set_device_id (struct doca_devemu_pci_dev *pci_dev, uint16_t device_id) |
| Set the PCI Device ID of a specific DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_get_vendor_id (const struct doca_devemu_pci_dev *pci_dev, uint16_t *vendor_id) |
| Get the PCI Vendor ID configured to DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_set_vendor_id (struct doca_devemu_pci_dev *pci_dev, uint16_t vendor_id) |
| Set the PCI Vendor ID of a specific DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_get_subsystem_id (const struct doca_devemu_pci_dev *pci_dev, uint16_t *subsystem_id) |
| Get the PCI Subsystem ID configured to DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_set_subsystem_id (struct doca_devemu_pci_dev *pci_dev, uint16_t subsystem_id) |
| Set the PCI Subsystem ID of a specific DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_get_subsystem_vendor_id (const struct doca_devemu_pci_dev *pci_dev, uint16_t *subsystem_vid) |
| Get the PCI Subsystem Vendor ID configured to DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_set_subsystem_vendor_id (struct doca_devemu_pci_dev *pci_dev, uint16_t subsystem_vid) |
| Set the PCI Subsystem Vendor ID of a specific DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_get_revision_id (const struct doca_devemu_pci_dev *pci_dev, uint8_t *revision_id) |
| Get the PCI Revision ID configured to DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_set_revision_id (struct doca_devemu_pci_dev *pci_dev, uint8_t revision_id) |
| Set the PCI Revision ID of a specific DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_get_class_code (const struct doca_devemu_pci_dev *pci_dev, uint32_t *class_code) |
| Get the PCI Class Code configured to DOCA devemu PCI device to identify generic operation. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_set_class_code (struct doca_devemu_pci_dev *pci_dev, uint32_t class_code) |
| Set the PCI Class Code of a specific DOCA devemu PCI device to identify generic operation. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_get_num_msix (const struct doca_devemu_pci_dev *pci_dev, uint16_t *num_msix) |
| Get the number of MSI-X vectors configured to DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_set_num_msix (struct doca_devemu_pci_dev *pci_dev, uint16_t num_msix) |
| Set the number of MSI-X vectors of a specific DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_modify_bar_stateful_region_default_values (struct doca_devemu_pci_dev *pci_dev, uint8_t id, uint64_t start_addr, void *default_values, uint64_t size) |
| Modify default registers values for stateful region in a DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_modify_bar_stateful_region_values (struct doca_devemu_pci_dev *pci_dev, uint8_t id, uint64_t offset, void *values, uint64_t size) |
| Modify registers values for stateful region in a DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_query_bar_stateful_region_values (struct doca_devemu_pci_dev *pci_dev, uint8_t id, uint64_t offset, void *out_values, uint64_t size) |
| Query registers values of the stateful region in a DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL struct doca_ctx * | doca_devemu_pci_dev_as_ctx (struct doca_devemu_pci_dev *pci_dev) |
| Convert DOCA devemu PCI device instance into DOCA context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_is_flr (const struct doca_devemu_pci_dev *pci_dev, uint8_t *flr) |
| Query wheather the DOCA devemu PCI device is having FLR (Function Level Reset). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_get_hotplug_state (struct doca_devemu_pci_dev *pci_dev, enum doca_devemu_pci_hotplug_state *state) |
| Get the hotplug state of the DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_rep_get_hotplug_state (struct doca_dev_rep *rep_dev, enum doca_devemu_pci_hotplug_state *state) |
| Get the hotplug state of a DOCA representor device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_hotplug (struct doca_devemu_pci_dev *pci_dev) |
| Issue hotplug procedure of the DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_hotunplug (struct doca_devemu_pci_dev *pci_dev) |
| Issue hot unplug procedure of the DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_event_hotplug_state_change_register (struct doca_devemu_pci_dev *pci_dev, doca_devemu_pci_dev_event_hotplug_state_change_handler_cb_t handler, union doca_data user_data) |
| Register to hotplug state changes. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_event_bar_stateful_region_driver_write_register (struct doca_devemu_pci_dev *pci_dev, doca_devemu_pci_dev_event_bar_stateful_region_driver_write_handler_cb_t handler, uint8_t bar_id, uint64_t bar_region_start_addr, union doca_data user_data) |
| Register to BAR stateful region driver write event. More... | |
| DOCA_EXPERIMENTAL struct doca_devemu_pci_dev * | doca_devemu_pci_dev_event_bar_stateful_region_driver_write_get_pci_dev (struct doca_devemu_pci_dev_event_bar_stateful_region_driver_write *event) |
| Get DOCA devemu PCI device from BAR stateful region driver write event. More... | |
| DOCA_EXPERIMENTAL uint8_t | doca_devemu_pci_dev_event_bar_stateful_region_driver_write_get_bar_id (struct doca_devemu_pci_dev_event_bar_stateful_region_driver_write *event) |
| Get the BAR id from BAR stateful region driver write event. More... | |
| DOCA_EXPERIMENTAL uint64_t | doca_devemu_pci_dev_event_bar_stateful_region_driver_write_get_bar_region_start_addr (struct doca_devemu_pci_dev_event_bar_stateful_region_driver_write *event) |
| Get the BAR region start address that is associated with BAR stateful region driver write event. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_event_flr_register (struct doca_devemu_pci_dev *pci_dev, doca_devemu_pci_dev_event_flr_handler_cb_t handler, union doca_data user_data) |
| Register to PCI FLR (Function Level Reset) event. More... | |
| 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 will be associated with a single dpa thread. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_db_completion_get_max_num_dbs (struct doca_devemu_pci_db_completion *db_comp, uint32_t *num_dbs) |
| Get the maximal number of doorbells that can be associated with the completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_db_completion_get_curr_num_dbs (struct doca_devemu_pci_db_completion *db_comp, uint32_t *num_dbs) |
| Get the current number of doorbells that are associated with the completion context. More... | |
| 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 single completion context that was also created on DPA. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_db_destroy (struct doca_devemu_pci_db *db) |
| Destroy the DOCA devemu PCI device doorbell. More... | |
| 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. More... | |
| 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 associated doorbell completion context. Therefore, in case the doorbell was created on DPA, one should bind the associated doorbell handle to its doorbell completion context before starting the doorbell. More... | |
| 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 associated doorbell completion context. Therefore, in case the doorbell was created on DPA, one should stop the doorbell before un-binding the associated doorbell handle from its doorbell completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_db_modify_value (struct doca_devemu_pci_db *db, uint32_t db_value) |
| Modify the current value of DOCA devemu PCI device doorbell. If the doorbell is started, this setting will behave as if the doorbell value was modified by the PCI device driver. If doorbell value will not be modified before starting the DOCA devemu PCI device doorbell, the device will keep the current value of the doorbell. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_db_query_value (struct doca_devemu_pci_db *db, uint32_t *db_value) |
| Query the current value of DOCA devemu PCI device doorbell. More... | |
| 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. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_msix_destroy (struct doca_devemu_pci_msix *msix) |
| Destroy the DOCA devemu PCI device MSI-X. More... | |
| 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. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_mmap_create (struct doca_devemu_pci_dev *pci_dev, struct doca_mmap **mmap) |
| Allocates zero size memory map object with default/unset attributes associated with a DOCA devemu PCI device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_get_available_resources (const struct doca_devinfo *devinfo, struct doca_devemu_pci_resources **pci_resources) |
| Retrieve available PCI resources for device usage. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_release_resources (struct doca_devemu_pci_resources *pci_resources) |
| Release the DOCA devemu PCI resources structure. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_resources_get_num_msix (const struct doca_devemu_pci_resources *pci_resources, uint32_t *num_msix) |
| Retrieve the number of MSI-X vectors from a PCI resources structure. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_resources_get_num_db (const struct doca_devemu_pci_resources *pci_resources, uint32_t *num_db) |
| Retrieve the number of Doorbells from a PCI resources structure. More... | |
DOCA library for emulated PCI devices
| typedef void(* doca_devemu_pci_dev_event_bar_stateful_region_driver_write_handler_cb_t) (struct doca_devemu_pci_dev_event_bar_stateful_region_driver_write *event, union doca_data user_data) |
Function to be executed on PCI write transactions to BAR stateful region.
| [in] | event | The BAR stateful region driver write event. |
| [in] | user_data | Same user data that was provided in doca_devemu_pci_dev_event_bar_stateful_region_driver_write_register(). |
Definition at line 718 of file doca_devemu_pci.h.
| typedef void(* doca_devemu_pci_dev_event_flr_handler_cb_t) (struct doca_devemu_pci_dev *pci_dev, union doca_data user_data) |
Function to be executed on PCI FLR (Function Level Reset). The event handler will enable users to quiesce, flush and reset the necessary resources associated with the emulated PCI device. Upon event, all PCI I/O transactions to/from the host memory are disabled. Additionally, the user should re-configure the emulated PCI device. This re-configuration requires flushing of all the outstanding resources associated with the emulated PCI device, which were initially owned by the PCI device and moved the the ownership of the user. The re-configuration also requires destruction of all the associated resources (e.g. DBs, MSIXs, MMAPs), resetting the associated emulated PCI device (perform stop() and start() operations) and re-creating all the needed resources.
| [in] | pci_dev | The DOCA devemu PCI device that is associated with the event. |
| [in] | user_data | Same user data that was provided in doca_devemu_pci_dev_event_flr_register(). |
Definition at line 810 of file doca_devemu_pci.h.
| typedef void(* doca_devemu_pci_dev_event_hotplug_state_change_handler_cb_t) (struct doca_devemu_pci_dev *pci_dev, union doca_data user_data) |
Function to be executed on hotplug state change event occurrence.
| [in] | pci_dev | The DOCA devemu PCI device that is associated with the event. |
| [in] | user_data | Same user data that was provided in doca_devemu_pci_dev_event_hotplug_state_change_register(). |
Definition at line 669 of file doca_devemu_pci.h.
| typedef uint64_t doca_dpa_dev_devemu_pci_db_completion_t |
DPA handle for emulated PCI device doorbell completion context.
Definition at line 69 of file doca_devemu_pci.h.
| typedef uint64_t doca_dpa_dev_devemu_pci_db_t |
DPA handle for emulated PCI device doorbell.
Definition at line 58 of file doca_devemu_pci.h.
| typedef uint64_t doca_dpa_dev_devemu_pci_msix_t |
DPA handle for emulated PCI device MSI-X.
Definition at line 80 of file doca_devemu_pci.h.
DOCA devemu pci hotplug state.
The steps for hotplug a device are:
The steps for hot unplug a device are:
Definition at line 566 of file doca_devemu_pci.h.
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_get_max_hotplug_devices | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_hotplug_devices | ||
| ) |
Get the maximum number of PCI devices, across all PCI types, that can be hot-plugged by the device.
| [in] | devinfo | The device to query. |
| [out] | max_hotplug_devices | Number of PCI devices that can be hot plugged by the device. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_is_mmap_add_dev_supported | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | supported | ||
| ) |
Check if adding the device to a DOCA mmap associated with a DOCA devemu PCI device is supported.
| [in] | devinfo | The device to query. |
| [out] | supported | 1 if adding the device to a DOCA devemu PCI device associated DOCA mmap is supported, 0 otherwise. |
| 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 will be associated with a single dpa thread.
| [in] | th | The DOCA dpa thread to be associated with the completion context. |
| [out] | db_comp | The newly created 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.
The associated dpa handle will be destroyed as well.
| [in] | db_comp | The DOCA devemu PCI device doorbell completion context to destroy. Must be stopped. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_completion_get_curr_num_dbs | ( | struct doca_devemu_pci_db_completion * | db_comp, |
| uint32_t * | num_dbs | ||
| ) |
Get the current number of doorbells that are associated with the completion context.
| [in] | db_comp | The DOCA devemu PCI device doorbell completion context to query. |
| [out] | num_dbs | The current number of doorbells that are associated with the context. |
| 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.
| [in] | db_comp | The DOCA devemu PCI device doorbell completion context previously created on DPA. |
| [out] | db_comp_handle | A pointer to the associated DPA handle in the dpa memory space. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_completion_get_max_num_dbs | ( | struct doca_devemu_pci_db_completion * | db_comp, |
| uint32_t * | num_dbs | ||
| ) |
Get the maximal number of doorbells that can be associated with the completion context.
| [in] | db_comp | The DOCA devemu PCI device doorbell completion context to query. |
| [out] | num_dbs | The maximal number of doorbells that can be associated with the context. |
| 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.
| [in] | db_comp | The DOCA devemu PCI device doorbell completion context to modify. Must be stopped. |
| [in] | num_dbs | The maximal number of doorbells that can be associated with the 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.
On start verifies and finalizes the completion context configuration.
The following is possible for started completion context:
The following is NOT possible while completion context is started:
| [in] | db_comp | The DOCA devemu PCI device doorbell completion context to start. |
| 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.
On stop prevents execution of different operations and allows operations that were available before start. For details, see doca_devemu_pci_db_completion_start(). Completion context can't be stopped while there are DOCA devemu PCI device doorbells associated with it.
The following is possible for stopped completion context:
The following is NOT possible while completion context is stopped:
| [in] | db_comp | The DOCA devemu PCI device doorbell completion context to stop. |
| 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 single completion context that was also created on DPA.
| [in] | pci_dev | The DOCA devemu PCI device to be associated with the doorbell. Must be started. |
| [in] | db_comp | The DOCA devemu PCI device doorbell completion context to be associated with the doorbell. Must be started. |
| [in] | bar_id | The identifier of the BAR that contains the associated doorbell region for the created doorbell. |
| [in] | bar_start_addr | The start address of the associated doorbell region within the BAR. This value must conform with the start address that was configured to the doorbell region during the configuration cycle of the PCI type that is associated with the given PCI device. |
| [in] | db_id | The doorbell identifier that will be used to map the doorbell to its handler. This value must be in the range of [0, num_db - 1] when num_db is the number of doorbells configured to the associated DOCA devemu PCI device. The default num_db value configured for any DOCA devemu PCI device created by doca_devemu_pci_dev_create(), if not configured otherwise, is equal to the value returned in doca_devemu_pci_cap_type_get_max_num_db(). |
| [in] | user_data_on_dpa | The user data that is associated with and can be retrieved by the DOCA devemu PCI device doorbell DPA handle. |
| [out] | db | The newly created DOCA devemu PCI device doorbell. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_destroy | ( | struct doca_devemu_pci_db * | db | ) |
Destroy the DOCA devemu PCI device doorbell.
If the doorbell was created on dpa, the associated dpa handle will be destroyed as well.
| [in] | db | The DOCA devemu PCI device doorbell to destroy. Must be stopped. |
| 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.
| [in] | db | The DOCA devemu PCI device doorbell previously created on DPA. |
| [out] | db_handle | A pointer to the associated DPA handle in the dpa memory space. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_modify_value | ( | struct doca_devemu_pci_db * | db, |
| uint32_t | db_value | ||
| ) |
Modify the current value of DOCA devemu PCI device doorbell. If the doorbell is started, this setting will behave as if the doorbell value was modified by the PCI device driver. If doorbell value will not be modified before starting the DOCA devemu PCI device doorbell, the device will keep the current value of the doorbell.
| [in] | db | The DOCA devemu PCI device doorbell to modify. |
| [in] | db_value | The new value of the DOCA devemu PCI device doorbell. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_db_query_value | ( | struct doca_devemu_pci_db * | db, |
| uint32_t * | db_value | ||
| ) |
Query the current value of DOCA devemu PCI device doorbell.
| [in] | db | The DOCA devemu PCI device doorbell to query. |
| [out] | db_value | The current value of the DOCA devemu PCI device doorbell. |
| 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 associated doorbell completion context. Therefore, in case the doorbell was created on DPA, one should bind the associated doorbell handle to its doorbell completion context before starting the doorbell.
| [in] | db | The DOCA devemu PCI device doorbell to start. |
| 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 associated doorbell completion context. Therefore, in case the doorbell was created on DPA, one should stop the doorbell before un-binding the associated doorbell handle from its doorbell completion context.
| [in] | db | The DOCA devemu PCI device doorbell to stop. |
| DOCA_EXPERIMENTAL struct doca_ctx* doca_devemu_pci_dev_as_ctx | ( | struct doca_devemu_pci_dev * | pci_dev | ) |
Convert DOCA devemu PCI device instance into DOCA context.
| [in] | pci_dev | DOCA devemu PCI device. The device must remain valid until after the returned DOCA context is no longer required. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_create | ( | struct doca_devemu_pci_type * | pci_type, |
| struct doca_dev_rep * | dev_rep, | ||
| struct doca_pe * | progress_engine, | ||
| struct doca_devemu_pci_dev ** | pci_dev | ||
| ) |
Allocate DOCA devemu PCI device.
| [in] | pci_type | The DOCA PCI type to be associated with the device. Must be started. |
| [in] | dev_rep | Representor DOCA device. |
| [in] | progress_engine | The progress engine that will be used to receive events and task completions. |
| [out] | pci_dev | The newly created DOCA devemu PCI device. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_destroy | ( | struct doca_devemu_pci_dev * | pci_dev | ) |
Free a DOCA devemu PCI device.
| [in] | pci_dev | The previously created DOCA devemu PCI device. Must be idle. |
| DOCA_EXPERIMENTAL uint8_t doca_devemu_pci_dev_event_bar_stateful_region_driver_write_get_bar_id | ( | struct doca_devemu_pci_dev_event_bar_stateful_region_driver_write * | event | ) |
Get the BAR id from BAR stateful region driver write event.
| [in] | event | The registered BAR stateful region driver write event. Must not be NULL. |
| DOCA_EXPERIMENTAL uint64_t doca_devemu_pci_dev_event_bar_stateful_region_driver_write_get_bar_region_start_addr | ( | struct doca_devemu_pci_dev_event_bar_stateful_region_driver_write * | event | ) |
Get the BAR region start address that is associated with BAR stateful region driver write event.
| [in] | event | The registered BAR stateful region driver write event. Must not be NULL. |
| DOCA_EXPERIMENTAL struct doca_devemu_pci_dev* doca_devemu_pci_dev_event_bar_stateful_region_driver_write_get_pci_dev | ( | struct doca_devemu_pci_dev_event_bar_stateful_region_driver_write * | event | ) |
Get DOCA devemu PCI device from BAR stateful region driver write event.
| [in] | event | The registered BAR stateful region driver write event. Must not be NULL. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_event_bar_stateful_region_driver_write_register | ( | struct doca_devemu_pci_dev * | pci_dev, |
| doca_devemu_pci_dev_event_bar_stateful_region_driver_write_handler_cb_t | handler, | ||
| uint8_t | bar_id, | ||
| uint64_t | bar_region_start_addr, | ||
| union doca_data | user_data | ||
| ) |
Register to BAR stateful region driver write event.
Registration can be done only while DOCA devemu PCI device is idle. If called multiple times, for the same {pci_dev, bar_id, bar_region_start_addr} tuple, then only the last call will take effect. The registration will be valid for the entire stateful region that was configured for the associated DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device to be associated with the event. Must be idle. |
| [in] | handler | Method that is invoked once event is triggered. |
| [in] | bar_id | The BAR id to be associated with the event. Must conform with the BAR stateful region configuration that was done using doca_devemu_pci_type_set_bar_stateful_region_conf(). |
| [in] | bar_region_start_addr | The start address of the BAR stateful region to be associated with the event. Must conform with the BAR stateful region configuration that was done using doca_devemu_pci_type_set_bar_stateful_region_conf(). |
| [in] | user_data | User data that will be provided to the handler once invoked. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_event_flr_register | ( | struct doca_devemu_pci_dev * | pci_dev, |
| doca_devemu_pci_dev_event_flr_handler_cb_t | handler, | ||
| union doca_data | user_data | ||
| ) |
Register to PCI FLR (Function Level Reset) event.
| [in] | pci_dev | The DOCA devemu PCI device to be associated with the event. Must be idle. |
| [in] | handler | Method that is invoked once event is triggered. |
| [in] | user_data | User data that will be provided to the handler once invoked. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_event_hotplug_state_change_register | ( | struct doca_devemu_pci_dev * | pci_dev, |
| doca_devemu_pci_dev_event_hotplug_state_change_handler_cb_t | handler, | ||
| union doca_data | user_data | ||
| ) |
Register to hotplug state changes.
Registration can be done only while DOCA devemu PCI device is idle. If called multiple times then only the last call will take effect.
| [in] | pci_dev | The DOCA devemu PCI device to be associated with the event. Must be idle. |
| [in] | handler | Method that is invoked once event is triggered. |
| [in] | user_data | User data that will be provided to the handler once invoked. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_get_class_code | ( | const struct doca_devemu_pci_dev * | pci_dev, |
| uint32_t * | class_code | ||
| ) |
Get the PCI Class Code configured to DOCA devemu PCI device to identify generic operation.
| [in] | pci_dev | The DOCA devemu PCI device instance to query. |
| [out] | class_code | The PCI Class Code to identify generic operation. Only 24 LSBits are valid. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_get_device_id | ( | const struct doca_devemu_pci_dev * | pci_dev, |
| uint16_t * | device_id | ||
| ) |
Get the PCI Device ID configured to DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device instance to query. |
| [out] | device_id | The PCI Device ID (DID) assigned by the vendor. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_get_hotplug_state | ( | struct doca_devemu_pci_dev * | pci_dev, |
| enum doca_devemu_pci_hotplug_state * | state | ||
| ) |
Get the hotplug state of the DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device. Must be started. |
| [out] | state | The hotplug state of the given DOCA devemu PCI device. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_get_num_msix | ( | const struct doca_devemu_pci_dev * | pci_dev, |
| uint16_t * | num_msix | ||
| ) |
Get the number of MSI-X vectors configured to DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device instance to query. |
| [out] | num_msix | The number of MSI-X vectors configured for the device. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_get_revision_id | ( | const struct doca_devemu_pci_dev * | pci_dev, |
| uint8_t * | revision_id | ||
| ) |
Get the PCI Revision ID configured to DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device instance to query. |
| [out] | revision_id | The PCI Revision ID assigned by the vendor. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_get_subsystem_id | ( | const struct doca_devemu_pci_dev * | pci_dev, |
| uint16_t * | subsystem_id | ||
| ) |
Get the PCI Subsystem ID configured to DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device instance to query. |
| [out] | subsystem_id | The PCI Subsystem ID (SSID) assigned by the subsystem vendor. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_get_subsystem_vendor_id | ( | const struct doca_devemu_pci_dev * | pci_dev, |
| uint16_t * | subsystem_vid | ||
| ) |
Get the PCI Subsystem Vendor ID configured to DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device instance to query. |
| [out] | subsystem_vid | The PCI Subsystem Vendor ID (SVID) assigned by the subsystem vendor. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_get_vendor_id | ( | const struct doca_devemu_pci_dev * | pci_dev, |
| uint16_t * | vendor_id | ||
| ) |
Get the PCI Vendor ID configured to DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device instance to query. |
| [out] | vendor_id | The PCI Vendor ID (VID) assigned by the vendor. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_hotplug | ( | struct doca_devemu_pci_dev * | pci_dev | ) |
Issue hotplug procedure of the DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device to hotplug. Must be started. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_hotunplug | ( | struct doca_devemu_pci_dev * | pci_dev | ) |
Issue hot unplug procedure of the DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device to hot unplug. Must be started. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_is_flr | ( | const struct doca_devemu_pci_dev * | pci_dev, |
| uint8_t * | flr | ||
| ) |
Query wheather the DOCA devemu PCI device is having FLR (Function Level Reset).
If true, all PCI I/O transactions to/from the host memory are disabled and the user should re-configure the emulated PCI device. This re-configuration requires destruction of all the associated resources (e.g. DBs, MSIXs, MMAPs), resetting the associated emulated PCI device (perform stop() and start() operations) and re-creating all the needed resources.
| [in] | pci_dev | The DOCA devemu PCI device to query. Must be started. |
| [out] | flr | 1 if the DOCA devemu PCI device is having FLR, 0 otherwise. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_modify_bar_stateful_region_default_values | ( | struct doca_devemu_pci_dev * | pci_dev, |
| uint8_t | id, | ||
| uint64_t | start_addr, | ||
| void * | default_values, | ||
| uint64_t | size | ||
| ) |
Modify default registers values for stateful region in a DOCA devemu PCI device.
This method will modify the default values for the entire stateful region registers area in a PCI device BAR (before the first modification, the initial default values of the stateful region registers are taken from the associated PCI type). These values will override the previous default values and will become valid during the next exposure/hotplug of the associated PCI device to the host or during the next FLR.
| [in] | pci_dev | The DOCA devemu PCI device. Must be started. |
| [in] | id | The BAR id that contains the stateful region. |
| [in] | start_addr | The start address of the region within the BAR. This value must conform with the start address provided during doca_devemu_pci_type_set_bar_stateful_region_conf(). |
| [in] | default_values | Input buffer that contain the default values data. |
| [in] | size | The size of the default_values buffer in bytes. The size must not be smaller than the actual size of the stateful bar region that was configured using doca_devemu_pci_type_set_bar_stateful_region_conf(). If size is bigger than the actual size, the first relevant bytes will be used according to the actual size. The rest of the buffer will be ignored. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_modify_bar_stateful_region_values | ( | struct doca_devemu_pci_dev * | pci_dev, |
| uint8_t | id, | ||
| uint64_t | offset, | ||
| void * | values, | ||
| uint64_t | size | ||
| ) |
Modify registers values for stateful region in a DOCA devemu PCI device.
This method will modify the values of the stateful region registers in a PCI device BAR. These values will override the existing values of the stateful region of the associated PCI device. Modifying registers by calling this method will not trigger the registered event handler of the doca_devemu_pci_dev_event_bar_stateful_region_driver_write event.
| [in] | pci_dev | The DOCA devemu PCI device. Must be started. |
| [in] | id | The BAR id that contains the stateful region. |
| [in] | offset | The offset of the registers region to modify within the BAR. Must be located within the stateful BAR region. |
| [in] | values | Input buffer that contain the values data. |
| [in] | size | The size of the values buffer in bytes. The (offset + size) must be located within the stateful BAR region. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_query_bar_stateful_region_values | ( | struct doca_devemu_pci_dev * | pci_dev, |
| uint8_t | id, | ||
| uint64_t | offset, | ||
| void * | out_values, | ||
| uint64_t | size | ||
| ) |
Query registers values of the stateful region in a DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device. Must be started. |
| [in] | id | The BAR id that contains the stateful region. |
| [in] | offset | The offset of the registers region to query within the BAR. Must be located within the stateful BAR region. |
| [out] | out_values | Output buffer that will contain the values data upon success. |
| [in] | size | The size of the out_values buffer in bytes. The (offset + size) must be located within the stateful BAR region. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_set_class_code | ( | struct doca_devemu_pci_dev * | pci_dev, |
| uint32_t | class_code | ||
| ) |
Set the PCI Class Code of a specific DOCA devemu PCI device to identify generic operation.
| [in] | pci_dev | The DOCA devemu PCI device instance to modify. Must be idle and not a static Physical Function (PF). |
| [in] | class_code | The PCI Class Code to identify generic operation. Only 24 LSBits are valid. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_set_device_id | ( | struct doca_devemu_pci_dev * | pci_dev, |
| uint16_t | device_id | ||
| ) |
Set the PCI Device ID of a specific DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device instance to modify. Must be idle and not a static Physical Function (PF). |
| [in] | device_id | The PCI Device ID (DID) to assign. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_set_num_msix | ( | struct doca_devemu_pci_dev * | pci_dev, |
| uint16_t | num_msix | ||
| ) |
Set the number of MSI-X vectors of a specific DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device instance to modify. Must be idle and not a static Physical Function (PF). |
| [in] | num_msix | The number of MSI-X vectors to be configured for the device. This value must conform with device capabilities. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_set_revision_id | ( | struct doca_devemu_pci_dev * | pci_dev, |
| uint8_t | revision_id | ||
| ) |
Set the PCI Revision ID of a specific DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device instance to modify. Must be idle and not a static Physical Function (PF). |
| [in] | revision_id | The PCI Revision ID to assign. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_set_subsystem_id | ( | struct doca_devemu_pci_dev * | pci_dev, |
| uint16_t | subsystem_id | ||
| ) |
Set the PCI Subsystem ID of a specific DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device instance to modify. Must be idle and not a static Physical Function (PF). |
| [in] | subsystem_id | The PCI Subsystem ID (SSID) to assign. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_set_subsystem_vendor_id | ( | struct doca_devemu_pci_dev * | pci_dev, |
| uint16_t | subsystem_vid | ||
| ) |
Set the PCI Subsystem Vendor ID of a specific DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device instance to modify. Must be idle and not a static Physical Function (PF). |
| [in] | subsystem_vid | The PCI Subsystem Vendor ID (SVID) to assign. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_set_vendor_id | ( | struct doca_devemu_pci_dev * | pci_dev, |
| uint16_t | vendor_id | ||
| ) |
Set the PCI Vendor ID of a specific DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device instance to modify. Must be idle and not a static Physical Function (PF). |
| [in] | vendor_id | The PCI Vendor ID (VID) to assign. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_get_available_resources | ( | const struct doca_devinfo * | devinfo, |
| struct doca_devemu_pci_resources ** | pci_resources | ||
| ) |
Retrieve available PCI resources for device usage.
The returned structure represents the PCI resources that can be utilized by all DOCA devemu PCI devices and PCI types associated with the specified device. These resources are global and shared across all supported devices. The distribution of the available resources should comply with the relevant capabilities.
| [in] | devinfo | The device to query. |
| [out] | pci_resources | The newly created DOCA devemu PCI resources structure. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_mmap_create | ( | struct doca_devemu_pci_dev * | pci_dev, |
| struct doca_mmap ** | mmap | ||
| ) |
Allocates zero size memory map object with default/unset attributes associated with a DOCA devemu PCI device.
The returned memory map object can be manipulated with common doca_mmap APIs.
The created memory map object will cover a memory range in the domain that hosts the DOCA devemu PCI device.
| [in] | pci_dev | The DOCA devemu PCI device to be associated with the doca_mmap. Must be started. |
| [out] | mmap | DOCA memory map structure with default/unset attributes. |
| 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.
| [in] | pci_dev | The DOCA devemu PCI device to be associated with the MSI-X. Must be started. |
| [in] | bar_id | The identifier of the BAR that contains the associated MSI-X table region for the created msix. This value must conform with the identifier that was configured to the MSI-X table region during the configuration cycle of the pci type that is associated with the given PCI device. |
| [in] | bar_start_addr | The start address of the associated MSI-X table region within the BAR. This value must conform with the start address that was configured to the MSI-X table region during the configuration cycle of the PCI type that is associated with the given PCI device. |
| [in] | msix_idx | The associated MSI-X table entry index. |
| [in] | user_data_on_dpa | The user data that is associated with and can be retrieved by the DOCA devemu PCI device MSI-X DPA handle. |
| [out] | msix | The newly created 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.
If the MSI-X was created on dpa, the associated dpa handle will be destroyed as well.
| [in] | msix | The DOCA devemu PCI device MSI-X context to destroy. |
| 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.
| [in] | msix | The DOCA devemu PCI device MSI-X previously created on DPA. |
| [out] | msix_handle | A pointer to the associated DPA handle in the dpa memory space. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_release_resources | ( | struct doca_devemu_pci_resources * | pci_resources | ) |
Release the DOCA devemu PCI resources structure.
| [in] | pci_resources | PCI resources structure to be released. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_rep_get_hotplug_state | ( | struct doca_dev_rep * | rep_dev, |
| enum doca_devemu_pci_hotplug_state * | state | ||
| ) |
Get the hotplug state of a DOCA representor device.
The specified representor device should be a hotplug device, which can be verified using doca_devinfo_rep_get_is_hotplug(). Upon success, the current hotplug state is returned.
| [in] | rep_dev | DOCA representor device instance. |
| [out] | state | The hotplug state of the given DOCA representor device. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_resources_get_num_db | ( | const struct doca_devemu_pci_resources * | pci_resources, |
| uint32_t * | num_db | ||
| ) |
Retrieve the number of Doorbells from a PCI resources structure.
| [in] | pci_resources | The DOCA devemu PCI resources instance to query. |
| [out] | num_db | The number of Doorbells associated with PCI resources structure. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_resources_get_num_msix | ( | const struct doca_devemu_pci_resources * | pci_resources, |
| uint32_t * | num_msix | ||
| ) |
Retrieve the number of MSI-X vectors from a PCI resources structure.
| [in] | pci_resources | The DOCA devemu PCI resources instance to query. |
| [out] | num_msix | The number of MSI-X vectors associated with PCI resources structure. |