NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
devemu_vfs_list_devices_sample.c File Reference
#include <signal.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <time.h>
#include <doca_ctx.h>
#include <doca_devemu_pci.h>
#include <doca_devemu_pci_type.h>
#include <doca_dev.h>
#include <doca_error.h>
#include <doca_log.h>
#include <doca_devemu_vfs.h>
#include <doca_devemu_vfs_type.h>
Include dependency graph for devemu_vfs_list_devices_sample.c:

Go to the source code of this file.

Data Structures

struct  program_state
 

Functions

 DOCA_LOG_REGISTER (DPU_DEVEMU_VFS_DEVICE_LIST)
 
static void state_cleanup (struct program_state *state)
 
static bool device_match_pci_addr (const struct doca_devinfo *devinfo, const char *pci_address)
 
static doca_error_t find_doca_device (const char *pci_address, struct doca_dev **dev)
 
static const char * rep_func_type_to_string (enum doca_pci_func_type pci_func_type)
 
static doca_error_t list_emulated_devices (struct doca_devemu_vfs_type *vfs_type)
 
doca_error_t devemu_vfs_device_list (const char *pci_address)
 

Function Documentation

◆ devemu_vfs_device_list()

doca_error_t devemu_vfs_device_list ( const char *  pci_address)

Definition at line 209 of file devemu_vfs_list_devices_sample.c.

◆ device_match_pci_addr()

static bool device_match_pci_addr ( const struct doca_devinfo *  devinfo,
const char *  pci_address 
)
static

Definition at line 75 of file devemu_vfs_list_devices_sample.c.

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( DPU_DEVEMU_VFS_DEVICE_LIST  )

◆ find_doca_device()

static doca_error_t find_doca_device ( const char *  pci_address,
struct doca_dev **  dev 
)
static

Definition at line 92 of file devemu_vfs_list_devices_sample.c.

◆ list_emulated_devices()

static doca_error_t list_emulated_devices ( struct doca_devemu_vfs_type *  vfs_type)
static

Definition at line 154 of file devemu_vfs_list_devices_sample.c.

◆ rep_func_type_to_string()

static const char* rep_func_type_to_string ( enum doca_pci_func_type  pci_func_type)
static

Definition at line 132 of file devemu_vfs_list_devices_sample.c.

◆ state_cleanup()

static void state_cleanup ( struct program_state state)
static

Definition at line 54 of file devemu_vfs_list_devices_sample.c.