linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IB/mlx: Expose max_fmr to ib_query_device
@ 2015-10-29 16:07 Yuval Shaia
       [not found] ` <1446134879-20456-1-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Yuval Shaia @ 2015-10-29 16:07 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Expose max_fmr so it will be available to ULPs.
max_fmr is num_mpts minus reserved.

Signed-off-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/mlx4/main.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index efecdf0..4f9ff35 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -475,6 +475,7 @@ static int mlx4_ib_query_device(struct ib_device *ibdev,
 	props->max_mcast_qp_attach = dev->dev->caps.num_qp_per_mgm;
 	props->max_total_mcast_qp_attach = props->max_mcast_qp_attach *
 					   props->max_mcast_grp;
+	props->max_fmr = dev->dev->caps.num_mpts - dev->dev->caps.reserved_mrws;
 	props->max_map_per_fmr = dev->dev->caps.max_fmr_maps;
 	props->hca_core_clock = dev->dev->caps.hca_core_clock * 1000UL;
 	props->timestamp_mask = 0xFFFFFFFFFFFFULL;
-- 
1.7.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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-05 12:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-29 16:07 [PATCH] IB/mlx: Expose max_fmr to ib_query_device Yuval Shaia
     [not found] ` <1446134879-20456-1-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-10-29 17:21   ` Sagi Grimberg
     [not found]     ` <563255A9.1050705-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-11-05 10:48       ` Yuval Shaia
2015-11-05 10:51         ` Christoph Hellwig
     [not found]           ` <20151105105128.GA24381-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-11-05 11:07             ` Yuval Shaia
2015-11-05 11:10               ` Christoph Hellwig
     [not found]                 ` <20151105111035.GA25203-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-11-05 12:12                   ` Yuval Shaia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).