| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |
#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 <doca_devemu_vfs_type.h>#include <doca_devemu_vfs.h>
Go to the source code of this file.
Data Structures | |
| struct | program_state |
Macros | |
| #define | SLEEP_IN_MICROS (10) /* Sample the task every 10 microseconds */ |
| #define | SLEEP_IN_NANOS (SLEEP_IN_MICROS * 1000) |
| #define | TIMEOUT_IN_MICROS (5 * 1000 * 1000) /* Set timeout to 5 seconds */ |
| #define | VFS_DEVICE_QUEUE_SIZE 64 |
| #define | VFS_DEVICE_NUM_QUEUES 16 |
Functions | |
| DOCA_LOG_REGISTER (DPU_DEVEMU_VFS_DEVICE_CREATE) | |
| static void | signal_handler (int signum) |
| static void | state_cleanup (struct program_state *state) |
| static bool | device_has_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 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_vfs_device_create (const char *pci_address) |
Variables | |
| static const char | tag [DOCA_VFS_TAG_SIZE+1] = "virtiofs-sample-tag" |
| static bool | unplug_requested |
| #define SLEEP_IN_MICROS (10) /* Sample the task every 10 microseconds */ |
Definition at line 43 of file devemu_vfs_device_hotplug_unplug_sample.c.
| #define SLEEP_IN_NANOS (SLEEP_IN_MICROS * 1000) |
Definition at line 44 of file devemu_vfs_device_hotplug_unplug_sample.c.
| #define TIMEOUT_IN_MICROS (5 * 1000 * 1000) /* Set timeout to 5 seconds */ |
Definition at line 45 of file devemu_vfs_device_hotplug_unplug_sample.c.
| #define VFS_DEVICE_NUM_QUEUES 16 |
Definition at line 48 of file devemu_vfs_device_hotplug_unplug_sample.c.
| #define VFS_DEVICE_QUEUE_SIZE 64 |
Definition at line 47 of file devemu_vfs_device_hotplug_unplug_sample.c.
| doca_error_t devemu_vfs_device_create | ( | const char * | pci_address | ) |
Definition at line 252 of file devemu_vfs_device_hotplug_unplug_sample.c.
|
static |
Definition at line 130 of file devemu_vfs_device_hotplug_unplug_sample.c.
| DOCA_LOG_REGISTER | ( | DPU_DEVEMU_VFS_DEVICE_CREATE | ) |
|
static |
Definition at line 147 of file devemu_vfs_device_hotplug_unplug_sample.c.
|
static |
Definition at line 187 of file devemu_vfs_device_hotplug_unplug_sample.c.
|
static |
Definition at line 230 of file devemu_vfs_device_hotplug_unplug_sample.c.
|
static |
Definition at line 68 of file devemu_vfs_device_hotplug_unplug_sample.c.
|
static |
Definition at line 81 of file devemu_vfs_device_hotplug_unplug_sample.c.
|
static |
Definition at line 50 of file devemu_vfs_device_hotplug_unplug_sample.c.
|
static |
Definition at line 61 of file devemu_vfs_device_hotplug_unplug_sample.c.