FD.io VPP  v21.10.1-2-g0a485f517
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, u16 ether_type, 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, u8 no_multi_seg, u16 max_pktlen)
 
static uint64_t rdma_rss42ibv (const rdma_rss4_t rss4)
 
static uint64_t rdma_rss62ibv (const rdma_rss6_t rss6)
 
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, rdma_create_if_args_t *args)
 
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 58 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)

Definition at line 50 of file device.c.

Function Documentation

◆ rdma_async_event_cleanup()

static void rdma_async_event_cleanup ( rdma_device_t rd)
static

Definition at line 350 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 281 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 324 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 289 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 881 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 1052 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 187 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 380 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,
rdma_create_if_args_t args 
)
static

Definition at line 813 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 112 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 135 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 194 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 1116 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 1060 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 173 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 356 of file device.c.

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

◆ rdma_rss42ibv()

static uint64_t rdma_rss42ibv ( const rdma_rss4_t  rss4)
static

Definition at line 615 of file device.c.

+ Here is the caller graph for this function:

◆ rdma_rss62ibv()

static uint64_t rdma_rss62ibv ( const rdma_rss6_t  rss6)
static

Definition at line 634 of file device.c.

+ 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 96 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 653 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,
u8  no_multi_seg,
u16  max_pktlen 
)
static

Definition at line 425 of file device.c.

+ Here is the call graph for this function:
+ 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,
u16  ether_type,
u32  flags 
)
static

Definition at line 62 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 1085 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 714 of file device.c.

+ Here is the call graph for this function:
+ 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 373 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 214 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 863 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 47 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 34 of file device.c.

◆ rdma_tx_func_error_strings

char* rdma_tx_func_error_strings[]
static
Initial value:
= {
#define _(n,s)
}

Definition at line 1097 of file device.c.

foreach_rdma_tx_func_error
#define foreach_rdma_tx_func_error
Definition: rdma.h:314
f
vlib_frame_t * f
Definition: interface_output.c:1098
rdma_main_t::log_class
vlib_log_class_t log_class
Definition: rdma.h:262
rdma_main
rdma_main_t rdma_main
Definition: device.c:47