提交 d4cb0784 编写于 作者: O Or Gerlitz 提交者: Roland Dreier

IB/mthca: Fill in max_map_per_fmr device attribute

Report the true max_map_per_fmr value from mthca_query_device(),
taking into account the change in FMR remapping introduced by the
Sinai performance optimization.
Signed-off-by: NOr Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 6eddb5cb
...@@ -115,6 +115,16 @@ static int mthca_query_device(struct ib_device *ibdev, ...@@ -115,6 +115,16 @@ static int mthca_query_device(struct ib_device *ibdev,
props->max_mcast_qp_attach = MTHCA_QP_PER_MGM; props->max_mcast_qp_attach = MTHCA_QP_PER_MGM;
props->max_total_mcast_qp_attach = props->max_mcast_qp_attach * props->max_total_mcast_qp_attach = props->max_mcast_qp_attach *
props->max_mcast_grp; props->max_mcast_grp;
/*
* If Sinai memory key optimization is being used, then only
* the 8-bit key portion will change. For other HCAs, the
* unused index bits will also be used for FMR remapping.
*/
if (mdev->mthca_flags & MTHCA_FLAG_SINAI_OPT)
props->max_map_per_fmr = 255;
else
props->max_map_per_fmr =
(1 << (32 - long_log2(mdev->limits.num_mpts))) - 1;
err = 0; err = 0;
out: out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册