Skip to content

Commit 0fb2ed6

Browse files
majdmellanoxdledford
authored andcommitted
IB/mlx5: Add create and destroy functionality for Raw Packet QP
This patch adds support for Raw Packet QP for the mlx5 device. Raw Packet QP, unlike other QP types, has no matching mlx5_core_qp object but rather it is built of RQ/SQ/TIR/TIS/TD mlx5_core object. Since the SQ and RQ work-queue (WQ) buffers are not contiguous like other QPs, we allocate separate buffers in the user-space and pass the address of each one of them separately to the kernel. Signed-off-by: Majd Dibbiny <[email protected]> Reviewed-by: Matan Barak <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent 19098df commit 0fb2ed6

File tree

3 files changed

+365
-18
lines changed

3 files changed

+365
-18
lines changed

drivers/infiniband/hw/mlx5/mlx5_ib.h

+27-1
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,35 @@ struct mlx5_ib_qp_trans {
211211
u8 resp_depth;
212212
};
213213

214+
struct mlx5_ib_rq {
215+
struct mlx5_ib_qp_base base;
216+
struct mlx5_ib_wq *rq;
217+
struct mlx5_ib_ubuffer ubuffer;
218+
struct mlx5_db *doorbell;
219+
u32 tirn;
220+
u8 state;
221+
};
222+
223+
struct mlx5_ib_sq {
224+
struct mlx5_ib_qp_base base;
225+
struct mlx5_ib_wq *sq;
226+
struct mlx5_ib_ubuffer ubuffer;
227+
struct mlx5_db *doorbell;
228+
u32 tisn;
229+
u8 state;
230+
};
231+
232+
struct mlx5_ib_raw_packet_qp {
233+
struct mlx5_ib_sq sq;
234+
struct mlx5_ib_rq rq;
235+
};
236+
214237
struct mlx5_ib_qp {
215238
struct ib_qp ibqp;
216-
struct mlx5_ib_qp_trans trans_qp;
239+
union {
240+
struct mlx5_ib_qp_trans trans_qp;
241+
struct mlx5_ib_raw_packet_qp raw_packet_qp;
242+
};
217243
struct mlx5_buf buf;
218244

219245
struct mlx5_db db;

0 commit comments

Comments
 (0)