FD.io VPP  v19.08-27-gf4dcae4
Vector Packet Processing
device.c File Reference
+ Include dependency graph for device.c:

Go to the source code of this file.

Macros

#define rdma_log__(lvl, dev, f, ...)
 
#define rdma_log(lvl, dev, f, ...)   rdma_log__((lvl), (dev), "%s (%d): " f, strerror(errno), errno, ##__VA_ARGS__)
 

Functions

static struct ibv_flow * rdma_rxq_init_flow (const rdma_device_t *rd, struct ibv_qp *qp, const mac_address_t *mac, const mac_address_t *mask, u32 flags)
 
static u32 rdma_rxq_destroy_flow (const rdma_device_t *rd, struct ibv_flow **flow)
 
static u32 rdma_dev_set_promisc (rdma_device_t *rd)
 
static u32 rdma_dev_set_ucast (rdma_device_t *rd)
 
static u32 rdma_dev_change_mtu (rdma_device_t *rd)
 
static u32 rdma_flag_change (vnet_main_t *vnm, vnet_hw_interface_t *hw, u32 flags)
 
static void rdma_update_state (vnet_main_t *vnm, rdma_device_t *rd, int port)
 
static clib_error_trdma_async_event_error_ready (clib_file_t *f)
 
static clib_error_trdma_async_event_read_ready (clib_file_t *f)
 
static clib_error_trdma_async_event_init (rdma_device_t *rd)
 
static void rdma_async_event_cleanup (rdma_device_t *rd)
 
static clib_error_trdma_register_interface (vnet_main_t *vnm, rdma_device_t *rd)
 
static void rdma_unregister_interface (vnet_main_t *vnm, rdma_device_t *rd)
 
static void rdma_dev_cleanup (rdma_device_t *rd)
 
static clib_error_trdma_rxq_init (vlib_main_t *vm, rdma_device_t *rd, u16 qid, u32 n_desc)
 
static clib_error_trdma_rxq_finalize (vlib_main_t *vm, rdma_device_t *rd)
 
static clib_error_trdma_txq_init (vlib_main_t *vm, rdma_device_t *rd, u16 qid, u32 n_desc)
 
static clib_error_trdma_dev_init (vlib_main_t *vm, rdma_device_t *rd, u32 rxq_size, u32 txq_size, u32 rxq_num)
 
static uword sysfs_path_to_pci_addr (char *path, vlib_pci_addr_t *addr)
 
void rdma_create_if (vlib_main_t *vm, rdma_create_if_args_t *args)
 
void rdma_delete_if (vlib_main_t *vm, rdma_device_t *rd)
 
static clib_error_trdma_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
static void rdma_set_interface_next_node (vnet_main_t *vnm, u32 hw_if_index, u32 node_index)
 
 VNET_DEVICE_CLASS (rdma_device_class,)
 
clib_error_trdma_init (vlib_main_t *vm)
 

Variables

static u8 rdma_rss_hash_key []
 
rdma_main_t rdma_main
 
static char * rdma_tx_func_error_strings []
 

Macro Definition Documentation

#define rdma_log (   lvl,
  dev,
  f,
  ... 
)    rdma_log__((lvl), (dev), "%s (%d): " f, strerror(errno), errno, ##__VA_ARGS__)

Definition at line 54 of file device.c.

#define rdma_log__ (   lvl,
  dev,
  f,
  ... 
)
Value:
do { \
vlib_log((lvl), rdma_main.log_class, "%s: " f, \
&(dev)->name, ##__VA_ARGS__); \
} while (0)
vlib_log_class_t log_class
Definition: rdma.h:90
rdma_main_t rdma_main
Definition: device.c:46
void vlib_log(vlib_log_level_t level, vlib_log_class_t class, char *fmt,...)
Definition: log.c:87

Definition at line 48 of file device.c.

Function Documentation

static void rdma_async_event_cleanup ( rdma_device_t rd)
static

Definition at line 323 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* rdma_async_event_error_ready ( clib_file_t f)
static

Definition at line 251 of file device.c.

+ Here is the caller graph for this function:

static clib_error_t* rdma_async_event_init ( rdma_device_t rd)
static

Definition at line 296 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* rdma_async_event_read_ready ( clib_file_t f)
static

Definition at line 260 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void rdma_create_if ( vlib_main_t vm,
rdma_create_if_args_t args 
)

Definition at line 558 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void rdma_delete_if ( vlib_main_t vm,
rdma_device_t rd 
)

Definition at line 680 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 rdma_dev_change_mtu ( rdma_device_t rd)
static

Definition at line 157 of file device.c.

+ Here is the caller graph for this function:

static void rdma_dev_cleanup ( rdma_device_t rd)
static

Definition at line 345 of file device.c.

+ Here is the caller graph for this function:

static clib_error_t* rdma_dev_init ( vlib_main_t vm,
rdma_device_t rd,
u32  rxq_size,
u32  txq_size,
u32  rxq_num 
)
static

Definition at line 508 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 rdma_dev_set_promisc ( rdma_device_t rd)
static

Definition at line 102 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 rdma_dev_set_ucast ( rdma_device_t rd)
static

Definition at line 124 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 rdma_flag_change ( vnet_main_t vnm,
vnet_hw_interface_t hw,
u32  flags 
)
static

Definition at line 164 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* rdma_init ( vlib_main_t vm)

Definition at line 751 of file device.c.

+ Here is the call graph for this function:

static clib_error_t* rdma_interface_admin_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)
static

Definition at line 688 of file device.c.

+ Here is the call graph for this function:

static clib_error_t* rdma_register_interface ( vnet_main_t vnm,
rdma_device_t rd 
)
static

Definition at line 329 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 rdma_rxq_destroy_flow ( const rdma_device_t rd,
struct ibv_flow **  flow 
)
static

Definition at line 86 of file device.c.

+ Here is the caller graph for this function:

static clib_error_t* rdma_rxq_finalize ( vlib_main_t vm,
rdma_device_t rd 
)
static

Definition at line 418 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* rdma_rxq_init ( vlib_main_t vm,
rdma_device_t rd,
u16  qid,
u32  n_desc 
)
static

Definition at line 386 of file device.c.

+ Here is the caller graph for this function:

static struct ibv_flow* rdma_rxq_init_flow ( const rdma_device_t rd,
struct ibv_qp *  qp,
const mac_address_t mac,
const mac_address_t mask,
u32  flags 
)
static

Definition at line 58 of file device.c.

+ Here is the caller graph for this function:

static void rdma_set_interface_next_node ( vnet_main_t vnm,
u32  hw_if_index,
u32  node_index 
)
static

Definition at line 713 of file device.c.

+ Here is the call graph for this function:

static clib_error_t* rdma_txq_init ( vlib_main_t vm,
rdma_device_t rd,
u16  qid,
u32  n_desc 
)
static

Definition at line 461 of file device.c.

+ Here is the caller graph for this function:

static void rdma_unregister_interface ( vnet_main_t vnm,
rdma_device_t rd 
)
static

Definition at line 337 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rdma_update_state ( vnet_main_t vnm,
rdma_device_t rd,
int  port 
)
static

Definition at line 184 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword sysfs_path_to_pci_addr ( char *  path,
vlib_pci_addr_t *  addr 
)
static

Definition at line 543 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VNET_DEVICE_CLASS ( rdma_device_class  )

Variable Documentation

rdma_main_t rdma_main

Definition at line 46 of file device.c.

u8 rdma_rss_hash_key[]
static
Initial value:
= {
0x2c, 0xc6, 0x81, 0xd1,
0x5b, 0xdb, 0xf4, 0xf7,
0xfc, 0xa2, 0x83, 0x19,
0xdb, 0x1a, 0x3e, 0x94,
0x6b, 0x9e, 0x38, 0xd9,
0x2c, 0x9c, 0x03, 0xd1,
0xad, 0x99, 0x44, 0xa7,
0xd9, 0x56, 0x3d, 0x59,
0x06, 0x3c, 0x25, 0xf3,
0xfc, 0x1f, 0xdc, 0x2a,
}

Definition at line 33 of file device.c.

char* rdma_tx_func_error_strings[]
static
Initial value:
= {
#define _(n,s)
}
#define foreach_rdma_tx_func_error
Definition: rdma.h:126

Definition at line 731 of file device.c.