NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
devemu_pci_device_hotplug_sample.c File Reference
#include <devemu_pci_common.h>
#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_dev.h>
#include <doca_error.h>
#include <doca_log.h>
Include dependency graph for devemu_pci_device_hotplug_sample.c:

Go to the source code of this file.

Functions

 DOCA_LOG_REGISTER (DPU_DEVEMU_PCI_DEVICE_HOTPLUG)
 
static void signal_handler (int signum)
 
static void hotplug_event_handler_cb (struct doca_devemu_pci_dev *pci_dev, union doca_data user_data)
 
static doca_error_t register_to_hotplug_state_change_events (struct doca_devemu_pci_dev *pci_dev, void *cookie)
 
doca_error_t devemu_pci_device_hotplug (const char *pci_address, const char *unplug_vuid)
 

Variables

static bool force_quit
 

Function Documentation

◆ devemu_pci_device_hotplug()

doca_error_t devemu_pci_device_hotplug ( const char *  pci_address,
const char *  unplug_vuid 
)

Definition at line 115 of file devemu_pci_device_hotplug_sample.c.

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( DPU_DEVEMU_PCI_DEVICE_HOTPLUG  )

◆ hotplug_event_handler_cb()

static void hotplug_event_handler_cb ( struct doca_devemu_pci_dev *  pci_dev,
union doca_data  user_data 
)
static

Definition at line 63 of file devemu_pci_device_hotplug_sample.c.

◆ register_to_hotplug_state_change_events()

static doca_error_t register_to_hotplug_state_change_events ( struct doca_devemu_pci_dev *  pci_dev,
void *  cookie 
)
static

Definition at line 92 of file devemu_pci_device_hotplug_sample.c.

◆ signal_handler()

static void signal_handler ( int  signum)
static

Definition at line 49 of file devemu_pci_device_hotplug_sample.c.

Variable Documentation

◆ force_quit

bool force_quit
static

Definition at line 42 of file devemu_pci_device_hotplug_sample.c.