# \[PATCH 2/2\] mlx4: Fix the SQ size of an RC QP to support masked atomic operation

- From: Dotan Barak \<hidden\>
- Date: 2011-08-31 13:29:37 
- List: linux-rdma
- Page: https://ratatoskr.run/linux-rdma/2011/08/15416031
- Thread: https://ratatoskr.run/linux-rdma/2011/08/15416031/t.md

```text
When calculating the required size of an RC QP send queue, leave enough space
for masked atomic operation (which requires more space than "regular" atomic
operation).

Signed-off-by: Dotan Barak <redacted>
Reviewed-by: Eli Cohen <redacted>
---
 drivers/infiniband/hw/mlx4/qp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index c825567..d094552 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -312,7 +312,7 @@ static int send_wqe_overhead(enum ib_qp_type type, u32 flags)
 	case IB_QPT_XRC:
 	case IB_QPT_RC:
 		return sizeof (struct mlx4_wqe_ctrl_seg) +
-			sizeof (struct mlx4_wqe_atomic_seg) +
+			sizeof (struct mlx4_wqe_masked_atomic_seg) +
 			sizeof (struct mlx4_wqe_raddr_seg);
 	case IB_QPT_SMI:
 	case IB_QPT_GSI:
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
```
