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

Macros | |
| #define | DOCA_DEVINFO_VUID_SIZE 128 |
| Buffer size to hold VUID. Including a null terminator. More... | |
| #define | DOCA_DEVINFO_IPV4_ADDR_SIZE 4 |
| Length of IPv4 address. More... | |
| #define | DOCA_DEVINFO_IPV6_ADDR_SIZE 16 |
| Length of IPv6 address. More... | |
| #define | DOCA_DEVINFO_MAC_ADDR_SIZE 6 |
| Length of MAC address. More... | |
| #define | DOCA_DEVINFO_IFACE_NAME_SIZE 256 |
| Buffer size to hold network interface name. Including a null terminator. More... | |
| #define | DOCA_DEVINFO_IBDEV_NAME_SIZE 64 |
| Buffer size to hold Infiniband/RoCE device name. Including a null terminator. More... | |
| #define | DOCA_DEVINFO_PCI_ADDR_SIZE 13 |
| Buffer size to hold PCI BDF format: "XXXX:XX:XX.X". Including a null terminator. More... | |
| #define | DOCA_DEVINFO_PCI_BDF_SIZE 8 |
| Buffer size to hold PCI BDF format: "XX:XX.X". Including a null terminator. More... | |
| #define | DOCA_DEVINFO_REP_VUID_SIZE 128 |
| Buffer size to hold VUID. Including a null terminator. More... | |
| #define | DOCA_DEVINFO_REP_PCI_ADDR_SIZE 13 |
| Buffer size to hold PCI BDF format: "XXXX:XX:XX.X". Including a null terminator. More... | |
| #define | DOCA_DEVINFO_REP_PCI_BDF_SIZE 8 |
| Buffer size to hold PCI BDF format: "XX:XX.X". Including a null terminator. More... | |
Enumerations | |
| enum | doca_devinfo_rep_filter { DOCA_DEVINFO_REP_FILTER_ALL = 0 , DOCA_DEVINFO_REP_FILTER_NET = 1 << 1 , DOCA_DEVINFO_REP_FILTER_EMULATED = 1 << 2 } |
Functions | |
| DOCA_STABLE doca_error_t | doca_devinfo_create_list (struct doca_devinfo ***dev_list, uint32_t *nb_devs) |
| Creates list of all available local devices. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_destroy_list (struct doca_devinfo **dev_list) |
| Destroy list of local device info structures. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_rep_create_list (struct doca_dev *dev, int filter, struct doca_devinfo_rep ***dev_list_rep, uint32_t *nb_devs_rep) |
| Create list of available representor devices accessible by dev. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_rep_destroy_list (struct doca_devinfo_rep **dev_list_rep) |
| Destroy list of representor device info structures. More... | |
| DOCA_STABLE doca_error_t | doca_dev_open (struct doca_devinfo *devinfo, struct doca_dev **dev) |
| Initialize local device for use. More... | |
| DOCA_STABLE doca_error_t | doca_dev_close (struct doca_dev *dev) |
| Destroy allocated local device instance. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dev_accelerate_resource_reclaim (struct doca_dev *dev) |
| Accelerates the reclaim process for a local device instance. More... | |
| DOCA_STABLE doca_error_t | doca_dev_rep_open (struct doca_devinfo_rep *devinfo, struct doca_dev_rep **dev_rep) |
| Initialize representor device for use. More... | |
| DOCA_STABLE doca_error_t | doca_dev_rep_close (struct doca_dev_rep *dev) |
| Destroy allocated representor device instance. More... | |
| DOCA_STABLE struct doca_devinfo * | doca_dev_as_devinfo (const struct doca_dev *dev) |
| Get local device info from device. This should be useful when wanting to query information about device after opening it, and destroying the devinfo list. More... | |
| DOCA_STABLE struct doca_devinfo_rep * | doca_dev_rep_as_devinfo (struct doca_dev_rep *dev_rep) |
| Get representor device info from device. This should be useful when wanting to query information about device after opening it, and destroying the devinfo list. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_get_pci_addr_str (const struct doca_devinfo *devinfo, char *pci_addr_str) |
| Get the PCI address of a DOCA devinfo. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_is_equal_pci_addr (const struct doca_devinfo *devinfo, const char *pci_addr_str, uint8_t *is_equal) |
| Check if a PCI address belongs to a DOCA devinfo. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_get_ipv4_addr (const struct doca_devinfo *devinfo, uint8_t *ipv4_addr, uint32_t size) |
| Get the IPv4 address of a DOCA devinfo. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_get_ipv6_addr (const struct doca_devinfo *devinfo, uint8_t *ipv6_addr, uint32_t size) |
| Get the IPv6 address of a DOCA devinfo. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_get_mac_addr (const struct doca_devinfo *devinfo, uint8_t *mac_addr, uint32_t size) |
| Get the MAC address of a DOCA devinfo. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_get_iface_name (const struct doca_devinfo *devinfo, char *iface_name, uint32_t size) |
| Get the name of the ethernet interface of a DOCA devinfo. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_get_ibdev_name (const struct doca_devinfo *devinfo, char *ibdev_name, uint32_t size) |
| Get the name of the IB device represented by a DOCA devinfo. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_get_lid (const struct doca_devinfo *devinfo, uint16_t *lid) |
| Get the port LID of a DOCA devinfo. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devinfo_get_active_rate (const struct doca_devinfo *devinfo, uint64_t *active_rate) |
| Get the active rate of a DOCA devinfo. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devinfo_get_vhca_id (const struct doca_devinfo *devinfo, uint16_t *vhca_id) |
| Get vhca id of a device. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_cap_is_hotplug_manager_supported (const struct doca_devinfo *devinfo, uint8_t *is_hotplug_manager) |
| Get the hotplug manager capability of a DOCA devinfo. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devinfo_cap_is_notification_moderation_supported (const struct doca_devinfo *devinfo, uint8_t *is_notification_moderation_supported) |
| Check if notification moderation is supported for a device. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_rep_cap_is_filter_all_supported (const struct doca_devinfo *devinfo, uint8_t *filter_all_supported) |
| Get the representor devices discovery capability of the device. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_rep_cap_is_filter_net_supported (const struct doca_devinfo *devinfo, uint8_t *filter_net_supported) |
| Get the remote net discovery capability of the device. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_rep_cap_is_filter_emulated_supported (const struct doca_devinfo *devinfo, uint8_t *filter_emulated_supported) |
| Get the remote emulated device discovery capability of the device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devinfo_cap_is_accelerate_resource_reclaim_supported (const struct doca_devinfo *devinfo, uint8_t *is_accelerate_resource_reclaim) |
| Get the accelerate resource reclaim capability of a DOCA devinfo. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_rep_get_vuid (const struct doca_devinfo_rep *devinfo_rep, char *rep_vuid, uint32_t size) |
| Get the Vendor Unique ID of a representor DOCA devinfo. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_rep_get_pci_addr_str (const struct doca_devinfo_rep *devinfo_rep, char *pci_addr_str) |
| Get the PCI address of a DOCA devinfo_rep. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_rep_get_pci_func_type (const struct doca_devinfo_rep *devinfo_rep, enum doca_pci_func_type *pci_func_type) |
| Get the PCI function type of a DOCA devinfo_rep. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_rep_get_is_hotplug (const struct doca_devinfo_rep *devinfo_rep, uint8_t *is_hotplug) |
| Query whether the representor device is a hotplugged device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devinfo_rep_get_iface_name (const struct doca_devinfo_rep *devinfo_rep, char *iface_name, uint32_t size) |
| Get the name of the ethernet interface of a DOCA devinfo_rep. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_devinfo_rep_get_vhca_id (const struct doca_devinfo_rep *devinfo_rep, uint16_t *vhca_id) |
| Get vhca id of a DOCA devinfo_rep. More... | |
| DOCA_STABLE doca_error_t | doca_devinfo_rep_is_equal_pci_addr (const struct doca_devinfo_rep *devinfo_rep, const char *pci_addr_str, uint8_t *is_equal) |
| Check if a PCI address belongs to a DOCA devinfo_rep. More... | |
The DOCA device represents an available processing unit backed by the HW or SW implementation.
| #define DOCA_DEVINFO_IBDEV_NAME_SIZE 64 |
Buffer size to hold Infiniband/RoCE device name. Including a null terminator.
Definition at line 309 of file doca_dev.h.
| #define DOCA_DEVINFO_IFACE_NAME_SIZE 256 |
Buffer size to hold network interface name. Including a null terminator.
Definition at line 305 of file doca_dev.h.
| #define DOCA_DEVINFO_IPV4_ADDR_SIZE 4 |
Length of IPv4 address.
Definition at line 293 of file doca_dev.h.
| #define DOCA_DEVINFO_IPV6_ADDR_SIZE 16 |
Length of IPv6 address.
Definition at line 297 of file doca_dev.h.
| #define DOCA_DEVINFO_MAC_ADDR_SIZE 6 |
Length of MAC address.
Definition at line 301 of file doca_dev.h.
| #define DOCA_DEVINFO_PCI_ADDR_SIZE 13 |
Buffer size to hold PCI BDF format: "XXXX:XX:XX.X". Including a null terminator.
Definition at line 313 of file doca_dev.h.
| #define DOCA_DEVINFO_PCI_BDF_SIZE 8 |
Buffer size to hold PCI BDF format: "XX:XX.X". Including a null terminator.
Definition at line 317 of file doca_dev.h.
| #define DOCA_DEVINFO_REP_PCI_ADDR_SIZE 13 |
Buffer size to hold PCI BDF format: "XXXX:XX:XX.X". Including a null terminator.
Definition at line 665 of file doca_dev.h.
| #define DOCA_DEVINFO_REP_PCI_BDF_SIZE 8 |
Buffer size to hold PCI BDF format: "XX:XX.X". Including a null terminator.
Definition at line 669 of file doca_dev.h.
| #define DOCA_DEVINFO_REP_VUID_SIZE 128 |
Buffer size to hold VUID. Including a null terminator.
Definition at line 661 of file doca_dev.h.
| #define DOCA_DEVINFO_VUID_SIZE 128 |
Buffer size to hold VUID. Including a null terminator.
Definition at line 289 of file doca_dev.h.
Representor device filter by flavor
Multiple options possible but some are mutually exclusive.
| Enumerator | |
|---|---|
| DOCA_DEVINFO_REP_FILTER_ALL | |
| DOCA_DEVINFO_REP_FILTER_NET | |
| DOCA_DEVINFO_REP_FILTER_EMULATED | |
Definition at line 65 of file doca_dev.h.
| DOCA_EXPERIMENTAL doca_error_t doca_dev_accelerate_resource_reclaim | ( | struct doca_dev * | dev | ) |
Accelerates the reclaim process for a local device instance.
This function optimizes the reclaim time by retaining critical resources in the cache upon closure, allowing them to be reused when restarting. It should be invoked before initiating device resource cleanup, including resources tied to the device, such as DOCA Flow switch ports and their associated components. For scenarios where a fast reclaim is needed, even in the event of a process crash, this function should be called periodically (e.g., once per second) to ensure readiness.
| [in] | dev | Pointer to the local DOCA device instance. |
| DOCA_STABLE struct doca_devinfo* doca_dev_as_devinfo | ( | const struct doca_dev * | dev | ) |
Get local device info from device. This should be useful when wanting to query information about device after opening it, and destroying the devinfo list.
| [in] | dev | The doca device instance. |
| DOCA_STABLE doca_error_t doca_dev_close | ( | struct doca_dev * | dev | ) |
Destroy allocated local device instance.
Closes device or decrements its refcount by One. In case the same device was opened multiple times, then only the last call to close will attempt to destroy device.
| [in] | dev | The local doca device instance. |
| DOCA_STABLE doca_error_t doca_dev_open | ( | struct doca_devinfo * | devinfo, |
| struct doca_dev ** | dev | ||
| ) |
Initialize local device for use.
Opens device or increments its refcount by One. The device can later be used by other libraries. For every call to doca_dev_open() there should be a call to doca_dev_close().
| [in] | devinfo | The devinfo structure of the requested device. |
| [out] | dev | Initialized local doca device instance on success. Valid on success only. |
| DOCA_STABLE struct doca_devinfo_rep* doca_dev_rep_as_devinfo | ( | struct doca_dev_rep * | dev_rep | ) |
Get representor device info from device. This should be useful when wanting to query information about device after opening it, and destroying the devinfo list.
| [in] | dev_rep | The representor doca device instance. |
| DOCA_STABLE doca_error_t doca_dev_rep_close | ( | struct doca_dev_rep * | dev | ) |
Destroy allocated representor device instance.
| [in] | dev | The representor doca device instance. |
| DOCA_STABLE doca_error_t doca_dev_rep_open | ( | struct doca_devinfo_rep * | devinfo, |
| struct doca_dev_rep ** | dev_rep | ||
| ) |
Initialize representor device for use.
| [in] | devinfo | The devinfo structure of the requested device. |
| [out] | dev_rep | Initialized representor doca device instance on success. Valid on success only. |
| DOCA_EXPERIMENTAL doca_error_t doca_devinfo_cap_is_accelerate_resource_reclaim_supported | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | is_accelerate_resource_reclaim | ||
| ) |
Get the accelerate resource reclaim capability of a DOCA devinfo.
The accelerate resource reclaim property type: uint8_t*.
| [in] | devinfo | The device to query. |
| [out] | is_accelerate_resource_reclaim | 1 if the accelerate resource reclaim capability is supported, 0 otherwise. |
| DOCA_STABLE doca_error_t doca_devinfo_cap_is_hotplug_manager_supported | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | is_hotplug_manager | ||
| ) |
Get the hotplug manager capability of a DOCA devinfo.
The hotplug manager property type: uint8_t*.
| [in] | devinfo | The device to query. |
| [out] | is_hotplug_manager | 1 if the hotplug manager capability is supported, 0 otherwise. |
| DOCA_EXPERIMENTAL doca_error_t doca_devinfo_cap_is_notification_moderation_supported | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | is_notification_moderation_supported | ||
| ) |
Check if notification moderation is supported for a device.
The notification moderation supported type: uint8_t*.
| [in] | devinfo | The device to query. |
| [out] | is_notification_moderation_supported | 1 if the device supports notification moderation |
| DOCA_STABLE doca_error_t doca_devinfo_create_list | ( | struct doca_devinfo *** | dev_list, |
| uint32_t * | nb_devs | ||
| ) |
Creates list of all available local devices.
Lists information about available devices, to start using the device you first have to call doca_dev_open(), while passing an element of this list. List elements become invalid once it has been destroyed.
| [out] | dev_list | Pointer to array of pointers. Output can then be accessed as follows (*dev_list)[idx]. |
| [out] | nb_devs | Number of available local devices. |
| DOCA_STABLE doca_error_t doca_devinfo_destroy_list | ( | struct doca_devinfo ** | dev_list | ) |
Destroy list of local device info structures.
Destroys the list of device information, once the list has been destroyed, all elements become invalid.
| [in] | dev_list | List to be destroyed. |
| DOCA_EXPERIMENTAL doca_error_t doca_devinfo_get_active_rate | ( | const struct doca_devinfo * | devinfo, |
| uint64_t * | active_rate | ||
| ) |
Get the active rate of a DOCA devinfo.
| [in] | devinfo | The device to query. |
| [out] | active_rate | The active rate of the given port on the device. Given in units of bits/s. |
| DOCA_STABLE doca_error_t doca_devinfo_get_ibdev_name | ( | const struct doca_devinfo * | devinfo, |
| char * | ibdev_name, | ||
| uint32_t | size | ||
| ) |
Get the name of the IB device represented by a DOCA devinfo.
The name of the IB device type: char[DOCA_DEVINFO_IBDEV_NAME_SIZE].
| [in] | devinfo | The device to query. |
| [out] | ibdev_name | The name of the IB device represented by devinfo. |
| [in] | size | The size of the input ibdev_name buffer, must be at least DOCA_DEVINFO_IBDEV_NAME_SIZE which includes the null terminating byte. |
| DOCA_STABLE doca_error_t doca_devinfo_get_iface_name | ( | const struct doca_devinfo * | devinfo, |
| char * | iface_name, | ||
| uint32_t | size | ||
| ) |
Get the name of the ethernet interface of a DOCA devinfo.
The name of the ethernet interface is the same as it's name in ifconfig. The name of the ethernet interface type: char[DOCA_DEVINFO_IFACE_NAME_SIZE].
| [in] | devinfo | The device to query. |
| [out] | iface_name | The name of the ethernet interface of devinfo. |
| [in] | size | The size of the input iface_name buffer, must be at least DOCA_DEVINFO_IFACE_NAME_SIZE which includes the null terminating byte. |
| DOCA_STABLE doca_error_t doca_devinfo_get_ipv4_addr | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | ipv4_addr, | ||
| uint32_t | size | ||
| ) |
Get the IPv4 address of a DOCA devinfo.
The IPv4 address type: uint8_t[DOCA_DEVINFO_IPV4_ADDR_SIZE].
| [in] | devinfo | The device to query. |
| [out] | ipv4_addr | The IPv4 address of devinfo. |
| [in] | size | The size of the input ipv4_addr buffer, must be at least DOCA_DEVINFO_IPV4_ADDR_SIZE |
| DOCA_STABLE doca_error_t doca_devinfo_get_ipv6_addr | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | ipv6_addr, | ||
| uint32_t | size | ||
| ) |
Get the IPv6 address of a DOCA devinfo.
The IPv6 address type: uint8_t[DOCA_DEVINFO_IPV6_ADDR_SIZE].
| [in] | devinfo | The device to query. |
| [out] | ipv6_addr | The IPv6 address of devinfo. |
| [in] | size | The size of the input ipv6_addr buffer, must be at least DOCA_DEVINFO_IPV6_ADDR_SIZE |
| DOCA_STABLE doca_error_t doca_devinfo_get_lid | ( | const struct doca_devinfo * | devinfo, |
| uint16_t * | lid | ||
| ) |
Get the port LID of a DOCA devinfo.
The port LID type: uint16_t *.
| [in] | devinfo | The device to query. |
| [out] | lid | The port LID of devinfo. |
| DOCA_STABLE doca_error_t doca_devinfo_get_mac_addr | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | mac_addr, | ||
| uint32_t | size | ||
| ) |
Get the MAC address of a DOCA devinfo.
The MAC address type: uint8_t[DOCA_DEVINFO_MAC_ADDR_SIZE].
| [in] | devinfo | The device to query. |
| [out] | mac_addr | The MAC address of devinfo. |
| [in] | size | The size of the input mac_addr buffer, must be at least DOCA_DEVINFO_MAC_ADDR_SIZE |
| DOCA_STABLE doca_error_t doca_devinfo_get_pci_addr_str | ( | const struct doca_devinfo * | devinfo, |
| char * | pci_addr_str | ||
| ) |
Get the PCI address of a DOCA devinfo.
The PCI address string format is "Domain:Bus:Device.Function", such that each value is represented by HEX digits, e.g., "0000:3a:00.0"
| [in] | devinfo | The device to query. |
| [out] | pci_addr_str | The PCI address of devinfo, should be of size DOCA_DEVINFO_PCI_ADDR_SIZE at least. |
| DOCA_EXPERIMENTAL doca_error_t doca_devinfo_get_vhca_id | ( | const struct doca_devinfo * | devinfo, |
| uint16_t * | vhca_id | ||
| ) |
Get vhca id of a device.
| [in] | devinfo | The device to query. |
| [out] | vhca_id | Returned vhca id of the device |
| DOCA_STABLE doca_error_t doca_devinfo_is_equal_pci_addr | ( | const struct doca_devinfo * | devinfo, |
| const char * | pci_addr_str, | ||
| uint8_t * | is_equal | ||
| ) |
Check if a PCI address belongs to a DOCA devinfo.
| [in] | devinfo | The device to query. |
| [in] | pci_addr_str | The PCI address to check, should be as one of the following formats:
|
| [out] | is_equal | 1 if pci_addr_str belongs to devinfo, 0 otherwise. In case of an error, no certain value is guaranteed. |
| DOCA_STABLE doca_error_t doca_devinfo_rep_cap_is_filter_all_supported | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | filter_all_supported | ||
| ) |
Get the representor devices discovery capability of the device.
Get uint8_t value defining if the device can be used to create list of representor devices. In case true is returned, then this device supports at least one representor type. See doca_devinfo_rep_create_list(). true - device can be used with the remote list create API with filter DOCA_DEVINFO_REP_FILTER_ALL. false - providing DOCA_DEVINFO_REP_FILTER_ALL is guaranteed to fail with DOCA_ERROR_NOT_SUPPORTED.
| [in] | devinfo | The device to query. |
| [out] | filter_all_supported | 1 if the rep list all capability is supported, 0 otherwise. |
| DOCA_STABLE doca_error_t doca_devinfo_rep_cap_is_filter_emulated_supported | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | filter_emulated_supported | ||
| ) |
Get the remote emulated device discovery capability of the device.
Get uint8_t value defining if the device can be used to create list of emulated representor devices. See doca_devinfo_rep_create_list(). true - device can be used with the remote list create API with filter DOCA_DEVINFO_REP_FILTER_EMULATED. false - providing DOCA_DEVINFO_REP_FILTER_EMULATED is guaranteed to fail with DOCA_ERROR_NOT_SUPPORTED.
| [in] | devinfo | The device to query. |
| [out] | filter_emulated_supported | 1 if the list emulated capability is supported, 0 otherwise. |
| DOCA_STABLE doca_error_t doca_devinfo_rep_cap_is_filter_net_supported | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | filter_net_supported | ||
| ) |
Get the remote net discovery capability of the device.
Get uint8_t value defining if the device can be used to create list of net remote devices. See doca_devinfo_remote_list_create(). true - device can be used with the remote list create API with filter DOCA_DEV_REMOTE_FILTER_NET. false - providing DOCA_DEV_REMOTE_FILTER_NET is guaranteed to fail with DOCA_ERROR_NOT_SUPPORTED.
| [in] | devinfo | The device to query. |
| [out] | filter_net_supported | 1 if the rep list net capability is supported, 0 otherwise. |
| DOCA_STABLE doca_error_t doca_devinfo_rep_create_list | ( | struct doca_dev * | dev, |
| int | filter, | ||
| struct doca_devinfo_rep *** | dev_list_rep, | ||
| uint32_t * | nb_devs_rep | ||
| ) |
Create list of available representor devices accessible by dev.
Returns all representors managed by the provided device. The provided device must be a local device. The representor may represent a network function attached to the host, or it can represent an emulated function attached to the host.
| [in] | dev | Local device with access to representors. |
| [in] | filter | Bitmap filter of representor types. See enum doca_devinfo_rep_filter for more details. |
| [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_STABLE doca_error_t doca_devinfo_rep_destroy_list | ( | struct doca_devinfo_rep ** | dev_list_rep | ) |
Destroy list of representor device info structures.
Destroy list of representor device information, once the list has been destroyed, all elements of the list are considered invalid.
| [in] | dev_list_rep | List to be destroyed. |
| DOCA_EXPERIMENTAL doca_error_t doca_devinfo_rep_get_iface_name | ( | const struct doca_devinfo_rep * | devinfo_rep, |
| char * | iface_name, | ||
| uint32_t | size | ||
| ) |
Get the name of the ethernet interface of a DOCA devinfo_rep.
The name of the ethernet interface is the same as it's name in ifconfig. The name of the ethernet interface type: char[DOCA_DEVINFO_IFACE_NAME_SIZE].
| [in] | devinfo_rep | Representor device info |
| [out] | iface_name | The name of the ethernet interface of devinfo_rep. |
| [in] | size | The size of the input iface_name buffer, must be at least DOCA_DEVINFO_IFACE_NAME_SIZE which includes the null terminating byte. |
| DOCA_STABLE doca_error_t doca_devinfo_rep_get_is_hotplug | ( | const struct doca_devinfo_rep * | devinfo_rep, |
| uint8_t * | is_hotplug | ||
| ) |
Query whether the representor device is a hotplugged device.
| [in] | devinfo_rep | representor device info |
| [out] | is_hotplug | 1 if the representor device is a hotplugged device. 0 if representor device is statically plugged. |
| DOCA_STABLE doca_error_t doca_devinfo_rep_get_pci_addr_str | ( | const struct doca_devinfo_rep * | devinfo_rep, |
| char * | pci_addr_str | ||
| ) |
Get the PCI address of a DOCA devinfo_rep.
The PCI address string format is "Domain:Bus:Device.Function", such that each value is represented by HEX digits, e.g., "0000:3a:00.0".
| [in] | devinfo_rep | The device to query. |
| [out] | pci_addr_str | The PCI address of devinfo_rep, should be of size DOCA_DEVINFO_REP_PCI_ADDR_SIZE at least. |
| DOCA_STABLE doca_error_t doca_devinfo_rep_get_pci_func_type | ( | const struct doca_devinfo_rep * | devinfo_rep, |
| enum doca_pci_func_type * | pci_func_type | ||
| ) |
Get the PCI function type of a DOCA devinfo_rep.
The pci function type: enum doca_pci_func_type.
| [in] | devinfo_rep | The representor of device to query. |
| [out] | pci_func_type | The PCI function type of the devinfo_rep. |
| DOCA_EXPERIMENTAL doca_error_t doca_devinfo_rep_get_vhca_id | ( | const struct doca_devinfo_rep * | devinfo_rep, |
| uint16_t * | vhca_id | ||
| ) |
Get vhca id of a DOCA devinfo_rep.
| [in] | devinfo_rep | Representor device info. |
| [out] | vhca_id | Returned vhca id of the devinfo_rep. |
| DOCA_STABLE doca_error_t doca_devinfo_rep_get_vuid | ( | const struct doca_devinfo_rep * | devinfo_rep, |
| char * | rep_vuid, | ||
| uint32_t | size | ||
| ) |
Get the Vendor Unique ID of a representor DOCA devinfo.
The Vendor Unique ID is used as stable ID of a VF/PF. The Vendor Unique ID type: char[DOCA_DEVINFO_VUID_SIZE].
| [in] | devinfo_rep | The representor device to query. |
| [out] | rep_vuid | The Vendor Unique ID of devinfo_rep. |
| [in] | size | The size of the vuid buffer, including the terminating null byte ('\0'). |
| DOCA_STABLE doca_error_t doca_devinfo_rep_is_equal_pci_addr | ( | const struct doca_devinfo_rep * | devinfo_rep, |
| const char * | pci_addr_str, | ||
| uint8_t * | is_equal | ||
| ) |
Check if a PCI address belongs to a DOCA devinfo_rep.
| [in] | devinfo_rep | The representor of device to query. |
| [in] | pci_addr_str | The PCI address to check, should be as one of the following formats:
|
| [out] | is_equal | 1 if pci_addr_str belongs to devinfo_rep, 0 otherwise. |