mlx4_ib: XRC RCV qp implementation.
Subsystems (2)
PATCH v2 4/4 mlx4_ib: XRC RCV qp implementation.
RE-sending with correct subject line (should be V2).
Support for XRC RCV-only QP (requested by userspace, but resides in kernel space).
Implements create_xrc_rcv_qp, modify_xrc_rcv_qp, query_xrc_rcv_qp, and destroy_xrc_rcv_qp.
Since query_xrc_rcv_qp and query_qp are very similar, the common portions have been placed in a helper function which is invoked by both query methods.
Signed-off-by Jack Morgenstein <[email protected]>
--- drivers/infiniband/hw/mlx4/cq.c | 4 +- drivers/infiniband/hw/mlx4/main.c | 60 ++++++++-- drivers/infiniband/hw/mlx4/mlx4_ib.h | 13 ++ drivers/infiniband/hw/mlx4/qp.c | 208 +++++++++++++++++++++++++++++++++- 4 files changed, 272 insertions(+), 13 deletions(-)
drivers/infiniband/hw/mlx4/cq.c +2 -2
@@ -176,7 +176,7 @@ struct ib_cq *mlx4_ib_create_cq(struct iif (entries <1 || entries > dev->dev->caps.max_cqes)return ERR_PTR (-EINVAL ); - cq =kmalloc (sizeof *cq,GFP_KERNEL ); + cq =kzalloc (sizeof *cq,GFP_KERNEL );if (!cq)return ERR_PTR (-ENOMEM );
@@ -545,7 +545,7 @@ static int mlx4_ib_poll_one(struct mlx4_struct mlx4_cqe *cqe;struct mlx4_qp *mqp;struct mlx4_ib_wq *wq; -struct mlx4_ib_srq *srq; +struct mlx4_ib_srq *uninitialized_var (srq );struct mlx4_srq *msrq;int is_send;int is_error;
drivers/infiniband/hw/mlx4/main.c +53 -9
113 lines not on this page · raw message
drivers/infiniband/hw/mlx4/mlx4_ib.h +13 -0
@@ -59,6 +59,8 @@ struct mlx4_ib_pd {struct mlx4_ib_xrcd {struct ib_xrcd ibxrcd;u32 xrcdn; +struct ib_pd *pd; +struct ib_cq *cq; };struct mlx4_ib_cq_buf {
@@ -115,6 +117,7 @@ struct mlx4_ib_wq {enum mlx4_ib_qp_flags {MLX4_IB_QP_LSO =1 <<0 ,MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK =1 <<1 , +MLX4_IB_XRC_RCV =1 <<2 , };struct mlx4_ib_qp {
@@ -181,6 +184,7 @@ struct mlx4_ib_dev {spinlock_t sm_lock;struct mutex cap_mask_mutex; +struct mutex xrc_rcv_mutex;bool ib_active; };
@@ -329,6 +333,15 @@ int mlx4_ib_map_phys_fmr(struct ib_fmr * u64 iova);int mlx4_ib_unmap_fmr (struct list_head *fmr_list);int mlx4_ib_fmr_dealloc (struct ib_fmr *fmr); +int mlx4_ib_create_xrc_rcv_qp (struct ib_qp_init_attr *init_attr, +u32 *qp_num); +int mlx4_ib_modify_xrc_rcv_qp (struct ib_xrcd *xrcd,u32 qp_num, +struct ib_qp_attr *attr,int attr_mask); +int mlx4_ib_query_xrc_rcv_qp (struct ib_xrcd *xrcd,u32 qp_num, +struct ib_qp_attr *attr,int attr_mask, +struct ib_qp_init_attr *init_attr); +int mlx4_ib_destroy_xrc_rcv_qp (struct ib_xrcd *xrcd,u32 qp_num); +static inline int mlx4_ib_ah_grh_present (struct mlx4_ib_ah *ah) {
drivers/infiniband/hw/mlx4/qp.c +195 -20
258 lines not on this page · raw message
-------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html