FD.io VPP  v20.05-21-gb1500e9ff
Vector Packet Processing
rdma.h File Reference
+ Include dependency graph for rdma.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rdma_mlx5_wqe_t
 
struct  rdma_rxq_t
 
struct  rdma_txq_t
 
struct  rdma_device_t
 
struct  rdma_per_thread_data_t
 
struct  rdma_main_t
 
struct  rdma_create_if_args_t
 
struct  rdma_input_trace_t
 

Macros

#define foreach_rdma_device_flags
 
#define MLX5_ETH_L2_INLINE_HEADER_SIZE   18
 
#define RDMA_MLX5_WQE_SZ   sizeof(rdma_mlx5_wqe_t)
 
#define RDMA_MLX5_WQE_DS   (RDMA_MLX5_WQE_SZ/sizeof(struct mlx5_wqe_data_seg))
 
#define RDMA_TXQ_DV_INVALID_ID   0xffffffff
 
#define RDMA_TXQ_BUF_SZ(txq)   (1U << (txq)->bufs_log2sz)
 
#define RDMA_TXQ_DV_SQ_SZ(txq)   (1U << (txq)->dv_sq_log2sz)
 
#define RDMA_TXQ_DV_CQ_SZ(txq)   (1U << (txq)->dv_cq_log2sz)
 
#define RDMA_TXQ_USED_SZ(head, tail)   ((u16)((u16)(tail) - (u16)(head)))
 
#define RDMA_TXQ_AVAIL_SZ(txq, head, tail)   ((u16)(RDMA_TXQ_BUF_SZ (txq) - RDMA_TXQ_USED_SZ (head, tail)))
 
#define foreach_rdma_tx_func_error
 

Enumerations

enum  { foreach_rdma_device_flags }
 
enum  rdma_mode_t { RDMA_MODE_AUTO = 0, RDMA_MODE_IBV, RDMA_MODE_DV }
 
enum  rdma_tx_func_error_t { RDMA_TX_N_ERROR }
 

Functions

 STATIC_ASSERT (RDMA_MLX5_WQE_SZ==MLX5_SEND_WQE_BB &&RDMA_MLX5_WQE_SZ % sizeof(struct mlx5_wqe_data_seg)==0, "bad size")
 
 STATIC_ASSERT_OFFSET_OF (rdma_txq_t, cacheline1, 64)
 
 STATIC_ASSERT_OFFSET_OF (rdma_txq_t, cacheline2, 128)
 
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)
 

Variables

rdma_main_t rdma_main
 
vlib_node_registration_t rdma_input_node
 (constructor) VLIB_REGISTER_NODE (rdma_input_node) More...
 
vnet_device_class_t rdma_device_class
 
format_function_t format_rdma_device
 
format_function_t format_rdma_device_name
 
format_function_t format_rdma_input_trace
 
format_function_t format_rdma_rxq
 
unformat_function_t unformat_rdma_create_if_args
 

Macro Definition Documentation

◆ foreach_rdma_device_flags

#define foreach_rdma_device_flags
Value:
_(0, ERROR, "error") \
_(1, ADMIN_UP, "admin-up") \
_(2, LINK_UP, "link-up") \
_(3, PROMISC, "promiscuous") \
_(4, MLX5DV, "mlx5dv")

Definition at line 28 of file rdma.h.

◆ foreach_rdma_tx_func_error

#define foreach_rdma_tx_func_error
Value:
_(SEGMENT_SIZE_EXCEEDED, "segment size exceeded") \
_(NO_FREE_SLOTS, "no free tx slots") \
_(SUBMISSION, "tx submission errors") \
_(COMPLETION, "tx completion errors")

Definition at line 246 of file rdma.h.

◆ MLX5_ETH_L2_INLINE_HEADER_SIZE

#define MLX5_ETH_L2_INLINE_HEADER_SIZE   18

Definition at line 43 of file rdma.h.

◆ RDMA_MLX5_WQE_DS

#define RDMA_MLX5_WQE_DS   (RDMA_MLX5_WQE_SZ/sizeof(struct mlx5_wqe_data_seg))

Definition at line 64 of file rdma.h.

◆ RDMA_MLX5_WQE_SZ

#define RDMA_MLX5_WQE_SZ   sizeof(rdma_mlx5_wqe_t)

Definition at line 63 of file rdma.h.

◆ RDMA_TXQ_AVAIL_SZ

#define RDMA_TXQ_AVAIL_SZ (   txq,
  head,
  tail 
)    ((u16)(RDMA_TXQ_BUF_SZ (txq) - RDMA_TXQ_USED_SZ (head, tail)))

Definition at line 148 of file rdma.h.

◆ RDMA_TXQ_BUF_SZ

#define RDMA_TXQ_BUF_SZ (   txq)    (1U << (txq)->bufs_log2sz)

Definition at line 143 of file rdma.h.

◆ RDMA_TXQ_DV_CQ_SZ

#define RDMA_TXQ_DV_CQ_SZ (   txq)    (1U << (txq)->dv_cq_log2sz)

Definition at line 145 of file rdma.h.

◆ RDMA_TXQ_DV_INVALID_ID

#define RDMA_TXQ_DV_INVALID_ID   0xffffffff

Definition at line 141 of file rdma.h.

◆ RDMA_TXQ_DV_SQ_SZ

#define RDMA_TXQ_DV_SQ_SZ (   txq)    (1U << (txq)->dv_sq_log2sz)

Definition at line 144 of file rdma.h.

◆ RDMA_TXQ_USED_SZ

#define RDMA_TXQ_USED_SZ (   head,
  tail 
)    ((u16)((u16)(tail) - (u16)(head)))

Definition at line 147 of file rdma.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
foreach_rdma_device_flags 

Definition at line 35 of file rdma.h.

◆ rdma_mode_t

Enumerator
RDMA_MODE_AUTO 
RDMA_MODE_IBV 
RDMA_MODE_DV 

Definition at line 205 of file rdma.h.

◆ rdma_tx_func_error_t

Enumerator
RDMA_TX_N_ERROR 

Definition at line 252 of file rdma.h.

Function Documentation

◆ rdma_create_if()

void rdma_create_if ( vlib_main_t vm,
rdma_create_if_args_t args 
)

Definition at line 703 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 861 of file device.c.

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

◆ STATIC_ASSERT()

STATIC_ASSERT ( RDMA_MLX5_WQE_SZ  = =MLX5_SEND_WQE_BB &&RDMA_MLX5_WQE_SZ % sizeof(struct mlx5_wqe_data_seg)==0,
"bad size  
)

◆ STATIC_ASSERT_OFFSET_OF() [1/2]

STATIC_ASSERT_OFFSET_OF ( rdma_txq_t  ,
cacheline1  ,
64   
)

◆ STATIC_ASSERT_OFFSET_OF() [2/2]

STATIC_ASSERT_OFFSET_OF ( rdma_txq_t  ,
cacheline2  ,
128   
)

Variable Documentation

◆ format_rdma_device

format_function_t format_rdma_device

Definition at line 233 of file rdma.h.

◆ format_rdma_device_name

format_function_t format_rdma_device_name

Definition at line 234 of file rdma.h.

◆ format_rdma_input_trace

format_function_t format_rdma_input_trace

Definition at line 235 of file rdma.h.

◆ format_rdma_rxq

format_function_t format_rdma_rxq

Definition at line 236 of file rdma.h.

◆ rdma_device_class

vnet_device_class_t rdma_device_class

◆ rdma_input_node

vlib_node_registration_t rdma_input_node

(constructor) VLIB_REGISTER_NODE (rdma_input_node)

Definition at line 655 of file input.c.

◆ rdma_main

rdma_main_t rdma_main

Definition at line 46 of file device.c.

◆ unformat_rdma_create_if_args

unformat_function_t unformat_rdma_create_if_args

Definition at line 237 of file rdma.h.