21 #include <infiniband/verbs.h> 28 #define foreach_rdma_device_flags \ 29 _(0, ERROR, "error") \ 30 _(1, ADMIN_UP, "admin-up") \ 31 _(2, LINK_UP, "link-up") \ 32 _(3, PROMISC, "promiscuous") \ 33 _(4, MLX5DV, "mlx5dv") 37 #define _(a, b, c) RDMA_DEVICE_F_##b = (1 << a), 42 #ifndef MLX5_ETH_L2_INLINE_HEADER_SIZE 43 #define MLX5_ETH_L2_INLINE_HEADER_SIZE 18 51 struct mlx5_wqe_ctrl_seg ctrl;
60 struct mlx5_wqe_eth_seg eseg;
61 struct mlx5_wqe_data_seg dseg;
63 #define RDMA_MLX5_WQE_SZ sizeof(rdma_mlx5_wqe_t) 64 #define RDMA_MLX5_WQE_DS (RDMA_MLX5_WQE_SZ/sizeof(struct mlx5_wqe_data_seg)) 141 #define RDMA_TXQ_DV_INVALID_ID 0xffffffff 143 #define RDMA_TXQ_BUF_SZ(txq) (1U << (txq)->bufs_log2sz) 144 #define RDMA_TXQ_DV_SQ_SZ(txq) (1U << (txq)->dv_sq_log2sz) 145 #define RDMA_TXQ_DV_CQ_SZ(txq) (1U << (txq)->dv_cq_log2sz) 147 #define RDMA_TXQ_USED_SZ(head, tail) ((u16)((u16)(tail) - (u16)(head))) 148 #define RDMA_TXQ_AVAIL_SZ(txq, head, tail) ((u16)(RDMA_TXQ_BUF_SZ (txq) - RDMA_TXQ_USED_SZ (head, tail))) 246 #define foreach_rdma_tx_func_error \ 247 _(SEGMENT_SIZE_EXCEEDED, "segment size exceeded") \ 248 _(NO_FREE_SLOTS, "no free tx slots") \ 249 _(SUBMISSION, "tx submission errors") \ 250 _(COMPLETION, "tx completion errors") 254 #define _(f,s) RDMA_TX_ERROR_##f,
volatile u32 * dv_sq_dbrec
struct mlx5_cqe64 * dv_cq_cqes
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
void rdma_delete_if(vlib_main_t *vm, rdma_device_t *rd)
rdma_mlx5_wqe_t * dv_sq_wqes
format_function_t format_rdma_device
void rdma_create_if(vlib_main_t *vm, rdma_create_if_args_t *args)
vlib_pci_device_info_t * pci
volatile u32 * dv_cq_dbrec
u32 per_interface_next_index
format_function_t format_rdma_input_trace
#define STRUCT_MARK(mark)
struct _vnet_device_class vnet_device_class_t
vlib_log_class_t log_class
rdma_per_thread_data_t * per_thread_data
unformat_function_t unformat_rdma_create_if_args
format_function_t format_rdma_rxq
vlib_buffer_t buffer_template
struct ibv_rwq_ind_table * rx_rwq_ind_tbl
STATIC_ASSERT(RDMA_MLX5_WQE_SZ==MLX5_SEND_WQE_BB &&RDMA_MLX5_WQE_SZ % sizeof(struct mlx5_wqe_data_seg)==0, "bad size")
vlib_node_registration_t rdma_input_node
(constructor) VLIB_REGISTER_NODE (rdma_input_node)
STATIC_ASSERT_OFFSET_OF(rdma_txq_t, cacheline1, 64)
format_function_t format_rdma_device_name
vnet_device_class_t rdma_device_class
struct _vlib_node_registration vlib_node_registration_t
#define CLIB_ALIGN_MARK(name, alignment)
u32 async_event_clib_file_index
VLIB buffer representation.
#define foreach_rdma_tx_func_error
#define foreach_rdma_device_flags
struct ibv_flow * flow_ucast
struct ibv_flow * flow_mcast