NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_devemu_pci_type.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES, ALL RIGHTS RESERVED.
3  *
4  * This software product is a proprietary product of NVIDIA CORPORATION &
5  * AFFILIATES (the "Company") and all right, title, and interest in and to the
6  * software product, including all associated intellectual property rights, are
7  * and shall remain exclusively with the Company.
8  *
9  * This software product is governed by the End User License Agreement
10  * provided with the software product.
11  *
12  */
13 
25 #ifndef DOCA_DEVEMU_PCI_TYPE_H_
26 #define DOCA_DEVEMU_PCI_TYPE_H_
27 
28 #include <stdint.h>
29 #include <sys/uio.h>
30 
31 #include <doca_error.h>
32 #include <doca_dev.h>
33 #include <doca_ctx.h>
34 #include <doca_pe.h>
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /*********************************************************************************************************************
41  * DOCA devemu PCI type
42  *********************************************************************************************************************/
43 
48 struct doca_devemu_pci_type;
49 
53 #define DOCA_DEVEMU_PCI_TYPE_NAME_LEN 32
54 
68 doca_error_t doca_devemu_pci_cap_get_max_types(const struct doca_devinfo *devinfo, uint16_t *max_pci_types);
69 
84 doca_error_t doca_devemu_pci_cap_type_get_log_min_bar_size(const struct doca_devinfo *devinfo, uint8_t *log_bar_size);
85 
100 doca_error_t doca_devemu_pci_cap_type_get_log_max_bar_size(const struct doca_devinfo *devinfo, uint8_t *log_bar_size);
101 
117 doca_error_t doca_devemu_pci_cap_type_get_max_num_msix(const struct doca_devinfo *devinfo, uint16_t *num_msix);
118 
134 doca_error_t doca_devemu_pci_cap_type_get_max_num_db(const struct doca_devinfo *devinfo, uint16_t *num_db);
135 
150 doca_error_t doca_devemu_pci_cap_type_get_log_min_db_size(const struct doca_devinfo *devinfo, uint8_t *log_db_size);
151 
166 doca_error_t doca_devemu_pci_cap_type_get_log_max_db_size(const struct doca_devinfo *devinfo, uint8_t *log_db_size);
167 
183  uint8_t *log_stride_size);
184 
200  uint8_t *log_stride_size);
201 
216 doca_error_t doca_devemu_pci_cap_type_get_max_bars(const struct doca_devinfo *devinfo, uint8_t *max_bars);
217 
233 doca_error_t doca_devemu_pci_cap_bar_get_max_bar_regions(const struct doca_devinfo *devinfo, uint32_t *max_bar_regions);
234 
250  uint32_t *max_bar_regions);
251 
268  uint8_t *supported);
269 
285  uint8_t *supported);
286 
305  uint32_t *block_size);
306 
325  uint32_t *max_blocks);
326 
342 doca_error_t doca_devemu_pci_cap_type_get_max_bar_db_regions(const struct doca_devinfo *devinfo, uint32_t *max_regions);
343 
359 doca_error_t doca_devemu_pci_cap_bar_get_max_bar_db_regions(const struct doca_devinfo *devinfo, uint32_t *max_regions);
360 
377  uint32_t *alignment);
378 
397  uint32_t *block_size);
398 
417  uint32_t *max_blocks);
418 
435  uint32_t *max_regions);
436 
453  uint32_t *max_regions);
454 
471  uint32_t *alignment);
472 
491  uint32_t *block_size);
492 
511  uint32_t *max_blocks);
512 
529  uint32_t *max_regions);
530 
547  uint32_t *max_regions);
548 
565  uint32_t *alignment);
566 
585  uint32_t *block_size);
586 
605  uint32_t *max_blocks);
606 
623  uint32_t *max_regions);
624 
641  uint32_t *max_regions);
642 
659  uint32_t *alignment);
660 
671 };
672 
691  enum doca_devemu_pci_bar_mem_type memory_type,
692  uint8_t *supported);
693 
710 doca_error_t doca_devemu_pci_type_create(const char *name, struct doca_devemu_pci_type **pci_type);
711 
726 doca_error_t doca_devemu_pci_type_destroy(struct doca_devemu_pci_type *pci_type);
727 
745 doca_error_t doca_devemu_pci_type_start(struct doca_devemu_pci_type *pci_type);
746 
762 doca_error_t doca_devemu_pci_type_stop(struct doca_devemu_pci_type *pci_type);
763 
778 doca_error_t doca_devemu_pci_type_is_started(const struct doca_devemu_pci_type *pci_type, uint8_t *started);
779 
801 doca_error_t doca_devemu_pci_type_create_rep_list(struct doca_devemu_pci_type *pci_type,
802  struct doca_devinfo_rep ***dev_list_rep,
803  uint32_t *nb_devs_rep);
804 
819 doca_error_t doca_devemu_pci_type_get_dev(const struct doca_devemu_pci_type *pci_type, struct doca_dev **dev);
820 
838 doca_error_t doca_devemu_pci_type_set_dev(struct doca_devemu_pci_type *pci_type, struct doca_dev *dev);
839 
862  const struct doca_devemu_pci_type *pci_type,
863  uint8_t *supported);
864 
886 doca_error_t doca_devemu_pci_cap_type_is_mgmt_supported(const struct doca_devinfo *devinfo,
887  const struct doca_devemu_pci_type *pci_type,
888  uint8_t *supported);
889 
913 doca_error_t doca_devemu_pci_dev_create_rep(const struct doca_devemu_pci_type *pci_type, struct doca_dev_rep **dev_rep);
914 
937 doca_error_t doca_devemu_pci_dev_destroy_rep(struct doca_dev_rep *rep_dev);
938 
953 doca_error_t doca_devemu_pci_type_get_name(const struct doca_devemu_pci_type *pci_type,
954  char (*name)[DOCA_DEVEMU_PCI_TYPE_NAME_LEN]);
955 
970 doca_error_t doca_devemu_pci_type_get_device_id(const struct doca_devemu_pci_type *pci_type, uint16_t *device_id);
971 
987 doca_error_t doca_devemu_pci_type_set_device_id(struct doca_devemu_pci_type *pci_type, uint16_t device_id);
988 
1003 doca_error_t doca_devemu_pci_type_get_vendor_id(const struct doca_devemu_pci_type *pci_type, uint16_t *vendor_id);
1004 
1020 doca_error_t doca_devemu_pci_type_set_vendor_id(struct doca_devemu_pci_type *pci_type, uint16_t vendor_id);
1021 
1036 doca_error_t doca_devemu_pci_type_get_subsystem_id(const struct doca_devemu_pci_type *pci_type, uint16_t *subsystem_id);
1037 
1053 doca_error_t doca_devemu_pci_type_set_subsystem_id(struct doca_devemu_pci_type *pci_type, uint16_t subsystem_id);
1054 
1069 doca_error_t doca_devemu_pci_type_get_subsystem_vendor_id(const struct doca_devemu_pci_type *pci_type,
1070  uint16_t *subsystem_vid);
1071 
1087 doca_error_t doca_devemu_pci_type_set_subsystem_vendor_id(struct doca_devemu_pci_type *pci_type,
1088  uint16_t subsystem_vid);
1089 
1104 doca_error_t doca_devemu_pci_type_get_revision_id(const struct doca_devemu_pci_type *pci_type, uint8_t *revision_id);
1105 
1121 doca_error_t doca_devemu_pci_type_set_revision_id(struct doca_devemu_pci_type *pci_type, uint8_t revision_id);
1122 
1137 doca_error_t doca_devemu_pci_type_get_class_code(const struct doca_devemu_pci_type *pci_type, uint32_t *class_code);
1138 
1154 doca_error_t doca_devemu_pci_type_set_class_code(struct doca_devemu_pci_type *pci_type, uint32_t class_code);
1155 
1171 doca_error_t doca_devemu_pci_type_get_num_msix(const struct doca_devemu_pci_type *pci_type, uint16_t *num_msix);
1172 
1189 doca_error_t doca_devemu_pci_type_set_num_msix(struct doca_devemu_pci_type *pci_type, uint16_t num_msix);
1190 
1208 doca_error_t doca_devemu_pci_type_get_num_db(const struct doca_devemu_pci_type *pci_type, uint16_t *num_db);
1209 
1227 doca_error_t doca_devemu_pci_type_set_num_db(struct doca_devemu_pci_type *pci_type, uint16_t num_db);
1228 
1253 doca_error_t doca_devemu_pci_type_set_memory_bar_conf(struct doca_devemu_pci_type *pci_type,
1254  uint8_t id,
1255  uint8_t log_sz,
1256  enum doca_devemu_pci_bar_mem_type memory_type,
1257  uint8_t prefetchable);
1258 
1277 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);
1278 
1307  uint8_t id,
1308  uint64_t start_addr,
1309  uint64_t size,
1310  uint8_t log_db_size,
1311  uint8_t log_stride_size);
1312 
1345  uint8_t id,
1346  uint64_t start_addr,
1347  uint64_t size,
1348  uint8_t log_db_size,
1349  uint16_t db_id_msbyte,
1350  uint16_t db_id_lsbyte);
1351 
1373  uint8_t id,
1374  uint64_t start_addr,
1375  uint64_t size);
1376 
1398  uint8_t id,
1399  uint64_t start_addr,
1400  uint64_t size);
1401 
1428  uint8_t id,
1429  uint64_t start_addr,
1430  uint64_t size);
1431 
1465  uint8_t id,
1466  uint64_t start_addr,
1467  void *default_values,
1468  uint64_t size);
1469 
1470 #ifdef __cplusplus
1471 }
1472 #endif
1473 
1476 #endif /* DOCA_DEVEMU_PCI_TYPE_H_ */
#define DOCA_EXPERIMENTAL
To set a Symbol (or specifically a function) as experimental.
Definition: doca_compat.h:103
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.