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

Macros | |
| #define | DOCA_DEVEMU_PCI_TYPE_NAME_LEN 32 |
| Maximal length for the NULL terminated string that describe the name of the emulated PCI device type. More... | |
Enumerations | |
| enum | doca_devemu_pci_bar_mem_type { DOCA_DEVEMU_PCI_BAR_MEM_TYPE_32_BIT = 0 , DOCA_DEVEMU_PCI_BAR_MEM_TYPE_1_MB , DOCA_DEVEMU_PCI_BAR_MEM_TYPE_64_BIT } |
| According to the PCI specification a BAR that is mapped into Memory Space can define memory types. More... | |
Functions | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_get_max_types (const struct doca_devinfo *devinfo, uint16_t *max_pci_types) |
| Get the maximum number of PCI types that can be created by the device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_get_log_min_bar_size (const struct doca_devinfo *devinfo, uint8_t *log_bar_size) |
| Get the minimal BAR size (in Log base 2) that can be configured for any PCI type that was created using doca_devemu_pci_type_create(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_get_log_max_bar_size (const struct doca_devinfo *devinfo, uint8_t *log_bar_size) |
| Get the maximum BAR size (in Log base 2) that can be configured for any PCI type that was created using doca_devemu_pci_type_create(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_get_max_num_msix (const struct doca_devinfo *devinfo, uint16_t *num_msix) |
| Get the maximal number of MSIXs that can be configured for any PCI type that was created using doca_devemu_pci_type_create() and for any PCI device that is associated with a PCI type that was created using doca_devemu_pci_type_create(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_get_max_num_db (const struct doca_devinfo *devinfo, uint16_t *num_db) |
| Get the maximal number of doorbells that can be configured for any PCI type that was created using doca_devemu_pci_type_create() and for any PCI device that is associated with a PCI type that was created using doca_devemu_pci_type_create(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_get_log_min_db_size (const struct doca_devinfo *devinfo, uint8_t *log_db_size) |
| Get the minimal doorbell size (in Log base 2) that can be configured for any PCI type that was created using doca_devemu_pci_type_create(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_get_log_max_db_size (const struct doca_devinfo *devinfo, uint8_t *log_db_size) |
| Get the maximum doorbell size (in Log base 2) that can be configured for any PCI type that was created using doca_devemu_pci_type_create(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_get_log_min_db_stride_size (const struct doca_devinfo *devinfo, uint8_t *log_stride_size) |
| Get the minimal stride size (in Log base 2) of a single doorbell that can be configured for any PCI type that was created using doca_devemu_pci_type_create(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_get_log_max_db_stride_size (const struct doca_devinfo *devinfo, uint8_t *log_stride_size) |
| Get the maximal stride size (in Log base 2) of a single doorbell that can be configured for any PCI type that was created using doca_devemu_pci_type_create(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_get_max_bars (const struct doca_devinfo *devinfo, uint8_t *max_bars) |
| Get the maximum number of BARs that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_get_max_bar_regions (const struct doca_devinfo *devinfo, uint32_t *max_bar_regions) |
| Get the maximum number of BAR regions that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create(), per BAR. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_get_max_bar_regions (const struct doca_devinfo *devinfo, uint32_t *max_bar_regions) |
| Get the maximum number of BAR regions that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_db_region_is_identify_by_offset_supported (const struct doca_devinfo *devinfo, uint8_t *supported) |
| Check if the device supports configuring doorbell regions that can identify doorbells by their offset in the BAR. If supported, one can configure a doorbell region using doca_devemu_pci_type_set_bar_db_region_by_offset_conf(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_db_region_is_identify_by_data_supported (const struct doca_devinfo *devinfo, uint8_t *supported) |
| Check if the device supports configuring doorbell regions that can identify doorbells by their data. If supported, one can configure a doorbell region using doca_devemu_pci_type_set_bar_db_region_by_data_conf(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_db_region_get_region_block_size (const struct doca_devinfo *devinfo, uint32_t *block_size) |
| Get the region block size of a doorbell BAR region that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The region block size is the smallest allocation data unit for a BAR region. For example, if the region block size is 64B then the bar region size can be 64B/128B/192B/../N*64B (N = max num region blocks per doorbell BAR region). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_db_region_get_max_num_region_blocks (const struct doca_devinfo *devinfo, uint32_t *max_blocks) |
| Get the maximum number of region blocks of a single doorbell BAR region that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The maximal number of region blocks together with the region block size defines the maximal size of a single doorbell region. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_get_max_bar_db_regions (const struct doca_devinfo *devinfo, uint32_t *max_regions) |
| Get the maximum amount of doorbell BAR regions that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_get_max_bar_db_regions (const struct doca_devinfo *devinfo, uint32_t *max_regions) |
| Get the maximum number of BAR doorbell regions that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create(), per BAR. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_db_region_get_start_addr_alignment (const struct doca_devinfo *devinfo, uint32_t *alignment) |
| Get the doorbell BAR region start address alignment that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_stateful_region_get_region_block_size (const struct doca_devinfo *devinfo, uint32_t *block_size) |
| Get the region block size of a stateful BAR region that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The region block size is the smallest allocation data unit for a BAR region. For example, if the region block size is 64B then the bar region size can be 64B/128B/192B/../N*64B (N = max num region blocks per stateful BAR region). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_stateful_region_get_max_num_region_blocks (const struct doca_devinfo *devinfo, uint32_t *max_blocks) |
| Get the maximum number of region blocks of a single stateful BAR region that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The maximal number of region blocks together with the region block size defines the maximal size of a single stateful region. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_get_max_bar_stateful_regions (const struct doca_devinfo *devinfo, uint32_t *max_regions) |
| Get the maximum amount of stateful BAR regions that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_get_max_bar_stateful_regions (const struct doca_devinfo *devinfo, uint32_t *max_regions) |
| Get the maximum number of BAR stateful regions that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create(), per BAR. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_stateful_region_get_start_addr_alignment (const struct doca_devinfo *devinfo, uint32_t *alignment) |
| Get the stateful BAR region start address alignment that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_msix_table_region_get_region_block_size (const struct doca_devinfo *devinfo, uint32_t *block_size) |
| Get the region block size of a MSI-X table BAR region that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The region block size is the smallest allocation data unit for a BAR region. For example, if the region block size is 64B then the bar region size can be 64B/128B/192B/../N*64B (N = max num region blocks per MSI-X table BAR region). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_msix_table_region_get_max_num_region_blocks (const struct doca_devinfo *devinfo, uint32_t *max_blocks) |
| Get the maximum number of region blocks of a single MSI-X table BAR region that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The maximal number of region blocks together with the region block size defines the maximal size of a single MSI-X table region. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_get_max_bar_msix_table_regions (const struct doca_devinfo *devinfo, uint32_t *max_regions) |
| Get the maximum amount of MSI-X table BAR regions that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_get_max_bar_msix_table_regions (const struct doca_devinfo *devinfo, uint32_t *max_regions) |
| Get the maximum number of BAR MSI-X table regions that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create(), per BAR. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_msix_table_region_get_start_addr_alignment (const struct doca_devinfo *devinfo, uint32_t *alignment) |
| Get the MSI-X table BAR region start address alignment that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_msix_pba_region_get_region_block_size (const struct doca_devinfo *devinfo, uint32_t *block_size) |
| Get the region block size of a MSI-X PBA BAR region that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The region block size is the smallest allocation data unit for a BAR region. For example, if the region block size is 64B then the bar region size can be 64B/128B/192B/../N*64B (N = max num region blocks per MSI-X PBA BAR region). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_msix_pba_region_get_max_num_region_blocks (const struct doca_devinfo *devinfo, uint32_t *max_blocks) |
| Get the maximum number of region blocks of a single MSI-X PBA BAR region that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The maximal number of region blocks together with the region block size defines the maximal size of a single MSI-X PBA region. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_get_max_bar_msix_pba_regions (const struct doca_devinfo *devinfo, uint32_t *max_regions) |
| Get the maximum amount of MSI-X PBA BAR regions that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_get_max_bar_msix_pba_regions (const struct doca_devinfo *devinfo, uint32_t *max_regions) |
| Get the maximum number of BAR MSI-X PBA regions that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create(), per BAR. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_bar_msix_pba_region_get_start_addr_alignment (const struct doca_devinfo *devinfo, uint32_t *alignment) |
| Get the MSI-X PBA BAR region start address alignment that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_is_bar_mem_type_supported (const struct doca_devinfo *devinfo, enum doca_devemu_pci_bar_mem_type memory_type, uint8_t *supported) |
| Get the memory BAR types capability of the device. If supported, A BAR with that memory type can be configured using doca_devemu_pci_type_set_memory_bar_conf(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_create (const char *name, struct doca_devemu_pci_type **pci_type) |
| Create a stopped DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_destroy (struct doca_devemu_pci_type *pci_type) |
| Destroy a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_start (struct doca_devemu_pci_type *pci_type) |
| Start a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_stop (struct doca_devemu_pci_type *pci_type) |
| Stop a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_is_started (const struct doca_devemu_pci_type *pci_type, uint8_t *started) |
| Check whether the DOCA devemu PCI tpye is started. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_create_rep_list (struct doca_devemu_pci_type *pci_type, struct doca_devinfo_rep ***dev_list_rep, uint32_t *nb_devs_rep) |
| Create list of available representor devices for a given DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_get_dev (const struct doca_devemu_pci_type *pci_type, struct doca_dev **dev) |
| Get the DOCA device associated with the DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_dev (struct doca_devemu_pci_type *pci_type, struct doca_dev *dev) |
| Set the DOCA device for a specific DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_is_hotplug_supported (const struct doca_devinfo *devinfo, const struct doca_devemu_pci_type *pci_type, uint8_t *supported) |
| Get the hotplug capability of the device for a given DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_cap_type_is_mgmt_supported (const struct doca_devinfo *devinfo, const struct doca_devemu_pci_type *pci_type, uint8_t *supported) |
| Get the management capability of the device for a given DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_create_rep (const struct doca_devemu_pci_type *pci_type, struct doca_dev_rep **dev_rep) |
| Create a new representor device for a given DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_dev_destroy_rep (struct doca_dev_rep *rep_dev) |
| Destroy a representor device created by doca_devemu_pci_dev_create_rep(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_get_name (const struct doca_devemu_pci_type *pci_type, char(*name)[DOCA_DEVEMU_PCI_TYPE_NAME_LEN]) |
| Get the name of a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_get_device_id (const struct doca_devemu_pci_type *pci_type, uint16_t *device_id) |
| Get the PCI Device ID of a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_device_id (struct doca_devemu_pci_type *pci_type, uint16_t device_id) |
| Set the PCI Device ID of a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_get_vendor_id (const struct doca_devemu_pci_type *pci_type, uint16_t *vendor_id) |
| Get the PCI Vendor ID of a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_vendor_id (struct doca_devemu_pci_type *pci_type, uint16_t vendor_id) |
| Set the PCI Vendor ID of a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_get_subsystem_id (const struct doca_devemu_pci_type *pci_type, uint16_t *subsystem_id) |
| Get the PCI Subsystem ID of a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_subsystem_id (struct doca_devemu_pci_type *pci_type, uint16_t subsystem_id) |
| Set the PCI Subsystem ID of a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_get_subsystem_vendor_id (const struct doca_devemu_pci_type *pci_type, uint16_t *subsystem_vid) |
| Get the PCI Subsystem Vendor ID of a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_subsystem_vendor_id (struct doca_devemu_pci_type *pci_type, uint16_t subsystem_vid) |
| Set the PCI Subsystem Vendor ID of a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_get_revision_id (const struct doca_devemu_pci_type *pci_type, uint8_t *revision_id) |
| Get the PCI Revision ID of a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_revision_id (struct doca_devemu_pci_type *pci_type, uint8_t revision_id) |
| Set the PCI Revision ID of a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_get_class_code (const struct doca_devemu_pci_type *pci_type, uint32_t *class_code) |
| Get the PCI Class Code of a DOCA devemu PCI type to identify generic operation. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_class_code (struct doca_devemu_pci_type *pci_type, uint32_t class_code) |
| Set the PCI Class Code of a DOCA devemu PCI type to identify generic operation. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_get_num_msix (const struct doca_devemu_pci_type *pci_type, uint16_t *num_msix) |
| Get the size of the MSI-X Table from MSI-X Capability Registers (1 based) of a DOCA devemu PCI type. This value will be used as the default num_msix value for associated DOCA devemu pci devices, unless configured otherwise. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_num_msix (struct doca_devemu_pci_type *pci_type, uint16_t num_msix) |
| Set the size of the MSI-X Table from MSI-X Capability Registers (1 based) of a DOCA devemu PCI type. Must conform with doca_devemu_pci_cap_type_get_max_num_msix(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_get_num_db (const struct doca_devemu_pci_type *pci_type, uint16_t *num_db) |
| Get the number of doorbells assigned to a pci type. This value will be used as the default num_db value for associated DOCA devemu pci devices, unless configured otherwise. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_num_db (struct doca_devemu_pci_type *pci_type, uint16_t num_db) |
| Set the number of doorbells of a PCI type. Must conform with doca_devemu_pci_cap_type_get_max_num_db(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_memory_bar_conf (struct doca_devemu_pci_type *pci_type, uint8_t id, uint8_t log_sz, enum doca_devemu_pci_bar_mem_type memory_type, uint8_t prefetchable) |
| Set a memory BAR layout configuration for DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_io_bar_conf (struct doca_devemu_pci_type *pci_type, uint8_t id, uint8_t log_sz) |
| Set an IO BAR layout configuration for DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_bar_db_region_by_offset_conf (struct doca_devemu_pci_type *pci_type, uint8_t id, uint64_t start_addr, uint64_t size, uint8_t log_db_size, uint8_t log_stride_size) |
| Set a doorbell BAR region configuration for a BAR layout in a DOCA devemu PCI type. The doorbells that will be associated with this doorbell BAR region will be identified according to their offset within the BAR. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_bar_db_region_by_data_conf (struct doca_devemu_pci_type *pci_type, uint8_t id, uint64_t start_addr, uint64_t size, uint8_t log_db_size, uint16_t db_id_msbyte, uint16_t db_id_lsbyte) |
| Set a doorbell BAR region configuration for a BAR layout in a DOCA devemu PCI type. The doorbells that will be associated with this doorbell BAR region will be identified according to the data written to the doorbell. The doorbell identifier will be deduced from the written doorbell data by the db_id_lsbyte and db_id_msbyte settings. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_bar_msix_table_region_conf (struct doca_devemu_pci_type *pci_type, uint8_t id, uint64_t start_addr, uint64_t size) |
| Set a MSI-X table BAR region configuration for a BAR layout in a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_bar_msix_pba_region_conf (struct doca_devemu_pci_type *pci_type, uint8_t id, uint64_t start_addr, uint64_t size) |
| Set a MSI-X PBA BAR region configuration for a BAR layout in a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_set_bar_stateful_region_conf (struct doca_devemu_pci_type *pci_type, uint8_t id, uint64_t start_addr, uint64_t size) |
| Set a stateful BAR region configuration for a BAR layout in a DOCA devemu PCI type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devemu_pci_type_modify_bar_stateful_region_default_values (struct doca_devemu_pci_type *pci_type, uint8_t id, uint64_t start_addr, void *default_values, uint64_t size) |
| Modify default registers values for a configured stateful region in a DOCA devemu PCI type. More... | |
DOCA PCI type for emulated pci devices
| #define DOCA_DEVEMU_PCI_TYPE_NAME_LEN 32 |
Maximal length for the NULL terminated string that describe the name of the emulated PCI device type.
Definition at line 53 of file doca_devemu_pci_type.h.
According to the PCI specification a BAR that is mapped into Memory Space can define memory types.
Definition at line 664 of file doca_devemu_pci_type.h.
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_db_region_get_max_num_region_blocks | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_blocks | ||
| ) |
Get the maximum number of region blocks of a single doorbell BAR region that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The maximal number of region blocks together with the region block size defines the maximal size of a single doorbell region.
| [in] | devinfo | The device to query. |
| [out] | max_blocks | Maximal number of region blocks for a single doorbell BAR region that will be configured using doca_devemu_pci_type_bar_db_region_<*>_conf_set(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_db_region_get_region_block_size | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | block_size | ||
| ) |
Get the region block size of a doorbell BAR region that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The region block size is the smallest allocation data unit for a BAR region. For example, if the region block size is 64B then the bar region size can be 64B/128B/192B/../N*64B (N = max num region blocks per doorbell BAR region).
| [in] | devinfo | The device to query. |
| [out] | block_size | Region block size, in bytes, of a doorbell BAR region that will be configured using doca_devemu_pci_type_bar_db_region_<*>_conf_set(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_db_region_get_start_addr_alignment | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | alignment | ||
| ) |
Get the doorbell BAR region start address alignment that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it.
| [in] | devinfo | The device to query. |
| [out] | alignment | The start address alignment, in bytes, of doorbell BAR regions that can be configured using doca_devemu_pci_type_bar_db_region_<*>_conf_set(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_db_region_is_identify_by_data_supported | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | supported | ||
| ) |
Check if the device supports configuring doorbell regions that can identify doorbells by their data. If supported, one can configure a doorbell region using doca_devemu_pci_type_set_bar_db_region_by_data_conf().
| [in] | devinfo | The device to query. |
| [out] | supported | 1 if the doorbell region by data supported, 0 otherwise. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_db_region_is_identify_by_offset_supported | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | supported | ||
| ) |
Check if the device supports configuring doorbell regions that can identify doorbells by their offset in the BAR. If supported, one can configure a doorbell region using doca_devemu_pci_type_set_bar_db_region_by_offset_conf().
| [in] | devinfo | The device to query. |
| [out] | supported | 1 if the doorbell region by offset supported, 0 otherwise. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_get_max_bar_db_regions | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_regions | ||
| ) |
Get the maximum number of BAR doorbell regions that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create(), per BAR.
| [in] | devinfo | The device to query. |
| [out] | max_regions | Number of BAR doorbell regions that can be configured per BAR, for any pci type, using doca_devemu_pci_type_bar_db_region_<*>_conf_set(). |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_get_max_bar_msix_pba_regions | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_regions | ||
| ) |
Get the maximum number of BAR MSI-X PBA regions that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create(), per BAR.
| [in] | devinfo | The device to query. |
| [out] | max_regions | Number of BAR MSI-X PBA regions that can be configured per BAR, for any pci type, using doca_devemu_pci_type_set_bar_msix_pba_region_conf(). |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_get_max_bar_msix_table_regions | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_regions | ||
| ) |
Get the maximum number of BAR MSI-X table regions that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create(), per BAR.
| [in] | devinfo | The device to query. |
| [out] | max_regions | Number of BAR MSI-X table regions that can be configured per BAR, for any pci type, using doca_devemu_pci_type_set_bar_msix_table_region_conf(). |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_get_max_bar_regions | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_bar_regions | ||
| ) |
Get the maximum number of BAR regions that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create(), per BAR.
| [in] | devinfo | The device to query. |
| [out] | max_bar_regions | Number of BAR regions that can be configured per BAR, for any pci type, using doca_devemu_pci_type_bar_*_region_conf_set(). |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_get_max_bar_stateful_regions | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_regions | ||
| ) |
Get the maximum number of BAR stateful regions that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create(), per BAR.
| [in] | devinfo | The device to query. |
| [out] | max_regions | Number of BAR stateful regions that can be configured per BAR, for any pci type, using doca_devemu_pci_type_set_bar_stateful_region_conf(). |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_msix_pba_region_get_max_num_region_blocks | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_blocks | ||
| ) |
Get the maximum number of region blocks of a single MSI-X PBA BAR region that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The maximal number of region blocks together with the region block size defines the maximal size of a single MSI-X PBA region.
| [in] | devinfo | The device to query. |
| [out] | max_blocks | Maximal number of region blocks for a single MSI-X PBA BAR region that will be configured using doca_devemu_pci_type_set_bar_msix_pba_region_conf(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_msix_pba_region_get_region_block_size | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | block_size | ||
| ) |
Get the region block size of a MSI-X PBA BAR region that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The region block size is the smallest allocation data unit for a BAR region. For example, if the region block size is 64B then the bar region size can be 64B/128B/192B/../N*64B (N = max num region blocks per MSI-X PBA BAR region).
| [in] | devinfo | The device to query. |
| [out] | block_size | Region block size, in bytes, of a MSI-X PBA BAR region that will be configured using doca_devemu_pci_type_set_bar_msix_pba_region_conf(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_msix_pba_region_get_start_addr_alignment | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | alignment | ||
| ) |
Get the MSI-X PBA BAR region start address alignment that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it.
| [in] | devinfo | The device to query. |
| [out] | alignment | The start address alignment, in bytes, of MSI-X PBA BAR regions that can be configured using doca_devemu_pci_type_set_bar_msix_pba_region_conf(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_msix_table_region_get_max_num_region_blocks | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_blocks | ||
| ) |
Get the maximum number of region blocks of a single MSI-X table BAR region that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The maximal number of region blocks together with the region block size defines the maximal size of a single MSI-X table region.
| [in] | devinfo | The device to query. |
| [out] | max_blocks | Maximal number of region blocks for a single MSI-X table BAR region that will be configured using doca_devemu_pci_type_set_bar_msix_table_region_conf(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_msix_table_region_get_region_block_size | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | block_size | ||
| ) |
Get the region block size of a MSI-X table BAR region that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The region block size is the smallest allocation data unit for a BAR region. For example, if the region block size is 64B then the bar region size can be 64B/128B/192B/../N*64B (N = max num region blocks per MSI-X table BAR region).
| [in] | devinfo | The device to query. |
| [out] | block_size | Region block size, in bytes, of a MSI-X table BAR region that will be configured using doca_devemu_pci_type_set_bar_msix_table_region_conf(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_msix_table_region_get_start_addr_alignment | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | alignment | ||
| ) |
Get the MSI-X table BAR region start address alignment that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it.
| [in] | devinfo | The device to query. |
| [out] | alignment | The start address alignment, in bytes, of MSI-X table BAR regions that can be configured using doca_devemu_pci_type_set_bar_msix_table_region_conf(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_stateful_region_get_max_num_region_blocks | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_blocks | ||
| ) |
Get the maximum number of region blocks of a single stateful BAR region that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The maximal number of region blocks together with the region block size defines the maximal size of a single stateful region.
| [in] | devinfo | The device to query. |
| [out] | max_blocks | Maximal number of region blocks for a single stateful BAR region that will be configured using doca_devemu_pci_type_set_bar_stateful_region_conf(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_stateful_region_get_region_block_size | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | block_size | ||
| ) |
Get the region block size of a stateful BAR region that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it. The region block size is the smallest allocation data unit for a BAR region. For example, if the region block size is 64B then the bar region size can be 64B/128B/192B/../N*64B (N = max num region blocks per stateful BAR region).
| [in] | devinfo | The device to query. |
| [out] | block_size | Region block size, in bytes, of a stateful BAR region that will be configured using doca_devemu_pci_type_set_bar_stateful_region_conf(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_bar_stateful_region_get_start_addr_alignment | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | alignment | ||
| ) |
Get the stateful BAR region start address alignment that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it.
| [in] | devinfo | The device to query. |
| [out] | alignment | The start address alignment, in bytes, of stateful BAR regions that can be configured using doca_devemu_pci_type_set_bar_stateful_region_conf(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_get_max_types | ( | const struct doca_devinfo * | devinfo, |
| uint16_t * | max_pci_types | ||
| ) |
Get the maximum number of PCI types that can be created by the device.
| [in] | devinfo | The device to query. |
| [out] | max_pci_types | Number of PCI types that can be created using doca_devemu_pci_type_create(). |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_get_log_max_bar_size | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | log_bar_size | ||
| ) |
Get the maximum BAR size (in Log base 2) that can be configured for any PCI type that was created using doca_devemu_pci_type_create().
| [in] | devinfo | The device to query. |
| [out] | log_bar_size | The maximal BAR size, given in bytes, of single BAR in Log (base 2) units. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_get_log_max_db_size | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | log_db_size | ||
| ) |
Get the maximum doorbell size (in Log base 2) that can be configured for any PCI type that was created using doca_devemu_pci_type_create().
| [in] | devinfo | The device to query. |
| [out] | log_db_size | The maximal doorbell size, given in bytes, of single doorbell in Log (base 2) units. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_get_log_max_db_stride_size | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | log_stride_size | ||
| ) |
Get the maximal stride size (in Log base 2) of a single doorbell that can be configured for any PCI type that was created using doca_devemu_pci_type_create().
| [in] | devinfo | The device to query. |
| [out] | log_stride_size | The maximal single doorbell stride size, given in bytes, of single doorbell in Log (base 2) units. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_get_log_min_bar_size | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | log_bar_size | ||
| ) |
Get the minimal BAR size (in Log base 2) that can be configured for any PCI type that was created using doca_devemu_pci_type_create().
| [in] | devinfo | The device to query. |
| [out] | log_bar_size | The minimal BAR size, given in bytes, of single BAR in Log (base 2) units. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_get_log_min_db_size | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | log_db_size | ||
| ) |
Get the minimal doorbell size (in Log base 2) that can be configured for any PCI type that was created using doca_devemu_pci_type_create().
| [in] | devinfo | The device to query. |
| [out] | log_db_size | The minimal doorbell size, given in bytes, of single doorbell in Log (base 2) units. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_get_log_min_db_stride_size | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | log_stride_size | ||
| ) |
Get the minimal stride size (in Log base 2) of a single doorbell that can be configured for any PCI type that was created using doca_devemu_pci_type_create().
| [in] | devinfo | The device to query. |
| [out] | log_stride_size | The minimal single doorbell stride size, given in bytes, of single doorbell in Log (base 2) units. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_get_max_bar_db_regions | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_regions | ||
| ) |
Get the maximum amount of doorbell BAR regions that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it.
| [in] | devinfo | The device to query. |
| [out] | max_regions | Maximal number of doorbell BAR regions that can be configured using doca_devemu_pci_type_bar_db_region_<*>_conf_set(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_get_max_bar_msix_pba_regions | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_regions | ||
| ) |
Get the maximum amount of MSI-X PBA BAR regions that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it.
| [in] | devinfo | The device to query. |
| [out] | max_regions | Maximal number of MSI-X PBA BAR regions that can be configured using doca_devemu_pci_type_set_bar_msix_pba_region_conf(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_get_max_bar_msix_table_regions | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_regions | ||
| ) |
Get the maximum amount of MSI-X table BAR regions that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it.
| [in] | devinfo | The device to query. |
| [out] | max_regions | Maximal number of MSI-X table BAR regions that can be configured using doca_devemu_pci_type_set_bar_msix_table_region_conf(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_get_max_bar_regions | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_bar_regions | ||
| ) |
Get the maximum number of BAR regions that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create().
| [in] | devinfo | The device to query. |
| [out] | max_bar_regions | Number of BAR regions that can be configured, for any pci type, using doca_devemu_pci_type_bar_*_region_conf_set(). |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_get_max_bar_stateful_regions | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_regions | ||
| ) |
Get the maximum amount of stateful BAR regions that can be configured for any PCI type that was created using doca_devemu_pci_type_create() or will be created by it.
| [in] | devinfo | The device to query. |
| [out] | max_regions | Maximal number of stateful BAR regions that can be configured using doca_devemu_pci_type_set_bar_stateful_region_conf(), for any pci type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_get_max_bars | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | max_bars | ||
| ) |
Get the maximum number of BARs that can be configured to an emulated PCI device, for any PCI type that was created using doca_devemu_pci_type_create().
| [in] | devinfo | The device to query. |
| [out] | max_bars | Number of BARs that can be configured for any pci type using doca_devemu_pci_type_*_bar_conf_set(). |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_get_max_num_db | ( | const struct doca_devinfo * | devinfo, |
| uint16_t * | num_db | ||
| ) |
Get the maximal number of doorbells that can be configured for any PCI type that was created using doca_devemu_pci_type_create() and for any PCI device that is associated with a PCI type that was created using doca_devemu_pci_type_create().
| [in] | devinfo | The device to query. |
| [out] | num_db | The maximal number of doorbells. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_get_max_num_msix | ( | const struct doca_devinfo * | devinfo, |
| uint16_t * | num_msix | ||
| ) |
Get the maximal number of MSIXs that can be configured for any PCI type that was created using doca_devemu_pci_type_create() and for any PCI device that is associated with a PCI type that was created using doca_devemu_pci_type_create().
| [in] | devinfo | The device to query. |
| [out] | num_msix | The maximal number of MSIXs. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_is_bar_mem_type_supported | ( | const struct doca_devinfo * | devinfo, |
| enum doca_devemu_pci_bar_mem_type | memory_type, | ||
| uint8_t * | supported | ||
| ) |
Get the memory BAR types capability of the device. If supported, A BAR with that memory type can be configured using doca_devemu_pci_type_set_memory_bar_conf().
| [in] | devinfo | The device to query. |
| [in] | memory_type | The BAR memory type to query. |
| [out] | supported | 1 if the BAR memory type is supported by the device, 0 otherwise. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_is_hotplug_supported | ( | const struct doca_devinfo * | devinfo, |
| const struct doca_devemu_pci_type * | pci_type, | ||
| uint8_t * | supported | ||
| ) |
Get the hotplug capability of the device for a given DOCA devemu PCI type.
Get uint8_t value defining if the device can be used to hotplug devices for a specific PCI type. The hotplug capability of a device implies its management capability.
| [in] | devinfo | The device to query. |
| [in] | pci_type | The DOCA devemu PCI type to query. |
| [out] | supported | 1 if the hotplug capability is supported for this PCI type, 0 otherwise. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_cap_type_is_mgmt_supported | ( | const struct doca_devinfo * | devinfo, |
| const struct doca_devemu_pci_type * | pci_type, | ||
| uint8_t * | supported | ||
| ) |
Get the management capability of the device for a given DOCA devemu PCI type.
Get uint8_t value defining if the device can be used to manage devices for a specific PCI type. The management capability of a device doesn't imply its hotplug capability.
| [in] | devinfo | The device to query. |
| [in] | pci_type | The DOCA devemu PCI type to query. |
| [out] | supported | 1 if the management capability is supported for this PCI type, 0 otherwise. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_create_rep | ( | const struct doca_devemu_pci_type * | pci_type, |
| struct doca_dev_rep ** | dev_rep | ||
| ) |
Create a new representor device for a given DOCA devemu PCI type.
Upon success, the created representor device will not be visible to the host. The representor device will be discoverable using the discovery mechanism for representors and will function as a hotplug device, which can be confirmed using doca_devinfo_rep_get_is_hotplug(). Additionally upon success, the representor device's hotplug state will be DOCA_DEVEMU_PCI_HP_STATE_POWER_OFF. To verify the hotplug state of the representor device, use doca_devemu_pci_rep_get_hotplug_state().
| [in] | pci_type | The DOCA devemu PCI type. Must be started. |
| [out] | dev_rep | Initialized representor DOCA device instance on success. Valid on success only. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_dev_destroy_rep | ( | struct doca_dev_rep * | rep_dev | ) |
Destroy a representor device created by doca_devemu_pci_dev_create_rep().
Upon success, the destroyed representor device will not be visible to the host. The representor device will not be discoverable using the discovery mechanism for representors. The representor device should not be associated with any existing pci_dev. Additionally, the representor device's hotplug state should be DOCA_DEVEMU_PCI_HP_STATE_POWER_OFF. To verify the hotplug state of the representor device, use doca_devemu_pci_rep_get_hotplug_state().
| [in] | rep_dev | Previously initialized representor DOCA device instance. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_create | ( | const char * | name, |
| struct doca_devemu_pci_type ** | pci_type | ||
| ) |
Create a stopped DOCA devemu PCI type.
| [in] | name | The name to assign to the created DOCA devemu PCI type. The NULL terminated string must not exceed DOCA_DEVEMU_PCI_TYPE_NAME_LEN. |
| [out] | pci_type | The created and stopped DOCA devemu PCI type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_create_rep_list | ( | struct doca_devemu_pci_type * | pci_type, |
| struct doca_devinfo_rep *** | dev_list_rep, | ||
| uint32_t * | nb_devs_rep | ||
| ) |
Create list of available representor devices for a given DOCA devemu PCI type.
Returns all representors that are associated with the provided DOCA devemu PCI type. The provided DOCA devemu PCI type must be started. A representor can either represent an emulated PCI function that is currently attached to the host PCI subsystem or an emulated PCI function intended for hotplugging into the host PCI subsystem.
| [in] | pci_type | The DOCA devemu pci type. Must be started. |
| [out] | dev_list_rep | Pointer to array of pointers. Output can then be accessed as follows (*dev_list_rep)[idx]. |
| [out] | nb_devs_rep | Number of available representor devices. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_destroy | ( | struct doca_devemu_pci_type * | pci_type | ) |
Destroy a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to destroy. Must be stopped. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_get_class_code | ( | const struct doca_devemu_pci_type * | pci_type, |
| uint32_t * | class_code | ||
| ) |
Get the PCI Class Code of a DOCA devemu PCI type to identify generic operation.
| [in] | pci_type | The DOCA devemu PCI type 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_type_get_dev | ( | const struct doca_devemu_pci_type * | pci_type, |
| struct doca_dev ** | dev | ||
| ) |
Get the DOCA device associated with the DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to query. |
| [out] | dev | The associated DOCA device. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_get_device_id | ( | const struct doca_devemu_pci_type * | pci_type, |
| uint16_t * | device_id | ||
| ) |
Get the PCI Device ID of a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to query. |
| [out] | device_id | The PCI Device ID (DID) assigned by the vendor. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_get_name | ( | const struct doca_devemu_pci_type * | pci_type, |
| char(*) | name[DOCA_DEVEMU_PCI_TYPE_NAME_LEN] | ||
| ) |
Get the name of a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to query. |
| [out] | name | The name of the PCI type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_get_num_db | ( | const struct doca_devemu_pci_type * | pci_type, |
| uint16_t * | num_db | ||
| ) |
Get the number of doorbells assigned to a pci type. This value will be used as the default num_db value for associated DOCA devemu pci devices, unless configured otherwise.
| [in] | pci_type | The DOCA pci type to query. |
| [out] | num_db | The number of doorbells assigned to the pci_type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_get_num_msix | ( | const struct doca_devemu_pci_type * | pci_type, |
| uint16_t * | num_msix | ||
| ) |
Get the size of the MSI-X Table from MSI-X Capability Registers (1 based) of a DOCA devemu PCI type. This value will be used as the default num_msix value for associated DOCA devemu pci devices, unless configured otherwise.
| [in] | pci_type | The DOCA pci type to query. |
| [out] | num_msix | The size of the MSI-X Table from MSI-X Capability Registers (1 based). |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_get_revision_id | ( | const struct doca_devemu_pci_type * | pci_type, |
| uint8_t * | revision_id | ||
| ) |
Get the PCI Revision ID of a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to query. |
| [out] | revision_id | The PCI Revision ID assigned by the vendor. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_get_subsystem_id | ( | const struct doca_devemu_pci_type * | pci_type, |
| uint16_t * | subsystem_id | ||
| ) |
Get the PCI Subsystem ID of a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to query. |
| [out] | subsystem_id | The PCI Subsystem ID (SSID) assigned by the subsystem vendor. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_get_subsystem_vendor_id | ( | const struct doca_devemu_pci_type * | pci_type, |
| uint16_t * | subsystem_vid | ||
| ) |
Get the PCI Subsystem Vendor ID of a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to query. |
| [out] | subsystem_vid | The PCI Subsystem Vendor ID (SVID) allocated by the PCI-SIG. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_get_vendor_id | ( | const struct doca_devemu_pci_type * | pci_type, |
| uint16_t * | vendor_id | ||
| ) |
Get the PCI Vendor ID of a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to query. |
| [out] | vendor_id | The PCI Vendor ID (VID) allocated by the PCI-SIG. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_is_started | ( | const struct doca_devemu_pci_type * | pci_type, |
| uint8_t * | started | ||
| ) |
Check whether the DOCA devemu PCI tpye is started.
| [in] | pci_type | The DOCA devemu PCI type to query. |
| [out] | started | 1 if the DOCA devemu PCI type is started, 0 otherwise. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_modify_bar_stateful_region_default_values | ( | struct doca_devemu_pci_type * | pci_type, |
| uint8_t | id, | ||
| uint64_t | start_addr, | ||
| void * | default_values, | ||
| uint64_t | size | ||
| ) |
Modify default registers values for a configured stateful region in a DOCA devemu PCI type.
This method will modify the default values for the entire stateful region registers area in a PCI type BAR (before the first modification, the initial default values of the stateful region registers are zeroed). The doca_dev_rep that will be created using doca_devemu_pci_dev_create_rep() from the associated pci_type will inherit these default values upon creation. Furthermore, each pci_dev that will be created from the associated doca_dev_rep will have a chance to update its own default values by calling doca_devemu_pci_dev_modify_bar_stateful_region_default_values() and not effecting the default values of the pci_type.
| [in] | pci_type | The DOCA devemu PCI type. Must be started and must not be associated to any pci_dev or doca_dev_rep. |
| [in] | id | The BAR id that contains the stateful region. This value must conform with the id provided during doca_devemu_pci_type_set_bar_stateful_region_conf(). |
| [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_type_set_bar_db_region_by_data_conf | ( | struct doca_devemu_pci_type * | pci_type, |
| uint8_t | id, | ||
| uint64_t | start_addr, | ||
| uint64_t | size, | ||
| uint8_t | log_db_size, | ||
| uint16_t | db_id_msbyte, | ||
| uint16_t | db_id_lsbyte | ||
| ) |
Set a doorbell BAR region configuration for a BAR layout in a DOCA devemu PCI type. The doorbells that will be associated with this doorbell BAR region will be identified according to the data written to the doorbell. The doorbell identifier will be deduced from the written doorbell data by the db_id_lsbyte and db_id_msbyte settings.
| [in] | pci_type | The DOCA devemu PCI type to modify. Must not be started. |
| [in] | id | The BAR id that will contain the new region. |
| [in] | start_addr | The start address of the region within the BAR. This value must conform with the start address alignment capability from doca_devemu_pci_cap_bar_db_region_get_start_addr_alignment(). |
| [in] | size | The size of the region in bytes. Must conform with doca_devemu_pci_cap_bar_db_region_get_region_block_size() and doca_devemu_pci_cap_bar_db_region_get_max_num_region_blocks(). |
| [in] | log_db_size | The size, given in bytes, of single doorbell in Log (base 2) units. This value must conform with doca_devemu_pci_cap_type_get_log_min_db_size() and doca_devemu_pci_cap_type_get_log_max_db_size(). |
| [in] | db_id_msbyte | The start byte of the doorbell identifier, within the doorbell data written by the driver. If the db_id_msbyte > db_id_lsbyte then the doorbell identifier will be treated as Little-Endian. |
| [in] | db_id_lsbyte | The end byte of the doorbell identifier, within the doorbell data written by the driver. If the db_id_msbyte > db_id_lsbyte then the doorbell identifier will be treated as Little-Endian. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_bar_db_region_by_offset_conf | ( | struct doca_devemu_pci_type * | pci_type, |
| uint8_t | id, | ||
| uint64_t | start_addr, | ||
| uint64_t | size, | ||
| uint8_t | log_db_size, | ||
| uint8_t | log_stride_size | ||
| ) |
Set a doorbell BAR region configuration for a BAR layout in a DOCA devemu PCI type. The doorbells that will be associated with this doorbell BAR region will be identified according to their offset within the BAR.
| [in] | pci_type | The DOCA devemu PCI type to modify. Must not be started. |
| [in] | id | The BAR id that will contain the new region. |
| [in] | start_addr | The start address of the region within the BAR. This value must conform with the start address alignment capability from doca_devemu_pci_cap_bar_db_region_get_start_addr_alignment(). |
| [in] | size | The size of the region in bytes. Must conform with doca_devemu_pci_cap_bar_db_region_get_region_block_size() and doca_devemu_pci_cap_bar_db_region_get_max_num_region_blocks(). |
| [in] | log_db_size | The size, given in bytes, of single doorbell in Log (base 2) units. This value must conform with doca_devemu_pci_cap_type_get_log_min_db_size() and doca_devemu_pci_cap_type_get_log_max_db_size(). |
| [in] | log_stride_size | The size, given in bytes, of a single doorbell stride in Log (base 2) units. Thie value must conform with doca_devemu_pci_cap_type_get_log_min_db_stride_size() and doca_devemu_pci_cap_type_get_log_max_db_stride_size(). |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_bar_msix_pba_region_conf | ( | struct doca_devemu_pci_type * | pci_type, |
| uint8_t | id, | ||
| uint64_t | start_addr, | ||
| uint64_t | size | ||
| ) |
Set a MSI-X PBA BAR region configuration for a BAR layout in a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to modify. Must not be started. |
| [in] | id | The BAR id that will contain the new region. |
| [in] | start_addr | The start address of the region within the BAR. This value must conform with the start address alignment capability from doca_devemu_pci_cap_bar_msix_pba_region_get_start_addr_alignment(). |
| [in] | size | The size of the region in bytes. Must correlate with the num_msix value of the pci type and conform with doca_devemu_pci_cap_bar_msix_pba_region_get_region_block_size() and doca_devemu_pci_cap_bar_msix_pba_region_get_max_num_region_blocks(). |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_bar_msix_table_region_conf | ( | struct doca_devemu_pci_type * | pci_type, |
| uint8_t | id, | ||
| uint64_t | start_addr, | ||
| uint64_t | size | ||
| ) |
Set a MSI-X table BAR region configuration for a BAR layout in a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to modify. Must not be started. |
| [in] | id | The BAR id that will contain the new region. |
| [in] | start_addr | The start address of the region within the BAR. This value must conform with the start address alignment capability from doca_devemu_pci_cap_bar_msix_table_region_get_start_addr_alignment(). |
| [in] | size | The size of the region in bytes. Must correlate with the num_msix value of the pci type and conform with doca_devemu_pci_cap_bar_msix_table_region_get_region_block_size() and doca_devemu_pci_cap_bar_msix_table_region_get_max_num_region_blocks(). |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_bar_stateful_region_conf | ( | struct doca_devemu_pci_type * | pci_type, |
| uint8_t | id, | ||
| uint64_t | start_addr, | ||
| uint64_t | size | ||
| ) |
Set a stateful BAR region configuration for a BAR layout in a DOCA devemu PCI type.
The stateful BAR region will be used by the device to expose registers to the driver. This region will be actively maintained by the device. PCI READ transactions for this region will be automatically answered by the device. PCI WRITE transactions will be stored to this region by the device. The associated pci_dev will be notified upon any PCI WRITE transaction to this region initiated by the device driver using the doca_devemu_pci_dev_event_bar_stateful_region_driver_write event, if this event was register.
| [in] | pci_type | The DOCA devemu PCI type to modify. Must not be started. |
| [in] | id | The BAR id that will contain the new region. |
| [in] | start_addr | The start address of the region within the BAR. This value must conform with the start address alignment capability from doca_devemu_pci_cap_bar_stateful_region_get_start_addr_alignment(). |
| [in] | size | The size of the region in bytes. Must conform with doca_devemu_pci_cap_bar_stateful_region_get_region_block_size() and doca_devemu_pci_cap_bar_stateful_region_get_max_num_region_blocks(). |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_class_code | ( | struct doca_devemu_pci_type * | pci_type, |
| uint32_t | class_code | ||
| ) |
Set the PCI Class Code of a DOCA devemu PCI type to identify generic operation.
| [in] | pci_type | The DOCA devemu PCI type to modify. Must not be started. |
| [in] | class_code | The PCI Class Code to identify generic operation. Only 24 LSBits are valid. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_dev | ( | struct doca_devemu_pci_type * | pci_type, |
| struct doca_dev * | dev | ||
| ) |
Set the DOCA device for a specific DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to modify. Must not be started. |
| [in] | dev | The DOCA device to associate. This must remain valid for the lifetime of the DOCA devemu PCI type, or until a different device is assigned to this PCI type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_device_id | ( | struct doca_devemu_pci_type * | pci_type, |
| uint16_t | device_id | ||
| ) |
Set the PCI Device ID of a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to modify. Must not be started. |
| [in] | device_id | The PCI Device ID (DID) to assign. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_io_bar_conf | ( | struct doca_devemu_pci_type * | pci_type, |
| uint8_t | id, | ||
| uint8_t | log_sz | ||
| ) |
Set an IO BAR layout configuration for DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to modify. Must not be started. |
| [in] | id | The BAR id. |
| [in] | log_sz | The BAR size, in Log (base 2) units. Must be set to 0 if previous BAR requires an extension (e.g. for 64-bit BARs). Otherwise, this value must conform with doca_devemu_pci_cap_type_get_log_min_bar_size() and doca_devemu_pci_cap_type_get_log_max_bar_size() capabilities. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_memory_bar_conf | ( | struct doca_devemu_pci_type * | pci_type, |
| uint8_t | id, | ||
| uint8_t | log_sz, | ||
| enum doca_devemu_pci_bar_mem_type | memory_type, | ||
| uint8_t | prefetchable | ||
| ) |
Set a memory BAR layout configuration for DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type. Must not be started. |
| [in] | id | The BAR id. |
| [in] | log_sz | The BAR size, in Log (base 2) units. Must be set to 0 if previous BAR requires an extension (e.g. for 64-bit BARs). Otherwise, this value must conform with doca_devemu_pci_cap_type_get_log_min_bar_size() and doca_devemu_pci_cap_type_get_log_max_bar_size() capabilities. |
| [in] | memory_type | Memory type value to expose for this BAR. |
| [in] | prefetchable | Prefetchable bit value to expose for this BAR. Set to 1 if the BAR does not contain locations with side effects on reads. Set to 0 if the BAR contains locations with read side effects or locations in which the function does not tolerate write merging. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_num_db | ( | struct doca_devemu_pci_type * | pci_type, |
| uint16_t | num_db | ||
| ) |
Set the number of doorbells of a PCI type. Must conform with doca_devemu_pci_cap_type_get_max_num_db().
| [in] | pci_type | The DOCA pci type to modify. Must not be started. |
| [in] | num_db | The number of doorbells to assign for the pci_type. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_num_msix | ( | struct doca_devemu_pci_type * | pci_type, |
| uint16_t | num_msix | ||
| ) |
Set the size of the MSI-X Table from MSI-X Capability Registers (1 based) of a DOCA devemu PCI type. Must conform with doca_devemu_pci_cap_type_get_max_num_msix().
| [in] | pci_type | The DOCA devemu PCI type to modify. Must not be started. |
| [in] | num_msix | The size of the MSI-X Table from MSI-X Capability Registers (1 based). |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_revision_id | ( | struct doca_devemu_pci_type * | pci_type, |
| uint8_t | revision_id | ||
| ) |
Set the PCI Revision ID of a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to modify. Must not be started. |
| [in] | revision_id | The PCI Revision ID to assign. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_subsystem_id | ( | struct doca_devemu_pci_type * | pci_type, |
| uint16_t | subsystem_id | ||
| ) |
Set the PCI Subsystem ID of a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to modify. Must not be started. |
| [in] | subsystem_id | The PCI Subsystem ID (SSID) to assign. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_subsystem_vendor_id | ( | struct doca_devemu_pci_type * | pci_type, |
| uint16_t | subsystem_vid | ||
| ) |
Set the PCI Subsystem Vendor ID of a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to modify. Must not be started. |
| [in] | subsystem_vid | The PCI Subsystem Vendor ID (SVID) allocated by the PCI-SIG. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_set_vendor_id | ( | struct doca_devemu_pci_type * | pci_type, |
| uint16_t | vendor_id | ||
| ) |
Set the PCI Vendor ID of a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to modify. Must not be started. |
| [in] | vendor_id | The PCI Vendor ID (VID) allocated by the PCI-SIG. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_start | ( | struct doca_devemu_pci_type * | pci_type | ) |
Start a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to start. |
| DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_stop | ( | struct doca_devemu_pci_type * | pci_type | ) |
Stop a DOCA devemu PCI type.
| [in] | pci_type | The DOCA devemu PCI type to stop. Must not be associated to any PCI device. |