FD.io VPP  v20.01-48-g3e0dafb74
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 clib_error_trdma_mac_change (vnet_hw_interface_t *hw, const u8 *old, const u8 *new)
 
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

◆ rdma_log

#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.

◆ rdma_log__

#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:99
rdma_main_t rdma_main
Definition: device.c:46

Definition at line 48 of file device.c.

Function Documentation

◆ rdma_async_event_cleanup()

static void rdma_async_event_cleanup ( rdma_device_t rd)
static

Definition at line 334 of file device.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rdma_async_event_error_ready()

static clib_error_t* rdma_async_event_error_ready ( clib_file_t f)
static

Definition at line 265 of file device.c.

+ Here is the caller graph for this function:

◆ rdma_async_event_init()

static clib_error_t* rdma_async_event_init ( rdma_device_t rd)
static

Definition at line 308 of file device.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rdma_async_event_read_ready()

static clib_error_t* rdma_async_event_read_ready ( clib_file_t f)
static

Definition at line 273 of file device.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rdma_create_if()

void rdma_create_if ( vlib_main_t vm,
rdma_create_if_args_t args 
)

Definition at line 580 of file device.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rdma_delete_if()

void rdma_delete_if ( vlib_main_t vm,
rdma_device_t rd 
)

Definition at line 730 of file device.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rdma_dev_change_mtu()

static u32 rdma_dev_change_mtu ( rdma_device_t rd)
static

Definition at line 171 of file device.c.

+ Here is the caller graph for this function:

◆ rdma_dev_cleanup()

static void rdma_dev_cleanup ( rdma_device_t rd)
static

Definition at line 356 of file device.c.

+ Here is the caller graph for this function:

◆ rdma_dev_init()

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 521 of file device.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rdma_dev_set_promisc()

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:

◆ rdma_dev_set_ucast()

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:

◆ rdma_flag_change()

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

Definition at line 178 of file device.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rdma_init()

clib_error_t* rdma_init ( vlib_main_t vm)

Definition at line 796 of file device.c.

+ Here is the call graph for this function:

◆ rdma_interface_admin_up_down()

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

Definition at line 738 of file device.c.

+ Here is the call graph for this function:

◆ rdma_mac_change()

static clib_error_t* rdma_mac_change ( vnet_hw_interface_t hw,
const u8 old,
const u8 new 
)
static

Definition at line 157 of file device.c.

+ Here is the call graph for this function:

◆ rdma_register_interface()

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

Definition at line 340 of file device.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rdma_rxq_destroy_flow()

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:

◆ rdma_rxq_finalize()

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

Definition at line 431 of file device.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rdma_rxq_init()

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

Definition at line 398 of file device.c.

+ Here is the caller graph for this function:

◆ rdma_rxq_init_flow()

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:

◆ rdma_set_interface_next_node()

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

Definition at line 763 of file device.c.

+ Here is the call graph for this function:

◆ rdma_txq_init()

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

Definition at line 474 of file device.c.

+ Here is the caller graph for this function:

◆ rdma_unregister_interface()

static void rdma_unregister_interface ( vnet_main_t vnm,
rdma_device_t rd 
)
static

Definition at line 348 of file device.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rdma_update_state()

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

Definition at line 198 of file device.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sysfs_path_to_pci_addr()

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

Definition at line 562 of file device.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VNET_DEVICE_CLASS()

VNET_DEVICE_CLASS ( rdma_device_class  )

Variable Documentation

◆ rdma_main

rdma_main_t rdma_main

Definition at line 46 of file device.c.

◆ rdma_rss_hash_key

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.

◆ rdma_tx_func_error_strings

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

Definition at line 775 of file device.c.