FD.io VPP  v21.06
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 RDMA_RXQ_MAX_CHAIN_LOG_SZ   3 /* This should NOT be lower than 3! */
 
#define RDMA_RXQ_MAX_CHAIN_SZ   (1U << RDMA_RXQ_MAX_CHAIN_LOG_SZ)
 
#define RDMA_RXQ_LEGACY_MODE_MAX_CHAIN_SZ   5
 
#define foreach_rdma_tx_func_error
 

Enumerations

enum  { foreach_rdma_device_flags }
 
enum  rdma_rss4_t { RDMA_RSS4_AUTO = 0, RDMA_RSS4_IP, RDMA_RSS4_IP_UDP, RDMA_RSS4_IP_TCP }
 
enum  rdma_rss6_t { RDMA_RSS6_AUTO = 0, RDMA_RSS6_IP, RDMA_RSS6_IP_UDP, RDMA_RSS6_IP_TCP }
 
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") \
_(5, STRIDING_RQ, "striding-rq")

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 314 of file rdma.h.

◆ MLX5_ETH_L2_INLINE_HEADER_SIZE

#define MLX5_ETH_L2_INLINE_HEADER_SIZE   18

Definition at line 44 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 65 of file rdma.h.

◆ RDMA_MLX5_WQE_SZ

#define RDMA_MLX5_WQE_SZ   sizeof(rdma_mlx5_wqe_t)

Definition at line 64 of file rdma.h.

◆ RDMA_RXQ_LEGACY_MODE_MAX_CHAIN_SZ

#define RDMA_RXQ_LEGACY_MODE_MAX_CHAIN_SZ   5

Definition at line 176 of file rdma.h.

◆ RDMA_RXQ_MAX_CHAIN_LOG_SZ

#define RDMA_RXQ_MAX_CHAIN_LOG_SZ   3 /* This should NOT be lower than 3! */

Definition at line 174 of file rdma.h.

◆ RDMA_RXQ_MAX_CHAIN_SZ

#define RDMA_RXQ_MAX_CHAIN_SZ   (1U << RDMA_RXQ_MAX_CHAIN_LOG_SZ)

Definition at line 175 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 173 of file rdma.h.

◆ RDMA_TXQ_BUF_SZ

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

Definition at line 168 of file rdma.h.

◆ RDMA_TXQ_DV_CQ_SZ

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

Definition at line 170 of file rdma.h.

◆ RDMA_TXQ_DV_INVALID_ID

#define RDMA_TXQ_DV_INVALID_ID   0xffffffff

Definition at line 166 of file rdma.h.

◆ RDMA_TXQ_DV_SQ_SZ

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

Definition at line 169 of file rdma.h.

◆ RDMA_TXQ_USED_SZ

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

Definition at line 172 of file rdma.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
foreach_rdma_device_flags 

Definition at line 36 of file rdma.h.

◆ rdma_mode_t

Enumerator
RDMA_MODE_AUTO 
RDMA_MODE_IBV 
RDMA_MODE_DV 

Definition at line 268 of file rdma.h.

◆ rdma_rss4_t

Enumerator
RDMA_RSS4_AUTO 
RDMA_RSS4_IP 
RDMA_RSS4_IP_UDP 
RDMA_RSS4_IP_TCP 

Definition at line 178 of file rdma.h.

◆ rdma_rss6_t

Enumerator
RDMA_RSS6_AUTO 
RDMA_RSS6_IP 
RDMA_RSS6_IP_UDP 
RDMA_RSS6_IP_TCP 

Definition at line 186 of file rdma.h.

◆ rdma_tx_func_error_t

Enumerator
RDMA_TX_N_ERROR 

Definition at line 320 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 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:

◆ 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 301 of file rdma.h.

◆ format_rdma_device_name

format_function_t format_rdma_device_name

Definition at line 302 of file rdma.h.

◆ format_rdma_input_trace

format_function_t format_rdma_input_trace

Definition at line 303 of file rdma.h.

◆ format_rdma_rxq

format_function_t format_rdma_rxq

Definition at line 304 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 1045 of file input.c.

◆ rdma_main

rdma_main_t rdma_main

Definition at line 47 of file device.c.

◆ unformat_rdma_create_if_args

unformat_function_t unformat_rdma_create_if_args

Definition at line 305 of file rdma.h.