diff mbox series

[rdma-next,08/10] net/rds: Enable Relaxed Ordering

Message ID 20210405052404.213889-9-leon@kernel.org
State New
Headers show
Series Enable relaxed ordering for ULPs | expand

Commit Message

Leon Romanovsky April 5, 2021, 5:24 a.m. UTC
From: Avihai Horon <avihaih@nvidia.com>

Enable Relaxed Ordering for rds.

Relaxed Ordering is an optional access flag and as such, it is ignored
by vendors that don't support it.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 net/rds/ib_frmr.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/net/rds/ib_frmr.c b/net/rds/ib_frmr.c
index 694eb916319e..1a60c2c90c78 100644
--- a/net/rds/ib_frmr.c
+++ b/net/rds/ib_frmr.c
@@ -76,7 +76,7 @@  static struct rds_ib_mr *rds_ib_alloc_frmr(struct rds_ib_device *rds_ibdev,
 
 	frmr = &ibmr->u.frmr;
 	frmr->mr = ib_alloc_mr(rds_ibdev->pd, IB_MR_TYPE_MEM_REG,
-			       pool->max_pages, 0);
+			       pool->max_pages, IB_ACCESS_RELAXED_ORDERING);
 	if (IS_ERR(frmr->mr)) {
 		pr_warn("RDS/IB: %s failed to allocate MR", __func__);
 		err = PTR_ERR(frmr->mr);
@@ -156,9 +156,8 @@  static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr)
 	reg_wr.wr.num_sge = 0;
 	reg_wr.mr = frmr->mr;
 	reg_wr.key = frmr->mr->rkey;
-	reg_wr.access = IB_ACCESS_LOCAL_WRITE |
-			IB_ACCESS_REMOTE_READ |
-			IB_ACCESS_REMOTE_WRITE;
+	reg_wr.access = IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_READ |
+			IB_ACCESS_REMOTE_WRITE | IB_ACCESS_RELAXED_ORDERING;
 	reg_wr.wr.send_flags = IB_SEND_SIGNALED;
 
 	ret = ib_post_send(ibmr->ic->i_cm_id->qp, &reg_wr.wr, NULL);