All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next 0/5] RDMA/providers: Set max_pkey attribute
@ 2020-07-06  7:54 Kamal Heib
  2020-07-06  7:54 ` [PATCH for-next 1/5] RDMA/siw: Set max_pkeys attribute Kamal Heib
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Kamal Heib @ 2020-07-06  7:54 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe, Doug Ledford, Kamal Heib

This patch set makes sure to set the max_pkeys attribute to the providers
that aren't setting it or not setting it correctly.

Kamal Heib (5):
  RDMA/siw: Set max_pkeys attribute
  RDMA/efa: Set max_pkeys attribute
  RDMA/cxgb4: Set max_pkeys attribute
  RDMA/i40iw: Set max_pkeys attribute
  RDMA/usnic: Fix reported max_pkeys attribute

 drivers/infiniband/hw/cxgb4/provider.c       | 1 +
 drivers/infiniband/hw/efa/efa_verbs.c        | 1 +
 drivers/infiniband/hw/i40iw/i40iw_verbs.c    | 1 +
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +-
 drivers/infiniband/sw/siw/siw_verbs.c        | 1 +
 5 files changed, 5 insertions(+), 1 deletion(-)

-- 
2.25.4


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

* [PATCH for-next 1/5] RDMA/siw: Set max_pkeys attribute
  2020-07-06  7:54 [PATCH for-next 0/5] RDMA/providers: Set max_pkey attribute Kamal Heib
@ 2020-07-06  7:54 ` Kamal Heib
  2020-07-06  7:54 ` [PATCH for-next 2/5] RDMA/efa: " Kamal Heib
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Kamal Heib @ 2020-07-06  7:54 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe, Doug Ledford, Kamal Heib, Bernard Metzler

Make sure to set the max_pkeys attribute to indicate the maximum number
of partitions supported by the siw device.

Fixes: 303ae1cdfdf7 ("rdma/siw: application interface")
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Cc: Bernard Metzler <bmt@zurich.ibm.com> 
---
 drivers/infiniband/sw/siw/siw_verbs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/sw/siw/siw_verbs.c b/drivers/infiniband/sw/siw/siw_verbs.c
index 987e2ba05dbc..bef35d566aee 100644
--- a/drivers/infiniband/sw/siw/siw_verbs.c
+++ b/drivers/infiniband/sw/siw/siw_verbs.c
@@ -151,6 +151,7 @@ int siw_query_device(struct ib_device *base_dev, struct ib_device_attr *attr,
 	attr->max_srq = sdev->attrs.max_srq;
 	attr->max_srq_sge = sdev->attrs.max_srq_sge;
 	attr->max_srq_wr = sdev->attrs.max_srq_wr;
+	attr->max_pkeys = 1;
 	attr->page_size_cap = PAGE_SIZE;
 	attr->vendor_id = SIW_VENDOR_ID;
 	attr->vendor_part_id = sdev->vendor_part_id;
-- 
2.25.4


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

* [PATCH for-next 2/5] RDMA/efa: Set max_pkeys attribute
  2020-07-06  7:54 [PATCH for-next 0/5] RDMA/providers: Set max_pkey attribute Kamal Heib
  2020-07-06  7:54 ` [PATCH for-next 1/5] RDMA/siw: Set max_pkeys attribute Kamal Heib
@ 2020-07-06  7:54 ` Kamal Heib
  2020-07-06  7:58   ` Gal Pressman
  2020-07-06  7:54 ` [PATCH for-next 3/5] RDMA/cxgb4: " Kamal Heib
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Kamal Heib @ 2020-07-06  7:54 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe, Doug Ledford, Kamal Heib, Gal Pressman

Make sure to set the max_pkeys attribute to indicate the maximum number
of partitions supported by the efa device.

Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation")
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Cc: Gal Pressman <galpress@amazon.com>
---
 drivers/infiniband/hw/efa/efa_verbs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
index 08313f7c73bc..7dd082441333 100644
--- a/drivers/infiniband/hw/efa/efa_verbs.c
+++ b/drivers/infiniband/hw/efa/efa_verbs.c
@@ -212,6 +212,7 @@ int efa_query_device(struct ib_device *ibdev,
 	props->max_send_sge = dev_attr->max_sq_sge;
 	props->max_recv_sge = dev_attr->max_rq_sge;
 	props->max_sge_rd = dev_attr->max_wr_rdma_sge;
+	props->max_pkeys = 1;
 
 	if (udata && udata->outlen) {
 		resp.max_sq_sge = dev_attr->max_sq_sge;
-- 
2.25.4


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

* [PATCH for-next 3/5] RDMA/cxgb4: Set max_pkeys attribute
  2020-07-06  7:54 [PATCH for-next 0/5] RDMA/providers: Set max_pkey attribute Kamal Heib
  2020-07-06  7:54 ` [PATCH for-next 1/5] RDMA/siw: Set max_pkeys attribute Kamal Heib
  2020-07-06  7:54 ` [PATCH for-next 2/5] RDMA/efa: " Kamal Heib
@ 2020-07-06  7:54 ` Kamal Heib
  2020-07-06  7:54 ` [PATCH for-next 4/5] RDMA/i40iw: " Kamal Heib
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Kamal Heib @ 2020-07-06  7:54 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe, Doug Ledford, Kamal Heib, Potnuri Bharat Teja

Make sure to set the max_pkeys attribute to indicate the maximum number
of partitions supported by the cxgb4 device.

Fixes: cfdda9d76436 ("RDMA/cxgb4: Add driver for Chelsio T4 RNIC")
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Cc: Potnuri Bharat Teja <bharat@chelsio.com>
---
 drivers/infiniband/hw/cxgb4/provider.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/hw/cxgb4/provider.c b/drivers/infiniband/hw/cxgb4/provider.c
index 1d3ff59e4060..275b77234a22 100644
--- a/drivers/infiniband/hw/cxgb4/provider.c
+++ b/drivers/infiniband/hw/cxgb4/provider.c
@@ -298,6 +298,7 @@ static int c4iw_query_device(struct ib_device *ibdev, struct ib_device_attr *pro
 	props->local_ca_ack_delay = 0;
 	props->max_fast_reg_page_list_len =
 		t4_max_fr_depth(dev->rdev.lldi.ulptx_memwrite_dsgl && use_dsgl);
+	props->max_pkeys = 1;
 
 	return 0;
 }
-- 
2.25.4


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

* [PATCH for-next 4/5] RDMA/i40iw: Set max_pkeys attribute
  2020-07-06  7:54 [PATCH for-next 0/5] RDMA/providers: Set max_pkey attribute Kamal Heib
                   ` (2 preceding siblings ...)
  2020-07-06  7:54 ` [PATCH for-next 3/5] RDMA/cxgb4: " Kamal Heib
@ 2020-07-06  7:54 ` Kamal Heib
  2020-07-06  7:54 ` [PATCH for-next 5/5] RDMA/usnic: Fix reported " Kamal Heib
  2020-07-06  9:06 ` [PATCH for-next 0/5] RDMA/providers: Set max_pkey attribute Kamal Heib
  5 siblings, 0 replies; 9+ messages in thread
From: Kamal Heib @ 2020-07-06  7:54 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe, Doug Ledford, Kamal Heib, Shiraz Saleem

Make sure to set the max_pkeys attribute to indicate the maximum number
of partitions supported by the i40iw device.

Fixes: d37498417947 ("i40iw: add files for iwarp interface")
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Cc: Shiraz Saleem <shiraz.saleem@intel.com>
---
 drivers/infiniband/hw/i40iw/i40iw_verbs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
index 19af29a48c55..ef624fa5f07b 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
@@ -84,6 +84,7 @@ static int i40iw_query_device(struct ib_device *ibdev,
 	props->max_qp_init_rd_atom = props->max_qp_rd_atom;
 	props->atomic_cap = IB_ATOMIC_NONE;
 	props->max_fast_reg_page_list_len = I40IW_MAX_PAGES_PER_FMR;
+	props->max_pkeys = 1;
 	return 0;
 }
 
-- 
2.25.4


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

* [PATCH for-next 5/5] RDMA/usnic: Fix reported max_pkeys attribute
  2020-07-06  7:54 [PATCH for-next 0/5] RDMA/providers: Set max_pkey attribute Kamal Heib
                   ` (3 preceding siblings ...)
  2020-07-06  7:54 ` [PATCH for-next 4/5] RDMA/i40iw: " Kamal Heib
@ 2020-07-06  7:54 ` Kamal Heib
  2020-07-06  9:06 ` [PATCH for-next 0/5] RDMA/providers: Set max_pkey attribute Kamal Heib
  5 siblings, 0 replies; 9+ messages in thread
From: Kamal Heib @ 2020-07-06  7:54 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe, Doug Ledford, Kamal Heib, Christian Benvenuti

Make sure to report the right max_pkeys attribute value to indicate the
maximum number of partitions supported by the usnic device.

Fixes: e3cf00d0a87f ("IB/usnic: Add Cisco VIC low-level hardware driver")
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Cc: Christian Benvenuti <benve@cisco.com>
---
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
index b8a77ce11590..0cb2a73d46ee 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
@@ -309,7 +309,7 @@ int usnic_ib_query_device(struct ib_device *ibdev,
 	props->max_pd = USNIC_UIOM_MAX_PD_CNT;
 	props->max_mr = USNIC_UIOM_MAX_MR_CNT;
 	props->local_ca_ack_delay = 0;
-	props->max_pkeys = 0;
+	props->max_pkeys = 1;
 	props->atomic_cap = IB_ATOMIC_NONE;
 	props->masked_atomic_cap = props->atomic_cap;
 	props->max_qp_rd_atom = 0;
-- 
2.25.4


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

* Re: [PATCH for-next 2/5] RDMA/efa: Set max_pkeys attribute
  2020-07-06  7:54 ` [PATCH for-next 2/5] RDMA/efa: " Kamal Heib
@ 2020-07-06  7:58   ` Gal Pressman
  2020-07-06  8:16     ` Kamal Heib
  0 siblings, 1 reply; 9+ messages in thread
From: Gal Pressman @ 2020-07-06  7:58 UTC (permalink / raw)
  To: Kamal Heib, linux-rdma; +Cc: Jason Gunthorpe, Doug Ledford

On 06/07/2020 10:54, Kamal Heib wrote:
> Make sure to set the max_pkeys attribute to indicate the maximum number
> of partitions supported by the efa device.
> 
> Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation")
> Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> Cc: Gal Pressman <galpress@amazon.com>
> ---
>  drivers/infiniband/hw/efa/efa_verbs.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
> index 08313f7c73bc..7dd082441333 100644
> --- a/drivers/infiniband/hw/efa/efa_verbs.c
> +++ b/drivers/infiniband/hw/efa/efa_verbs.c
> @@ -212,6 +212,7 @@ int efa_query_device(struct ib_device *ibdev,
>  	props->max_send_sge = dev_attr->max_sq_sge;
>  	props->max_recv_sge = dev_attr->max_rq_sge;
>  	props->max_sge_rd = dev_attr->max_wr_rdma_sge;
> +	props->max_pkeys = 1;
>  
>  	if (udata && udata->outlen) {
>  		resp.max_sq_sge = dev_attr->max_sq_sge;
> 

Thanks Kamal, a similar patch was already merged:
f25022a53ef3 ("RDMA/efa: Set maximum pkeys device attribute")

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

* Re: [PATCH for-next 2/5] RDMA/efa: Set max_pkeys attribute
  2020-07-06  7:58   ` Gal Pressman
@ 2020-07-06  8:16     ` Kamal Heib
  0 siblings, 0 replies; 9+ messages in thread
From: Kamal Heib @ 2020-07-06  8:16 UTC (permalink / raw)
  To: Gal Pressman; +Cc: linux-rdma, Jason Gunthorpe, Doug Ledford

On Mon, Jul 06, 2020 at 10:58:34AM +0300, Gal Pressman wrote:
> On 06/07/2020 10:54, Kamal Heib wrote:
> > Make sure to set the max_pkeys attribute to indicate the maximum number
> > of partitions supported by the efa device.
> > 
> > Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation")
> > Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> > Cc: Gal Pressman <galpress@amazon.com>
> > ---
> >  drivers/infiniband/hw/efa/efa_verbs.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
> > index 08313f7c73bc..7dd082441333 100644
> > --- a/drivers/infiniband/hw/efa/efa_verbs.c
> > +++ b/drivers/infiniband/hw/efa/efa_verbs.c
> > @@ -212,6 +212,7 @@ int efa_query_device(struct ib_device *ibdev,
> >  	props->max_send_sge = dev_attr->max_sq_sge;
> >  	props->max_recv_sge = dev_attr->max_rq_sge;
> >  	props->max_sge_rd = dev_attr->max_wr_rdma_sge;
> > +	props->max_pkeys = 1;
> >  
> >  	if (udata && udata->outlen) {
> >  		resp.max_sq_sge = dev_attr->max_sq_sge;
> > 
> 
> Thanks Kamal, a similar patch was already merged:
> f25022a53ef3 ("RDMA/efa: Set maximum pkeys device attribute")

Correct, Now I see it with diff commit id under the for-rc branch,
while I did my work on top of the for-next branch.

I'll send a v2 that drops this patch.

0133654d8eb8 RDMA/efa: Set maximum pkeys device attribute

Thanks,
Kamal

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

* Re: [PATCH for-next 0/5] RDMA/providers: Set max_pkey attribute
  2020-07-06  7:54 [PATCH for-next 0/5] RDMA/providers: Set max_pkey attribute Kamal Heib
                   ` (4 preceding siblings ...)
  2020-07-06  7:54 ` [PATCH for-next 5/5] RDMA/usnic: Fix reported " Kamal Heib
@ 2020-07-06  9:06 ` Kamal Heib
  5 siblings, 0 replies; 9+ messages in thread
From: Kamal Heib @ 2020-07-06  9:06 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe, Doug Ledford

On Mon, Jul 06, 2020 at 10:54:14AM +0300, Kamal Heib wrote:
> This patch set makes sure to set the max_pkeys attribute to the providers
> that aren't setting it or not setting it correctly.
> 
> Kamal Heib (5):
>   RDMA/siw: Set max_pkeys attribute
>   RDMA/efa: Set max_pkeys attribute
>   RDMA/cxgb4: Set max_pkeys attribute
>   RDMA/i40iw: Set max_pkeys attribute
>   RDMA/usnic: Fix reported max_pkeys attribute
> 
>  drivers/infiniband/hw/cxgb4/provider.c       | 1 +
>  drivers/infiniband/hw/efa/efa_verbs.c        | 1 +
>  drivers/infiniband/hw/i40iw/i40iw_verbs.c    | 1 +
>  drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +-
>  drivers/infiniband/sw/siw/siw_verbs.c        | 1 +
>  5 files changed, 5 insertions(+), 1 deletion(-)
> 
> -- 
> 2.25.4
> 

Self-nack series, I'll send a v2 with the efa patch dropped and target
for-rc branch.

Nacked-by: Kamal Heib <kamalheib1@gmail.com> 

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

end of thread, other threads:[~2020-07-06  9:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06  7:54 [PATCH for-next 0/5] RDMA/providers: Set max_pkey attribute Kamal Heib
2020-07-06  7:54 ` [PATCH for-next 1/5] RDMA/siw: Set max_pkeys attribute Kamal Heib
2020-07-06  7:54 ` [PATCH for-next 2/5] RDMA/efa: " Kamal Heib
2020-07-06  7:58   ` Gal Pressman
2020-07-06  8:16     ` Kamal Heib
2020-07-06  7:54 ` [PATCH for-next 3/5] RDMA/cxgb4: " Kamal Heib
2020-07-06  7:54 ` [PATCH for-next 4/5] RDMA/i40iw: " Kamal Heib
2020-07-06  7:54 ` [PATCH for-next 5/5] RDMA/usnic: Fix reported " Kamal Heib
2020-07-06  9:06 ` [PATCH for-next 0/5] RDMA/providers: Set max_pkey attribute Kamal Heib

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.