Data Accelerator Offload
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions
dao_vfio.h File Reference

Go to the source code of this file.

Data Structures

struct  dao_vfio_mem_resouce
 
struct  dao_vfio_device
 

Enumerations

enum  dao_vfio_dev_type { DAO_VFIO_DEV_PLATFORM , DAO_VFIO_DEV_PCIE }
 

Functions

int dao_vfio_init (void)
 
int dao_vfio_device_setup (const char *dev_name, struct dao_vfio_device *pdev)
 
void dao_vfio_device_free (struct dao_vfio_device *pdev)
 
void dao_vfio_fini (void)
 

Detailed Description

DAO VFIO library

DAO VFIO APIs are used to probe VFIO devices and map the resources.

Definition in file dao_vfio.h.

Enumeration Type Documentation

◆ dao_vfio_dev_type

VFIO device type.

Enumerator
DAO_VFIO_DEV_PLATFORM 

Platform device.

DAO_VFIO_DEV_PCIE 

PCIe device.

Definition at line 25 of file dao_vfio.h.

Function Documentation

◆ dao_vfio_init()

int dao_vfio_init ( void  )

Initialize the VFIO library by opening a container.

Returns
Zero on success.

◆ dao_vfio_device_setup()

int dao_vfio_device_setup ( const char *  dev_name,
struct dao_vfio_device pdev 
)

Probe a VFIO device and map its regions. Upon a successful probe, the device details are set in the memory referenced by the pdev pointer.

Parameters
dev_nameVFIO device name
pdevPointer to VFIO device structure.
Returns
Zero on success.

◆ dao_vfio_device_free()

void dao_vfio_device_free ( struct dao_vfio_device pdev)

Release a VFIO device and free the associated memory.

Parameters
pdevPointer to VFIO device structure.

◆ dao_vfio_fini()

void dao_vfio_fini ( void  )

Close the container.