Message ID | 1446134879-20456-1-git-send-email-yuval.shaia@oracle.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Hi Yuval, The title prefix should be IB/mlx4: > Expose max_fmr so it will be available to ULPs. > max_fmr is num_mpts minus reserved. > > Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> > --- > 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; Umm, this looks like a capability that needs to communicated from the device. Perhaps this needs to be added to CX3 FW? Or? -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Oct 29, 2015 at 07:21:45PM +0200, Sagi Grimberg wrote: > Hi Yuval, > > The title prefix should be IB/mlx4: > > >Expose max_fmr so it will be available to ULPs. > >max_fmr is num_mpts minus reserved. > > > >Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> > >--- > > 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; > > Umm, this looks like a capability that needs to communicated from the > device. Perhaps this needs to be added to CX3 FW? Or? Mellanox folks, can you review this driver change? > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Nov 05, 2015 at 12:48:45PM +0200, Yuval Shaia wrote: > On Thu, Oct 29, 2015 at 07:21:45PM +0200, Sagi Grimberg wrote: > > Hi Yuval, > > > > The title prefix should be IB/mlx4: > > > > >Expose max_fmr so it will be available to ULPs. > > >max_fmr is num_mpts minus reserved. What do you plan to use it for? We're aiming hard to get rid of FMRs from the whole kernel stack ASAP. In doubt whatever you plan to use it for should be converted to FRs instead. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Nov 05, 2015 at 02:51:28AM -0800, Christoph Hellwig wrote: > On Thu, Nov 05, 2015 at 12:48:45PM +0200, Yuval Shaia wrote: > > On Thu, Oct 29, 2015 at 07:21:45PM +0200, Sagi Grimberg wrote: > > > Hi Yuval, > > > > > > The title prefix should be IB/mlx4: > > > > > > >Expose max_fmr so it will be available to ULPs. > > > >max_fmr is num_mpts minus reserved. > > What do you plan to use it for? We're aiming hard to get rid of FMRs > from the whole kernel stack ASAP. We have two drivers that are using FMR. > > In doubt whatever you plan to use it for should be converted to FRs > instead. > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Nov 05, 2015 at 01:07:49PM +0200, Yuval Shaia wrote: > > What do you plan to use it for? We're aiming hard to get rid of FMRs > > from the whole kernel stack ASAP. > We have two drivers that are using FMR. I now RDS still has the totally silly separate code bases for IB vs iWrap and you need to move IB to use the IW code for memory registrations, but that's the second one? -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Nov 05, 2015 at 03:10:35AM -0800, Christoph Hellwig wrote: > On Thu, Nov 05, 2015 at 01:07:49PM +0200, Yuval Shaia wrote: > > > What do you plan to use it for? We're aiming hard to get rid of FMRs > > > from the whole kernel stack ASAP. > > We have two drivers that are using FMR. > > I now RDS still has the totally silly separate code bases for IB vs > iWrap and you need to move IB to use the IW code for memory > registrations, but that's the second one? Sorry, my mistake, only RDS. > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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;
Expose max_fmr so it will be available to ULPs. max_fmr is num_mpts minus reserved. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> --- drivers/infiniband/hw/mlx4/main.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)