NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
devemu_pci_common.h File Reference
#include <stdbool.h>
#include <doca_error.h>
#include <doca_argp.h>
#include <doca_log.h>
#include <doca_devemu_pci_type.h>
#include <doca_devemu_pci.h>
#include <doca_dpa.h>
#include "devemu_pci_type_config.h"
Include dependency graph for devemu_pci_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  devemu_resources
 

Macros

#define SLEEP_IN_MICROS   (10) /* Sample the task every 10 microseconds */
 
#define SLEEP_IN_NANOS   (SLEEP_IN_MICROS * 1000)
 

Typedefs

typedef doca_error_t(* emulation_supported_cb_t) (const struct doca_devinfo *, const struct doca_devemu_pci_type *pci_type, uint8_t *is_supported)
 

Functions

doca_error_t parse_pci_address (const char *addr, char *parsed_addr)
 
doca_error_t register_pci_address_param (doca_argp_param_cb_t pci_callback)
 
doca_error_t parse_vuid (const char *vuid, char *parsed_vuid)
 
doca_error_t register_vuid_param (const char *description, doca_argp_param_cb_t vuid_callback)
 
doca_error_t find_supported_device (const char *pci_address, const struct doca_devemu_pci_type *pci_type, emulation_supported_cb_t has_support, struct doca_dev **dev)
 
doca_error_t find_emulated_device (struct doca_devemu_pci_type *pci_type, const char *vuid, struct doca_dev_rep **rep)
 
doca_error_t configure_and_start_pci_type (struct doca_devemu_pci_type *pci_type, struct doca_dev *dev)
 
void devemu_resources_cleanup (struct devemu_resources *resources, bool destroy_rep)
 
const char * hotplug_state_to_string (enum doca_devemu_pci_hotplug_state hotplug_state)
 
doca_error_t init_dpa (struct devemu_resources *resources, struct doca_dpa_app *dpa_app)
 

Macro Definition Documentation

◆ SLEEP_IN_MICROS

#define SLEEP_IN_MICROS   (10) /* Sample the task every 10 microseconds */

Definition at line 40 of file devemu_pci_common.h.

◆ SLEEP_IN_NANOS

#define SLEEP_IN_NANOS   (SLEEP_IN_MICROS * 1000)

Definition at line 41 of file devemu_pci_common.h.

Typedef Documentation

◆ emulation_supported_cb_t

typedef doca_error_t(* emulation_supported_cb_t) (const struct doca_devinfo *, const struct doca_devemu_pci_type *pci_type, uint8_t *is_supported)

Definition at line 44 of file devemu_pci_common.h.

Function Documentation

◆ configure_and_start_pci_type()

doca_error_t configure_and_start_pci_type ( struct doca_devemu_pci_type *  pci_type,
struct doca_dev *  dev 
)

Definition at line 274 of file nvme_pci_common.c.

◆ devemu_resources_cleanup()

void devemu_resources_cleanup ( struct devemu_resources resources,
bool  destroy_rep 
)

Definition at line 364 of file devemu_pci_common.c.

◆ find_emulated_device()

doca_error_t find_emulated_device ( struct doca_devemu_pci_type *  pci_type,
const char *  vuid,
struct doca_dev_rep **  rep 
)

Definition at line 95 of file nvme_pci_common.c.

◆ find_supported_device()

doca_error_t find_supported_device ( const char *  pci_address,
const struct doca_devemu_pci_type *  pci_type,
emulation_supported_cb_t  has_support,
struct doca_dev **  dev 
)

Definition at line 32 of file nvme_pci_common.c.

◆ hotplug_state_to_string()

const char* hotplug_state_to_string ( enum doca_devemu_pci_hotplug_state  hotplug_state)

Definition at line 339 of file nvme_pci_common.c.

◆ init_dpa()

doca_error_t init_dpa ( struct devemu_resources resources,
struct doca_dpa_app *  dpa_app 
)

Definition at line 493 of file devemu_pci_common.c.

◆ parse_pci_address()

doca_error_t parse_pci_address ( const char *  addr,
char *  parsed_addr 
)

Definition at line 32 of file devemu_pci_common.c.

◆ parse_vuid()

doca_error_t parse_vuid ( const char *  vuid,
char *  parsed_vuid 
)

Definition at line 79 of file devemu_pci_common.c.

◆ register_pci_address_param()

doca_error_t register_pci_address_param ( doca_argp_param_cb_t  pci_callback)

Definition at line 54 of file devemu_pci_common.c.

◆ register_vuid_param()

doca_error_t register_vuid_param ( const char *  description,
doca_argp_param_cb_t  vuid_callback 
)

Definition at line 95 of file devemu_pci_common.c.