Skip to content

Commit 2ac6bf4

Browse files
Jack MorgensteinRoland Dreier
authored andcommitted
IB/mlx4: Add strong ordering to local inval and fast reg work requests
The ConnectX Programmer's Reference Manual states that the "SO" bit must be set when posting Fast Register and Local Invalidate send work requests. When this bit is set, the work request will be executed only after all previous work requests on the send queue have been executed. (If the bit is not set, Fast Register and Local Invalidate WQEs may begin execution too early, which violates the defined semantics for these operations) This fixes the issue with NFS/RDMA reported in <http://lists.openfabrics.org/pipermail/general/2009-April/059253.html> Signed-off-by: Jack Morgenstein <[email protected]> Cc: <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
1 parent ab6bf42 commit 2ac6bf4

File tree

2 files changed

+5
-0
lines changed
  • drivers/infiniband/hw/mlx4
  • include/linux/mlx4

2 files changed

+5
-0
lines changed

drivers/infiniband/hw/mlx4/qp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,12 +1585,16 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
15851585
break;
15861586

15871587
case IB_WR_LOCAL_INV:
1588+
ctrl->srcrb_flags |=
1589+
cpu_to_be32(MLX4_WQE_CTRL_STRONG_ORDER);
15881590
set_local_inv_seg(wqe, wr->ex.invalidate_rkey);
15891591
wqe += sizeof (struct mlx4_wqe_local_inval_seg);
15901592
size += sizeof (struct mlx4_wqe_local_inval_seg) / 16;
15911593
break;
15921594

15931595
case IB_WR_FAST_REG_MR:
1596+
ctrl->srcrb_flags |=
1597+
cpu_to_be32(MLX4_WQE_CTRL_STRONG_ORDER);
15941598
set_fmr_seg(wqe, wr);
15951599
wqe += sizeof (struct mlx4_wqe_fmr_seg);
15961600
size += sizeof (struct mlx4_wqe_fmr_seg) / 16;

include/linux/mlx4/qp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ enum {
165165
MLX4_WQE_CTRL_IP_CSUM = 1 << 4,
166166
MLX4_WQE_CTRL_TCP_UDP_CSUM = 1 << 5,
167167
MLX4_WQE_CTRL_INS_VLAN = 1 << 6,
168+
MLX4_WQE_CTRL_STRONG_ORDER = 1 << 7,
168169
};
169170

170171
struct mlx4_wqe_ctrl_seg {

0 commit comments

Comments
 (0)