25 #ifndef DOCA_DEVEMU_PCI_TYPE_H_
26 #define DOCA_DEVEMU_PCI_TYPE_H_
48 struct doca_devemu_pci_type;
53 #define DOCA_DEVEMU_PCI_TYPE_NAME_LEN 32
183 uint8_t *log_stride_size);
200 uint8_t *log_stride_size);
250 uint32_t *max_bar_regions);
305 uint32_t *block_size);
325 uint32_t *max_blocks);
377 uint32_t *alignment);
397 uint32_t *block_size);
417 uint32_t *max_blocks);
435 uint32_t *max_regions);
453 uint32_t *max_regions);
471 uint32_t *alignment);
491 uint32_t *block_size);
511 uint32_t *max_blocks);
529 uint32_t *max_regions);
547 uint32_t *max_regions);
565 uint32_t *alignment);
585 uint32_t *block_size);
605 uint32_t *max_blocks);
623 uint32_t *max_regions);
641 uint32_t *max_regions);
659 uint32_t *alignment);
802 struct doca_devinfo_rep ***dev_list_rep,
803 uint32_t *nb_devs_rep);
862 const struct doca_devemu_pci_type *pci_type,
887 const struct doca_devemu_pci_type *pci_type,
1070 uint16_t *subsystem_vid);
1088 uint16_t subsystem_vid);
1257 uint8_t prefetchable);
1308 uint64_t start_addr,
1310 uint8_t log_db_size,
1311 uint8_t log_stride_size);
1346 uint64_t start_addr,
1348 uint8_t log_db_size,
1349 uint16_t db_id_msbyte,
1350 uint16_t db_id_lsbyte);
1374 uint64_t start_addr,
1399 uint64_t start_addr,
1429 uint64_t start_addr,
1466 uint64_t start_addr,
1467 void *default_values,
#define DOCA_EXPERIMENTAL
To set a Symbol (or specifically a function) as experimental.
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 do...
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.
doca_devemu_pci_bar_mem_type
According to the PCI specification a BAR that is mapped into Memory Space can define memory types.
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.
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 devic...
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 create...
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_start(struct doca_devemu_pci_type *pci_type)
Start a DOCA devemu PCI type.
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.
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.
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.
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.
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...
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,...
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_stop(struct doca_devemu_pci_type *pci_type)
Stop a DOCA devemu PCI type.
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.
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,...
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.
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 w...
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,...
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().
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.
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....
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.
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....
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 crea...
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.
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.
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 an...
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 a...
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.
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....
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.
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....
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.
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 usi...
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_d...
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 val...
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,...
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 cr...
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.
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 c...
#define DOCA_DEVEMU_PCI_TYPE_NAME_LEN
Maximal length for the NULL terminated string that describe the name of the emulated PCI device 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 ...
DOCA_EXPERIMENTAL doca_error_t doca_devemu_pci_type_destroy(struct doca_devemu_pci_type *pci_type)
Destroy a DOCA devemu PCI type.
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.
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.
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 creat...
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.
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 an...
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 creat...
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.
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.
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...
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,...
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 usi...
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,...
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.
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,...
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.
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(...
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,...
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 t...
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 tha...
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...
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,...
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 create...
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....
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.
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.
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 ...
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 t...
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.
@ DOCA_DEVEMU_PCI_BAR_MEM_TYPE_1_MB
@ DOCA_DEVEMU_PCI_BAR_MEM_TYPE_32_BIT
@ DOCA_DEVEMU_PCI_BAR_MEM_TYPE_64_BIT
enum doca_error doca_error_t
DOCA API return codes.