Skip to contentSkip to conversation

RDS: IB: Initialize max_items based on underlying device attributes

PATCH Superseded Avinash Repaka 2 participants 2 messages Oct 4, 2017

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDS: IB: Initialize max_items based on underlying device attributes

Use max_1m_mrs/max_8k_mrs while setting max_items, as the former variables are set based on the underlying device attricutes.

---
 net/rds/ib_rdma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/rds/ib_rdma.c +2 -2
index 9a3c54e..e678699 100644
@@ -601,11 +601,11 @@ struct rds_ib_mr_pool *rds_ib_create_mr_pool(struct rds_ib_device *rds_ibdev,
 	if (pool_type == RDS_IB_MR_1M_POOL) {
 		/* +1 allows for unaligned MRs */
 		pool->fmr_attr.max_pages = RDS_MR_1M_MSG_SIZE + 1;
-		pool->max_items = RDS_MR_1M_POOL_SIZE;
+		pool->max_items = rds_ibdev->max_1m_mrs;
 	} else {
 		/* pool_type == RDS_IB_MR_8K_POOL */
 		pool->fmr_attr.max_pages = RDS_MR_8K_MSG_SIZE + 1;
-		pool->max_items = RDS_MR_8K_POOL_SIZE;
+		pool->max_items = rds_ibdev->max_8k_mrs;
 	}
 
 	pool->max_free_pinned = pool->max_items * pool->fmr_attr.max_pages / 4;
Signature · 1 line
2.4.11
Acked-by on v1 1/1
#1 lore raw

Hi Avinash,

Quoted 3 lines · Avinash Repaka

Use max_1m_mrs/max_8k_mrs while setting max_items, as the former variables are set based on the underlying device attricutes.

s/attricutes/attributes

Quoted 5 lines
---
  net/rds/ib_rdma.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

This patch is fine but it will be nice if you can collect these changes in series as you are trying to update the FRWR support. Like this patch and other cleanup patch you posted yesterday.

With that log fixed,