+
+ union
+ {
+ struct
+ {
+ /* ibverb datapath. Cache of cq, sq below */
+ struct ibv_cq *ibv_cq;
+ struct ibv_qp *ibv_qp;
+ };
+ struct
+ {
+ /* direct verbs datapath */
+ rdma_mlx5_wqe_t *dv_sq_wqes;
+ volatile u32 *dv_sq_dbrec;
+ volatile u64 *dv_sq_db;
+ struct mlx5_cqe64 *dv_cq_cqes;
+ volatile u32 *dv_cq_dbrec;
+ };
+ };
+
+ u32 *bufs; /* vlib_buffer ring buffer */
+ u16 head;
+ u16 tail;
+ u16 dv_cq_idx; /* monotonic CQE index (valid only for direct verbs) */
+ u8 bufs_log2sz; /* log2 vlib_buffer entries */
+ u8 dv_sq_log2sz:4; /* log2 SQ WQE entries (valid only for direct verbs) */
+ u8 dv_cq_log2sz:4; /* log2 CQ CQE entries (valid only for direct verbs) */
+ STRUCT_MARK (cacheline1);
+
+ /* WQE template (valid only for direct verbs) */
+ u8 dv_wqe_tmpl[64];
+
+ /* end of 2nd 64-bytes cacheline (or 1st 128-bytes cacheline) */
+ STRUCT_MARK (cacheline2);
+
+ /* fields below are not accessed in datapath */