Browse Source

IB/mlx5: Fix RC transport send queue overhead computation

Fix the RC QPs send queue overhead computation to take into account
two additional segments in the WQE which are needed for registration
operations.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Eli Cohen 11 years ago
parent
commit
9e65dc371b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      drivers/infiniband/hw/mlx5/qp.c

+ 3 - 1
drivers/infiniband/hw/mlx5/qp.c

@@ -216,7 +216,9 @@ static int sq_overhead(enum ib_qp_type qp_type)
 
 
 	case IB_QPT_UC:
 	case IB_QPT_UC:
 		size += sizeof(struct mlx5_wqe_ctrl_seg) +
 		size += sizeof(struct mlx5_wqe_ctrl_seg) +
-			sizeof(struct mlx5_wqe_raddr_seg);
+			sizeof(struct mlx5_wqe_raddr_seg) +
+			sizeof(struct mlx5_wqe_umr_ctrl_seg) +
+			sizeof(struct mlx5_mkey_seg);
 		break;
 		break;
 
 
 	case IB_QPT_UD:
 	case IB_QPT_UD: