All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-next] IB/mlx5: Report correctly tag matching rendezvous capability
@ 2019-07-05 16:21 Leon Romanovsky
  2019-07-05 17:15 ` Jason Gunthorpe
  2019-07-08 17:39 ` Jason Gunthorpe
  0 siblings, 2 replies; 5+ messages in thread
From: Leon Romanovsky @ 2019-07-05 16:21 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Danit Goldberg, RDMA mailing list, Artemy Kovalyov, Yishai Hadas,
	Leon Romanovsky

From: Danit Goldberg <danitg@mellanox.com>

Tag matching with rendezvous offload for RC transport is controlled
by FW and before this change, it was advertised to user as supported
without any relation to FW.

Separate tag matching for rendezvous and eager protocols, so users
will see real capabilities.

Cc: <stable@vger.kernel.org> # 4.13
Fixes: eb761894351d ("IB/mlx5: Fill XRQ capabilities")
Signed-off-by: Danit Goldberg <danitg@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/infiniband/hw/mlx5/main.c | 8 ++++++--
 include/rdma/ib_verbs.h           | 4 ++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 07a05b0b9e42..c2a5780cb394 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -1046,15 +1046,19 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
 	}
 
 	if (MLX5_CAP_GEN(mdev, tag_matching)) {
-		props->tm_caps.max_rndv_hdr_size = MLX5_TM_MAX_RNDV_MSG_SIZE;
 		props->tm_caps.max_num_tags =
 			(1 << MLX5_CAP_GEN(mdev, log_tag_matching_list_sz)) - 1;
-		props->tm_caps.flags = IB_TM_CAP_RC;
 		props->tm_caps.max_ops =
 			1 << MLX5_CAP_GEN(mdev, log_max_qp_sz);
 		props->tm_caps.max_sge = MLX5_TM_MAX_SGE;
 	}
 
+	if (MLX5_CAP_GEN(mdev, tag_matching) &&
+	    MLX5_CAP_GEN(mdev, rndv_offload_rc)) {
+		props->tm_caps.flags = IB_TM_CAP_RNDV_RC;
+		props->tm_caps.max_rndv_hdr_size = MLX5_TM_MAX_RNDV_MSG_SIZE;
+	}
+
 	if (MLX5_CAP_GEN(dev->mdev, cq_moderation)) {
 		props->cq_caps.max_cq_moderation_count =
 						MLX5_MAX_CQ_COUNT;
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 30eb68f36109..c5f8a9f17063 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -308,8 +308,8 @@ struct ib_rss_caps {
 };
 
 enum ib_tm_cap_flags {
-	/*  Support tag matching on RC transport */
-	IB_TM_CAP_RC		    = 1 << 0,
+	/*  Support tag matching with rendezvous offload for RC transport */
+	IB_TM_CAP_RNDV_RC = 1 << 0,
 };
 
 struct ib_tm_caps {
-- 
2.20.1


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

* Re: [PATCH rdma-next] IB/mlx5: Report correctly tag matching rendezvous capability
  2019-07-05 16:21 [PATCH rdma-next] IB/mlx5: Report correctly tag matching rendezvous capability Leon Romanovsky
@ 2019-07-05 17:15 ` Jason Gunthorpe
  2019-07-06 16:35   ` Leon Romanovsky
  2019-07-08 17:39 ` Jason Gunthorpe
  1 sibling, 1 reply; 5+ messages in thread
From: Jason Gunthorpe @ 2019-07-05 17:15 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, Danit Goldberg, RDMA mailing list, Artemy Kovalyov,
	Yishai Hadas, Leon Romanovsky

On Fri, Jul 05, 2019 at 07:21:57PM +0300, Leon Romanovsky wrote:
> From: Danit Goldberg <danitg@mellanox.com>
> 
> Tag matching with rendezvous offload for RC transport is controlled
> by FW and before this change, it was advertised to user as supported
> without any relation to FW.
> 
> Separate tag matching for rendezvous and eager protocols, so users
> will see real capabilities.
> 
> Cc: <stable@vger.kernel.org> # 4.13
> Fixes: eb761894351d ("IB/mlx5: Fill XRQ capabilities")
> Signed-off-by: Danit Goldberg <danitg@mellanox.com>
> Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
> Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
>  drivers/infiniband/hw/mlx5/main.c | 8 ++++++--
>  include/rdma/ib_verbs.h           | 4 ++--
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
> index 07a05b0b9e42..c2a5780cb394 100644
> +++ b/drivers/infiniband/hw/mlx5/main.c
> @@ -1046,15 +1046,19 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
>  	}
>  
>  	if (MLX5_CAP_GEN(mdev, tag_matching)) {
> -		props->tm_caps.max_rndv_hdr_size = MLX5_TM_MAX_RNDV_MSG_SIZE;
>  		props->tm_caps.max_num_tags =
>  			(1 << MLX5_CAP_GEN(mdev, log_tag_matching_list_sz)) - 1;
> -		props->tm_caps.flags = IB_TM_CAP_RC;
>  		props->tm_caps.max_ops =
>  			1 << MLX5_CAP_GEN(mdev, log_max_qp_sz);
>  		props->tm_caps.max_sge = MLX5_TM_MAX_SGE;
>  	}
>  
> +	if (MLX5_CAP_GEN(mdev, tag_matching) &&
> +	    MLX5_CAP_GEN(mdev, rndv_offload_rc)) {
> +		props->tm_caps.flags = IB_TM_CAP_RNDV_RC;
> +		props->tm_caps.max_rndv_hdr_size = MLX5_TM_MAX_RNDV_MSG_SIZE;
> +	}
> +
>  	if (MLX5_CAP_GEN(dev->mdev, cq_moderation)) {
>  		props->cq_caps.max_cq_moderation_count =
>  						MLX5_MAX_CQ_COUNT;
> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> index 30eb68f36109..c5f8a9f17063 100644
> +++ b/include/rdma/ib_verbs.h
> @@ -308,8 +308,8 @@ struct ib_rss_caps {
>  };
>  
>  enum ib_tm_cap_flags {
> -	/*  Support tag matching on RC transport */
> -	IB_TM_CAP_RC		    = 1 << 0,
> +	/*  Support tag matching with rendezvous offload for RC transport */
> +	IB_TM_CAP_RNDV_RC = 1 << 0,
>  };

This is in the wrong header, right?

Jason

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

* Re: [PATCH rdma-next] IB/mlx5: Report correctly tag matching rendezvous capability
  2019-07-05 17:15 ` Jason Gunthorpe
@ 2019-07-06 16:35   ` Leon Romanovsky
  2019-07-08 17:26     ` Jason Gunthorpe
  0 siblings, 1 reply; 5+ messages in thread
From: Leon Romanovsky @ 2019-07-06 16:35 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Doug Ledford, Danit Goldberg, RDMA mailing list, Artemy Kovalyov,
	Yishai Hadas

On Fri, Jul 05, 2019 at 05:15:59PM +0000, Jason Gunthorpe wrote:
> On Fri, Jul 05, 2019 at 07:21:57PM +0300, Leon Romanovsky wrote:
> > From: Danit Goldberg <danitg@mellanox.com>
> >
> > Tag matching with rendezvous offload for RC transport is controlled
> > by FW and before this change, it was advertised to user as supported
> > without any relation to FW.
> >
> > Separate tag matching for rendezvous and eager protocols, so users
> > will see real capabilities.
> >
> > Cc: <stable@vger.kernel.org> # 4.13
> > Fixes: eb761894351d ("IB/mlx5: Fill XRQ capabilities")
> > Signed-off-by: Danit Goldberg <danitg@mellanox.com>
> > Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
> > Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
> > Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> >  drivers/infiniband/hw/mlx5/main.c | 8 ++++++--
> >  include/rdma/ib_verbs.h           | 4 ++--
> >  2 files changed, 8 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
> > index 07a05b0b9e42..c2a5780cb394 100644
> > +++ b/drivers/infiniband/hw/mlx5/main.c
> > @@ -1046,15 +1046,19 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
> >  	}
> >
> >  	if (MLX5_CAP_GEN(mdev, tag_matching)) {
> > -		props->tm_caps.max_rndv_hdr_size = MLX5_TM_MAX_RNDV_MSG_SIZE;
> >  		props->tm_caps.max_num_tags =
> >  			(1 << MLX5_CAP_GEN(mdev, log_tag_matching_list_sz)) - 1;
> > -		props->tm_caps.flags = IB_TM_CAP_RC;
> >  		props->tm_caps.max_ops =
> >  			1 << MLX5_CAP_GEN(mdev, log_max_qp_sz);
> >  		props->tm_caps.max_sge = MLX5_TM_MAX_SGE;
> >  	}
> >
> > +	if (MLX5_CAP_GEN(mdev, tag_matching) &&
> > +	    MLX5_CAP_GEN(mdev, rndv_offload_rc)) {
> > +		props->tm_caps.flags = IB_TM_CAP_RNDV_RC;
> > +		props->tm_caps.max_rndv_hdr_size = MLX5_TM_MAX_RNDV_MSG_SIZE;
> > +	}
> > +
> >  	if (MLX5_CAP_GEN(dev->mdev, cq_moderation)) {
> >  		props->cq_caps.max_cq_moderation_count =
> >  						MLX5_MAX_CQ_COUNT;
> > diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> > index 30eb68f36109..c5f8a9f17063 100644
> > +++ b/include/rdma/ib_verbs.h
> > @@ -308,8 +308,8 @@ struct ib_rss_caps {
> >  };
> >
> >  enum ib_tm_cap_flags {
> > -	/*  Support tag matching on RC transport */
> > -	IB_TM_CAP_RC		    = 1 << 0,
> > +	/*  Support tag matching with rendezvous offload for RC transport */
> > +	IB_TM_CAP_RNDV_RC = 1 << 0,
> >  };
>
> This is in the wrong header, right?

It predates our all-to-uapi headers approach and moving to UAPI this struct
is definitely too much for a fix which should go to stable@.

Thanks

>
> Jason

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

* Re: [PATCH rdma-next] IB/mlx5: Report correctly tag matching rendezvous capability
  2019-07-06 16:35   ` Leon Romanovsky
@ 2019-07-08 17:26     ` Jason Gunthorpe
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2019-07-08 17:26 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, Danit Goldberg, RDMA mailing list, Artemy Kovalyov,
	Yishai Hadas

On Sat, Jul 06, 2019 at 07:35:23PM +0300, Leon Romanovsky wrote:
> > > diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> > > index 30eb68f36109..c5f8a9f17063 100644
> > > +++ b/include/rdma/ib_verbs.h
> > > @@ -308,8 +308,8 @@ struct ib_rss_caps {
> > >  };
> > >
> > >  enum ib_tm_cap_flags {
> > > -	/*  Support tag matching on RC transport */
> > > -	IB_TM_CAP_RC		    = 1 << 0,
> > > +	/*  Support tag matching with rendezvous offload for RC transport */
> > > +	IB_TM_CAP_RNDV_RC = 1 << 0,
> > >  };
> >
> > This is in the wrong header, right?
> 
> It predates our all-to-uapi headers approach and moving to UAPI this struct
> is definitely too much for a fix which should go to stable@.

Well, lets send a patch to fix it please

Jason

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

* Re: [PATCH rdma-next] IB/mlx5: Report correctly tag matching rendezvous capability
  2019-07-05 16:21 [PATCH rdma-next] IB/mlx5: Report correctly tag matching rendezvous capability Leon Romanovsky
  2019-07-05 17:15 ` Jason Gunthorpe
@ 2019-07-08 17:39 ` Jason Gunthorpe
  1 sibling, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2019-07-08 17:39 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, Danit Goldberg, RDMA mailing list, Artemy Kovalyov,
	Yishai Hadas, Leon Romanovsky

On Fri, Jul 05, 2019 at 07:21:57PM +0300, Leon Romanovsky wrote:
> From: Danit Goldberg <danitg@mellanox.com>
> 
> Tag matching with rendezvous offload for RC transport is controlled
> by FW and before this change, it was advertised to user as supported
> without any relation to FW.
> 
> Separate tag matching for rendezvous and eager protocols, so users
> will see real capabilities.
> 
> Cc: <stable@vger.kernel.org> # 4.13
> Fixes: eb761894351d ("IB/mlx5: Fill XRQ capabilities")
> Signed-off-by: Danit Goldberg <danitg@mellanox.com>
> Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
> Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> ---
>  drivers/infiniband/hw/mlx5/main.c | 8 ++++++--
>  include/rdma/ib_verbs.h           | 4 ++--
>  2 files changed, 8 insertions(+), 4 deletions(-)

This is a bit late, but ince this is for stable, applied to for-next, thanks
 
Jason

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

end of thread, other threads:[~2019-07-08 17:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-05 16:21 [PATCH rdma-next] IB/mlx5: Report correctly tag matching rendezvous capability Leon Romanovsky
2019-07-05 17:15 ` Jason Gunthorpe
2019-07-06 16:35   ` Leon Romanovsky
2019-07-08 17:26     ` Jason Gunthorpe
2019-07-08 17:39 ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.