FD.io VPP  v17.04.2-2-ga8f93f8
Vector Packet Processing
pci.h File Reference
+ Include dependency graph for pci.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vlib_pci_device
 
struct  pci_device_id_t
 
struct  vlib_pci_main_t
 

Macros

#define PCI_REGISTER_DEVICE(x, ...)
 

Typedefs

typedef struct vlib_pci_device vlib_pci_device_t
 
typedef struct _pci_device_registration pci_device_registration_t
 

Functions

typedef CLIB_PACKED (union{struct{u16 domain;u8 bus;u8 slot:5;u8 function:3;};u32 as_u32;}) vlib_pci_addr_t
 
clib_error_tvlib_pci_bind_to_uio (vlib_pci_device_t *d, char *uio_driver_name)
 
clib_error_tvlib_pci_read_write_config (vlib_pci_device_t *dev, vlib_read_or_write_t read_or_write, uword address, void *data, u32 n_bytes)
 
static clib_error_tvlib_pci_intr_enable (vlib_pci_device_t *dev)
 
static clib_error_tvlib_pci_intr_disable (vlib_pci_device_t *dev)
 
static clib_error_tvlib_pci_bus_master_enable (vlib_pci_device_t *dev)
 
clib_error_tvlib_pci_map_resource (vlib_pci_device_t *dev, u32 resource, void **result)
 
clib_error_tvlib_pci_map_resource_fixed (vlib_pci_device_t *dev, u32 resource, u8 *addr, void **result)
 
vlib_pci_device_tvlib_get_pci_device (vlib_pci_addr_t *addr)
 
void vlib_pci_free_device (vlib_pci_device_t *dev)
 

Variables

vlib_pci_main_t pci_main
 
unformat_function_t unformat_vlib_pci_addr
 
format_function_t format_vlib_pci_addr
 
format_function_t format_vlib_pci_handle
 
format_function_t format_vlib_pci_link_speed
 
format_function_t format_vlib_pci_vpd
 

Macro Definition Documentation

#define PCI_REGISTER_DEVICE (   x,
  ... 
)
Value:
__VA_ARGS__ pci_device_registration_t x; \
static void __vlib_add_pci_device_registration_##x (void) \
__attribute__((__constructor__)) ; \
static void __vlib_add_pci_device_registration_##x (void) \
{ \
vlib_pci_main_t * pm = &pci_main; \
x.next_registration = pm->pci_device_registrations; \
pm->pci_device_registrations = &x; \
} \
pci_device_registration_t * pci_device_registrations
Definition: pci.h:117
vlib_pci_main_t pci_main
Definition: pci.c:53
struct _pci_device_registration pci_device_registration_t

Definition at line 123 of file pci.h.

Typedef Documentation

typedef struct _pci_device_registration pci_device_registration_t

Function Documentation

typedef CLIB_PACKED ( union{struct{u16 domain;u8 bus;u8 slot:5;u8 function:3;};u32 as_u32;}  )
vlib_pci_device_t* vlib_get_pci_device ( vlib_pci_addr_t *  addr)

Definition at line 56 of file pci.c.

+ Here is the caller graph for this function:

clib_error_t* vlib_pci_bind_to_uio ( vlib_pci_device_t d,
char *  uio_driver_name 
)

Definition at line 95 of file linux_pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* vlib_pci_bus_master_enable ( vlib_pci_device_t dev)
inlinestatic

Definition at line 207 of file pci.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vlib_pci_free_device ( vlib_pci_device_t dev)

Definition at line 397 of file linux_pci.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* vlib_pci_intr_disable ( vlib_pci_device_t dev)
inlinestatic

Definition at line 191 of file pci.h.

static clib_error_t* vlib_pci_intr_enable ( vlib_pci_device_t dev)
inlinestatic

Definition at line 175 of file pci.h.

+ Here is the caller graph for this function:

clib_error_t* vlib_pci_map_resource ( vlib_pci_device_t dev,
u32  resource,
void **  result 
)

Definition at line 381 of file linux_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_device_t dev,
u32  resource,
u8 addr,
void **  result 
)

Definition at line 389 of file linux_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_device_t dev,
vlib_read_or_write_t  read_or_write,
uword  address,
void *  data,
u32  n_bytes 
)

Definition at line 302 of file linux_pci.c.

Variable Documentation

format_function_t format_vlib_pci_addr

Definition at line 238 of file pci.h.

format_function_t format_vlib_pci_handle

Definition at line 239 of file pci.h.

format_function_t format_vlib_pci_link_speed

Definition at line 240 of file pci.h.

format_function_t format_vlib_pci_vpd

Definition at line 241 of file pci.h.

vlib_pci_main_t pci_main

Definition at line 53 of file pci.c.

unformat_function_t unformat_vlib_pci_addr

Definition at line 237 of file pci.h.