Skip to content

Commit

Permalink
IB/mlx5: Add create and destroy functionality for Raw Packet QP
Browse files Browse the repository at this point in the history
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 <majd@mellanox.com>
Reviewed-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
majdmellanox authored and dledford committed Jan 21, 2016
1 parent 19098df commit 0fb2ed6
Show file tree
Hide file tree
Showing 3 changed files with 365 additions and 18 deletions.
28 changes: 27 additions & 1 deletion drivers/infiniband/hw/mlx5/mlx5_ib.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,35 @@ struct mlx5_ib_qp_trans {
u8 resp_depth;
};

struct mlx5_ib_rq {
struct mlx5_ib_qp_base base;
struct mlx5_ib_wq *rq;
struct mlx5_ib_ubuffer ubuffer;
struct mlx5_db *doorbell;
u32 tirn;
u8 state;
};

struct mlx5_ib_sq {
struct mlx5_ib_qp_base base;
struct mlx5_ib_wq *sq;
struct mlx5_ib_ubuffer ubuffer;
struct mlx5_db *doorbell;
u32 tisn;
u8 state;
};

struct mlx5_ib_raw_packet_qp {
struct mlx5_ib_sq sq;
struct mlx5_ib_rq rq;
};

struct mlx5_ib_qp {
struct ib_qp ibqp;
struct mlx5_ib_qp_trans trans_qp;
union {
struct mlx5_ib_qp_trans trans_qp;
struct mlx5_ib_raw_packet_qp raw_packet_qp;
};
struct mlx5_buf buf;

struct mlx5_db db;
Expand Down

0 comments on commit 0fb2ed6

Please sign in to comment.