diff options
author | Damjan Marion <damarion@cisco.com> | 2020-03-12 11:56:00 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-03-16 19:09:39 +0000 |
commit | dd648aac0615c416507de9097b6f50db16ad319c (patch) | |
tree | 37a19fb2db728567f49aa1928f947b64edf55142 /src/plugins/rdma/rdma.h | |
parent | d35887297d6320efb36c24ef123480f27a736b16 (diff) |
rdma: add Mellanox mlx5 Direct Verbs receive support
Type: feature
Change-Id: I3f287ab536a482c366ad7df47e1c04e640992ebc
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/rdma/rdma.h')
-rw-r--r-- | src/plugins/rdma/rdma.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/plugins/rdma/rdma.h b/src/plugins/rdma/rdma.h index 302d2383cfe..1e2f3d9ea0e 100644 --- a/src/plugins/rdma/rdma.h +++ b/src/plugins/rdma/rdma.h @@ -23,12 +23,14 @@ #include <vlib/pci/pci.h> #include <vnet/interface.h> #include <vnet/ethernet/mac_address.h> +#include <rdma/rdma_mlx5dv.h> #define foreach_rdma_device_flags \ _(0, ERROR, "error") \ _(1, ADMIN_UP, "admin-up") \ _(2, LINK_UP, "link-up") \ - _(3, PROMISC, "promiscuous") + _(3, PROMISC, "promiscuous") \ + _(4, MLX5DV, "mlx5dv") enum { @@ -46,6 +48,18 @@ typedef struct u32 size; u32 head; u32 tail; + u32 cq_ci; + u16 log2_cq_size; + u16 n_mini_cqes; + u16 n_mini_cqes_left; + u16 last_cqe_flags; + mlx5dv_cqe_t *cqes; + mlx5dv_rwq_t *wqes; + volatile u32 *wq_db; + volatile u32 *cq_db; + u32 cqn; + u32 wqe_cnt; + u32 wq_stride; } rdma_rxq_t; typedef struct @@ -96,6 +110,12 @@ typedef struct typedef struct { CLIB_CACHE_LINE_ALIGN_MARK (cacheline0); + union + { + u16 cqe_flags[VLIB_FRAME_SIZE]; + u16x8 cqe_flags8[VLIB_FRAME_SIZE / 8]; + u16x16 cqe_flags16[VLIB_FRAME_SIZE / 16]; + }; vlib_buffer_t buffer_template; } rdma_per_thread_data_t; @@ -140,12 +160,14 @@ extern 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; typedef struct { u32 next_index; u32 hw_if_index; + u16 cqe_flags; } rdma_input_trace_t; #define foreach_rdma_tx_func_error \ |