@@ -83,6 +83,26 @@ uint64_t comp_mask;
.in -8
};
+struct mlx4dv_rwq {
+.in +8
+__be32 *rdb;
+struct {
+.in +8
+uint32_t wqe_cnt;
+int wqe_shift;
+int offset;
+.in -8
+} rq;
+struct {
+.in +8
+void *buf;
+size_t length;
+.in -8
+} buf;
+uint64_t comp_mask;
+.in -8
+};
+
struct mlx4dv_obj {
.in +8
struct {
@@ -419,6 +419,24 @@ static int mlx4dv_get_srq(struct ibv_srq *srq_in,
return 0;
}
+static int mlx4dv_get_rwq(struct ibv_wq *wq_in, struct mlx4dv_rwq *wq_out)
+{
+ struct mlx4_qp *mqp = wq_to_mqp(wq_in);
+
+ wq_out->comp_mask = 0;
+
+ wq_out->buf.buf = mqp->buf.buf;
+ wq_out->buf.length = mqp->buf.length;
+
+ wq_out->rdb = mqp->db;
+
+ wq_out->rq.wqe_cnt = mqp->rq.wqe_cnt;
+ wq_out->rq.wqe_shift = mqp->rq.wqe_shift;
+ wq_out->rq.offset = mqp->rq.offset;
+
+ return 0;
+}
+
int mlx4dv_init_obj(struct mlx4dv_obj *obj, uint64_t obj_type)
{
int ret = 0;
@@ -429,6 +447,8 @@ int mlx4dv_init_obj(struct mlx4dv_obj *obj, uint64_t obj_type)
ret = mlx4dv_get_cq(obj->cq.in, obj->cq.out);
if (!ret && (obj_type & MLX4DV_OBJ_SRQ))
ret = mlx4dv_get_srq(obj->srq.in, obj->srq.out);
+ if (!ret && (obj_type & MLX4DV_OBJ_RWQ))
+ ret = mlx4dv_get_rwq(obj->rwq.in, obj->rwq.out);
return ret;
}
@@ -197,6 +197,20 @@ struct mlx4dv_srq {
uint64_t comp_mask;
};
+struct mlx4dv_rwq {
+ __be32 *rdb;
+ struct {
+ uint32_t wqe_cnt;
+ int wqe_shift;
+ int offset;
+ } rq;
+ struct {
+ void *buf;
+ size_t length;
+ } buf;
+ uint64_t comp_mask;
+};
+
struct mlx4dv_obj {
struct {
struct ibv_qp *in;
@@ -210,12 +224,17 @@ struct mlx4dv_obj {
struct ibv_srq *in;
struct mlx4dv_srq *out;
} srq;
+ struct {
+ struct ibv_wq *in;
+ struct mlx4dv_rwq *out;
+ } rwq;
};
enum mlx4dv_obj_type {
MLX4DV_OBJ_QP = 1 << 0,
MLX4DV_OBJ_CQ = 1 << 1,
MLX4DV_OBJ_SRQ = 1 << 2,
+ MLX4DV_OBJ_RWQ = 1 << 3,
};
/*