FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
pci.c File Reference
+ Include dependency graph for pci.c:

Go to the source code of this file.

Data Structures

struct  linux_pci_device_t
 
struct  linux_pci_vfio_iommu_group_t
 
struct  linux_pci_main_t
 

Functions

linux_pci_device_tlinux_pci_get_device (vlib_pci_dev_handle_t h)
 
uword vlib_pci_get_private_data (vlib_pci_dev_handle_t h)
 
void vlib_pci_set_private_data (vlib_pci_dev_handle_t h, uword private_data)
 
vlib_pci_addr_t * vlib_pci_get_addr (vlib_pci_dev_handle_t h)
 
clib_error_tpci_bus_init (vlib_main_t *vm)
 
vlib_pci_device_info_tvlib_pci_get_device_info (vlib_pci_addr_t *addr, clib_error_t **error)
 
static int directory_exists (char *path)
 
clib_error_tvlib_pci_bind_to_uio (vlib_pci_addr_t *addr, char *uio_drv_name)
 
static clib_error_tscan_uio_dir (void *arg, u8 *path_name, u8 *file_name)
 
static clib_error_tlinux_pci_uio_read_ready (clib_file_t *uf)
 
static clib_error_tlinux_pci_vfio_unmask_intx (linux_pci_device_t *d)
 
static clib_error_tlinux_pci_uio_error_ready (clib_file_t *uf)
 
static clib_error_tlinux_pci_vfio_read_ready (clib_file_t *uf)
 
static clib_error_tlinux_pci_vfio_error_ready (clib_file_t *uf)
 
static clib_error_tadd_device_uio (vlib_main_t *vm, linux_pci_device_t *p, vlib_pci_device_info_t *di, pci_device_registration_t *r)
 
static linux_pci_vfio_iommu_group_tget_vfio_iommu_group (int group)
 
static clib_error_topen_vfio_iommu_group (int group)
 
static clib_error_tadd_device_vfio (vlib_main_t *vm, linux_pci_device_t *p, vlib_pci_device_info_t *di, pci_device_registration_t *r)
 
clib_error_tvlib_pci_read_write_config (vlib_pci_dev_handle_t h, vlib_read_or_write_t read_or_write, uword address, void *data, u32 n_bytes)
 
static clib_error_tvlib_pci_map_resource_int (vlib_pci_dev_handle_t h, u32 resource, u8 *addr, void **result)
 
clib_error_tvlib_pci_map_resource (vlib_pci_dev_handle_t h, u32 resource, void **result)
 
clib_error_tvlib_pci_map_resource_fixed (vlib_pci_dev_handle_t h, u32 resource, u8 *addr, void **result)
 
void init_device_from_registered (vlib_main_t *vm, vlib_pci_device_info_t *di)
 
static clib_error_tscan_pci_addr (void *arg, u8 *dev_dir_name, u8 *ignored)
 
static int pci_addr_cmp (void *v1, void *v2)
 
vlib_pci_addr_t * vlib_pci_get_all_dev_addrs ()
 
clib_error_tlinux_pci_init (vlib_main_t *vm)
 

Variables

static const char * sysfs_pci_dev_path = "/sys/bus/pci/devices"
 
static const char * sysfs_pci_drv_path = "/sys/bus/pci/drivers"
 
static char * sysfs_mod_vfio_noiommu
 
linux_pci_main_t linux_pci_main
 

Function Documentation

static clib_error_t* add_device_uio ( vlib_main_t vm,
linux_pci_device_t p,
vlib_pci_device_info_t di,
pci_device_registration_t r 
)
static

Definition at line 594 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* add_device_vfio ( vlib_main_t vm,
linux_pci_device_t p,
vlib_pci_device_info_t di,
pci_device_registration_t r 
)
static

Definition at line 731 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int directory_exists ( char *  path)
static

Definition at line 320 of file pci.c.

+ Here is the caller graph for this function:

static linux_pci_vfio_iommu_group_t* get_vfio_iommu_group ( int  group)
static

Definition at line 652 of file pci.c.

+ Here is the caller graph for this function:

void init_device_from_registered ( vlib_main_t vm,
vlib_pci_device_info_t di 
)

Definition at line 940 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

linux_pci_device_t* linux_pci_get_device ( vlib_pci_dev_handle_t  h)

Definition at line 121 of file pci.c.

+ Here is the caller graph for this function:

clib_error_t* linux_pci_init ( vlib_main_t vm)

Definition at line 1045 of file pci.c.

+ Here is the call graph for this function:

static clib_error_t* linux_pci_uio_error_ready ( clib_file_t uf)
static

Definition at line 560 of file pci.c.

+ Here is the caller graph for this function:

static clib_error_t* linux_pci_uio_read_ready ( clib_file_t uf)
static

Definition at line 522 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* linux_pci_vfio_error_ready ( clib_file_t uf)
static

Definition at line 586 of file pci.c.

+ Here is the caller graph for this function:

static clib_error_t* linux_pci_vfio_read_ready ( clib_file_t uf)
static

Definition at line 568 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* linux_pci_vfio_unmask_intx ( linux_pci_device_t d)
static

Definition at line 540 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* open_vfio_iommu_group ( int  group)
static

Definition at line 663 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int pci_addr_cmp ( void *  v1,
void *  v2 
)
static

Definition at line 1002 of file pci.c.

+ Here is the caller graph for this function:

clib_error_t* pci_bus_init ( vlib_main_t vm)

Definition at line 251 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* scan_pci_addr ( void *  arg,
u8 dev_dir_name,
u8 ignored 
)
static

Definition at line 979 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* scan_uio_dir ( void *  arg,
u8 path_name,
u8 file_name 
)
static

Definition at line 507 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vlib_pci_bind_to_uio ( vlib_pci_addr_t *  addr,
char *  uio_drv_name 
)

Definition at line 330 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vlib_pci_addr_t* vlib_pci_get_addr ( vlib_pci_dev_handle_t  h)

Definition at line 142 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vlib_pci_addr_t* vlib_pci_get_all_dev_addrs ( )

Definition at line 1027 of file pci.c.

+ Here is the caller graph for this function:

vlib_pci_device_info_t* vlib_pci_get_device_info ( vlib_pci_addr_t *  addr,
clib_error_t **  error 
)

Definition at line 156 of file pci.c.

+ Here is the caller graph for this function:

uword vlib_pci_get_private_data ( vlib_pci_dev_handle_t  h)

Definition at line 128 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vlib_pci_map_resource ( vlib_pci_dev_handle_t  h,
u32  resource,
void **  result 
)

Definition at line 927 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vlib_pci_map_resource_fixed ( vlib_pci_dev_handle_t  h,
u32  resource,
u8 addr,
void **  result 
)

Definition at line 933 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* vlib_pci_map_resource_int ( vlib_pci_dev_handle_t  h,
u32  resource,
u8 addr,
void **  result 
)
static

Definition at line 872 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vlib_pci_read_write_config ( vlib_pci_dev_handle_t  h,
vlib_read_or_write_t  read_or_write,
uword  address,
void *  data,
u32  n_bytes 
)

Definition at line 851 of file pci.c.

+ Here is the call graph for this function:

void vlib_pci_set_private_data ( vlib_pci_dev_handle_t  h,
uword  private_data 
)

Definition at line 135 of file pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

linux_pci_main_t linux_pci_main

Definition at line 153 of file pci.c.

char* sysfs_mod_vfio_noiommu
static
Initial value:
=
"/sys/module/vfio/parameters/enable_unsafe_noiommu_mode"

Definition at line 59 of file pci.c.

const char* sysfs_pci_dev_path = "/sys/bus/pci/devices"
static

Definition at line 57 of file pci.c.

const char* sysfs_pci_drv_path = "/sys/bus/pci/drivers"
static

Definition at line 58 of file pci.c.