linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-next 0/3] IB/hfi1,core: Driver updates for 12/22/2017
@ 2017-12-22 16:45 Dennis Dalessandro
       [not found] ` <20171222164036.29731.43475.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Dennis Dalessandro @ 2017-12-22 16:45 UTC (permalink / raw)
  To: jgg-uk2M96/98Pc, dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Don Hiatt, Mike Marciniszyn,
	Michael J. Ruhl

Hi Jason and Doug,

This includes a patch that Jason requsted, keeping the extended LID a consistent
size in the kernel and changing it at the UAPI boundary. There is another 16B
cleanup/improvement type patch from Don and an enhancement to our qp stats. I
know this stat is ridiculously complicated to read and it's doubtful I'll take
any other patches that make this worse, we are going to have to come up with 
something else. Plan to talk to Leon about adding this kind of stuff to the
rdma tool.

See also:
https://github.com/ddalessa/kernel/tree/for-4.16
---

Don Hiatt (2):
      IB/core: Use rdma_cap_opa_mad to check for OPA
      IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit

Michael J. Ruhl (1):
      IB/hfi1: Add RQ/SRQ information to QP stats


 drivers/infiniband/core/user_mad.c |    3 +--
 drivers/infiniband/hw/hfi1/hfi.h   |    2 +-
 drivers/infiniband/hw/hfi1/mad.c   |    6 +-----
 drivers/infiniband/hw/hfi1/qp.c    |   10 ++++++++--
 4 files changed, 11 insertions(+), 10 deletions(-)

--
-Denny
--
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	[flat|nested] 11+ messages in thread

* [PATCH for-next 1/3] IB/hfi1: Add RQ/SRQ information to QP stats
       [not found] ` <20171222164036.29731.43475.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
@ 2017-12-22 16:45   ` Dennis Dalessandro
       [not found]     ` <20171222164540.29731.68770.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
  2017-12-22 16:45   ` [PATCH for-next 2/3] IB/core: Use rdma_cap_opa_mad to check for OPA Dennis Dalessandro
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Dennis Dalessandro @ 2017-12-22 16:45 UTC (permalink / raw)
  To: jgg-uk2M96/98Pc, dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Michael J. Ruhl,
	Mike Marciniszyn

From: Michael J. Ruhl <michael.j.ruhl-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

When debugging issues with RC QPs, it is useful to know if a QP
has an associated RQ or SRQ, the size of the RQ, and any RNR timeout
values.

Add the necessary information to the QP stats output.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/hfi1/qp.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/qp.c b/drivers/infiniband/hw/hfi1/qp.c
index 4b01ccd..5507910 100644
--- a/drivers/infiniband/hw/hfi1/qp.c
+++ b/drivers/infiniband/hw/hfi1/qp.c
@@ -556,6 +556,8 @@ void qp_iter_print(struct seq_file *s, struct rvt_qp_iter *iter)
 	struct sdma_engine *sde;
 	struct send_context *send_context;
 	struct rvt_ack_entry *e = NULL;
+	struct rvt_srq *srq = qp->ibqp.srq ?
+		ibsrq_to_rvtsrq(qp->ibqp.srq) : NULL;
 
 	sde = qp_to_sdma_engine(qp, priv->s_sc);
 	wqe = rvt_get_swqe_ptr(qp, qp->s_last);
@@ -563,7 +565,7 @@ void qp_iter_print(struct seq_file *s, struct rvt_qp_iter *iter)
 	if (qp->s_ack_queue)
 		e = &qp->s_ack_queue[qp->s_tail_ack_queue];
 	seq_printf(s,
-		   "N %d %s QP %x R %u %s %u %u %u f=%x %u %u %u %u %u %u SPSN %x %x %x %x %x RPSN %x S(%u %u %u %u %u %u %u) R(%u %u %u) RQP %x LID %x SL %u MTU %u %u %u %u %u SDE %p,%u SC %p,%u SCQ %u %u PID %d OS %x %x E %x %x %x\n",
+		   "N %d %s QP %x R %u %s %u %u %u f=%x %u %u %u %u %u %u SPSN %x %x %x %x %x RPSN %x S(%u %u %u %u %u %u %u) R(%u %u %u) RQP %x LID %x SL %u MTU %u %u %u %u %u SDE %p,%u SC %p,%u SCQ %u %u PID %d OS %x %x E %x %x %x RNR %d %s %d\n",
 		   iter->n,
 		   qp_idle(qp) ? "I" : "B",
 		   qp->ibqp.qp_num,
@@ -610,7 +612,11 @@ void qp_iter_print(struct seq_file *s, struct rvt_qp_iter *iter)
 		   /* ack queue information */
 		   e ? e->opcode : 0,
 		   e ? e->psn : 0,
-		   e ? e->lpsn : 0);
+		   e ? e->lpsn : 0,
+		   qp->r_min_rnr_timer,
+		   srq ? "SRQ" : "RQ",
+		   srq ? srq->rq.size : qp->r_rq.size
+		);
 }
 
 void *qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp)

--
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] 11+ messages in thread

* [PATCH for-next 2/3] IB/core: Use rdma_cap_opa_mad to check for OPA
       [not found] ` <20171222164036.29731.43475.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
  2017-12-22 16:45   ` [PATCH for-next 1/3] IB/hfi1: Add RQ/SRQ information to QP stats Dennis Dalessandro
@ 2017-12-22 16:45   ` Dennis Dalessandro
  2017-12-22 16:46   ` [PATCH for-next 3/3] IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit Dennis Dalessandro
  2017-12-22 23:37   ` [PATCH for-next 0/3] IB/hfi1,core: Driver updates for 12/22/2017 Jason Gunthorpe
  3 siblings, 0 replies; 11+ messages in thread
From: Dennis Dalessandro @ 2017-12-22 16:45 UTC (permalink / raw)
  To: jgg-uk2M96/98Pc, dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Don Hiatt

From: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

Use rdma_cap_opa_mad() to check for OPA to promote code reuse.

Signed-off-by: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/core/user_mad.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
index 4b64dd0..33d5e8e 100644
--- a/drivers/infiniband/core/user_mad.c
+++ b/drivers/infiniband/core/user_mad.c
@@ -233,8 +233,7 @@ static void recv_handler(struct ib_mad_agent *agent,
 	 * On OPA devices it is okay to lose the upper 16 bits of LID as this
 	 * information is obtained elsewhere. Mask off the upper 16 bits.
 	 */
-	if (agent->device->port_immutable[agent->port_num].core_cap_flags &
-	    RDMA_CORE_PORT_INTEL_OPA)
+	if (rdma_cap_opa_mad(agent->device, agent->port_num))
 		packet->mad.hdr.lid = ib_lid_be16(0xFFFF &
 						  mad_recv_wc->wc->slid);
 	else

--
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] 11+ messages in thread

* [PATCH for-next 3/3] IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit
       [not found] ` <20171222164036.29731.43475.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
  2017-12-22 16:45   ` [PATCH for-next 1/3] IB/hfi1: Add RQ/SRQ information to QP stats Dennis Dalessandro
  2017-12-22 16:45   ` [PATCH for-next 2/3] IB/core: Use rdma_cap_opa_mad to check for OPA Dennis Dalessandro
@ 2017-12-22 16:46   ` Dennis Dalessandro
       [not found]     ` <20171222164557.29731.16649.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
  2017-12-22 23:37   ` [PATCH for-next 0/3] IB/hfi1,core: Driver updates for 12/22/2017 Jason Gunthorpe
  3 siblings, 1 reply; 11+ messages in thread
From: Dennis Dalessandro @ 2017-12-22 16:46 UTC (permalink / raw)
  To: jgg-uk2M96/98Pc, dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Don Hiatt

From: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

Change the slid arg to ingress_pkey_table_fail() to a full
32Bits and do not convert to 16Bits in caller. This is so we
can keep everything 32bit in the kernel and only change to
16bit at the uapi boundary.

Signed-off-by: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/hfi1/hfi.h |    2 +-
 drivers/infiniband/hw/hfi1/mad.c |    6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/hfi.h b/drivers/infiniband/hw/hfi1/hfi.h
index 869c2bf..dc5b133 100644
--- a/drivers/infiniband/hw/hfi1/hfi.h
+++ b/drivers/infiniband/hw/hfi1/hfi.h
@@ -1627,7 +1627,7 @@ static int ingress_pkey_table_search(struct hfi1_pportdata *ppd, u16 pkey)
  * the 'error info' for this failure.
  */
 static void ingress_pkey_table_fail(struct hfi1_pportdata *ppd, u16 pkey,
-				    u16 slid)
+				    u32 slid)
 {
 	struct hfi1_devdata *dd = ppd->dd;
 
diff --git a/drivers/infiniband/hw/hfi1/mad.c b/drivers/infiniband/hw/hfi1/mad.c
index cf8dba3..34547a4 100644
--- a/drivers/infiniband/hw/hfi1/mad.c
+++ b/drivers/infiniband/hw/hfi1/mad.c
@@ -4348,11 +4348,7 @@ static int opa_local_smp_check(struct hfi1_ibport *ibp,
 	 */
 	if (pkey == LIM_MGMT_P_KEY || pkey == FULL_MGMT_P_KEY)
 		return 0;
-	/*
-	 * On OPA devices it is okay to lose the upper 16 bits of LID as this
-	 * information is obtained elsewhere. Mask off the upper 16 bits.
-	 */
-	ingress_pkey_table_fail(ppd, pkey, ib_lid_cpu16(0xFFFF & in_wc->slid));
+	ingress_pkey_table_fail(ppd, pkey, in_wc->slid);
 	return 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] 11+ messages in thread

* Re: [PATCH for-next 3/3] IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit
       [not found]     ` <20171222164557.29731.16649.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
@ 2017-12-22 16:56       ` Jason Gunthorpe
       [not found]         ` <20171222165600.GE30884-uk2M96/98Pc@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Jason Gunthorpe @ 2017-12-22 16:56 UTC (permalink / raw)
  To: Dennis Dalessandro
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Don Hiatt

On Fri, Dec 22, 2017 at 08:46:00AM -0800, Dennis Dalessandro wrote:
> From: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> 
> Change the slid arg to ingress_pkey_table_fail() to a full
> 32Bits and do not convert to 16Bits in caller. This is so we
> can keep everything 32bit in the kernel and only change to
> 16bit at the uapi boundary.
> 
> Signed-off-by: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>  drivers/infiniband/hw/hfi1/hfi.h |    2 +-
>  drivers/infiniband/hw/hfi1/mad.c |    6 +-----
>  2 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/hfi1/hfi.h b/drivers/infiniband/hw/hfi1/hfi.h
> index 869c2bf..dc5b133 100644
> +++ b/drivers/infiniband/hw/hfi1/hfi.h
> @@ -1627,7 +1627,7 @@ static int ingress_pkey_table_search(struct hfi1_pportdata *ppd, u16 pkey)
>   * the 'error info' for this failure.
>   */
>  static void ingress_pkey_table_fail(struct hfi1_pportdata *ppd, u16 pkey,
> -				    u16 slid)
> +				    u32 slid)
>  {
>  	struct hfi1_devdata *dd = ppd->dd;
>  
> diff --git a/drivers/infiniband/hw/hfi1/mad.c b/drivers/infiniband/hw/hfi1/mad.c
> index cf8dba3..34547a4 100644
> +++ b/drivers/infiniband/hw/hfi1/mad.c
> @@ -4348,11 +4348,7 @@ static int opa_local_smp_check(struct hfi1_ibport *ibp,
>  	 */
>  	if (pkey == LIM_MGMT_P_KEY || pkey == FULL_MGMT_P_KEY)
>  		return 0;
> -	/*
> -	 * On OPA devices it is okay to lose the upper 16 bits of LID as this
> -	 * information is obtained elsewhere. Mask off the upper 16 bits.
> -	 */
> -	ingress_pkey_table_fail(ppd, pkey, ib_lid_cpu16(0xFFFF & in_wc->slid));
> +	ingress_pkey_table_fail(ppd, pkey, in_wc->slid);
>  	return 1;
>  }

I'm confused by this patch.

It seems to totally revert the -stable patch
4988be5813ff2afdc0d8bfa315ef34a577d3efbf, with the exception that
ingress_pkey_table_fail now accepts a u32.

Is this saying the correct version of
4988be5813ff2afdc0d8bfa315ef34a577d3efbf was to just change that one
type??

Jason
--
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	[flat|nested] 11+ messages in thread

* Re: [PATCH for-next 3/3] IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit
       [not found]         ` <20171222165600.GE30884-uk2M96/98Pc@public.gmane.org>
@ 2017-12-22 17:28           ` Don Hiatt
  0 siblings, 0 replies; 11+ messages in thread
From: Don Hiatt @ 2017-12-22 17:28 UTC (permalink / raw)
  To: Jason Gunthorpe, Dennis Dalessandro
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

Hi Jason,


On 12/22/2017 8:56 AM, Jason Gunthorpe wrote:
> On Fri, Dec 22, 2017 at 08:46:00AM -0800, Dennis Dalessandro wrote:
>> From: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>>
>> Change the slid arg to ingress_pkey_table_fail() to a full
>> 32Bits and do not convert to 16Bits in caller. This is so we
>> can keep everything 32bit in the kernel and only change to
>> 16bit at the uapi boundary.
>>
>> Signed-off-by: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>> Signed-off-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>>   drivers/infiniband/hw/hfi1/hfi.h |    2 +-
>>   drivers/infiniband/hw/hfi1/mad.c |    6 +-----
>>   2 files changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/infiniband/hw/hfi1/hfi.h b/drivers/infiniband/hw/hfi1/hfi.h
>> index 869c2bf..dc5b133 100644
>> +++ b/drivers/infiniband/hw/hfi1/hfi.h
>> @@ -1627,7 +1627,7 @@ static int ingress_pkey_table_search(struct hfi1_pportdata *ppd, u16 pkey)
>>    * the 'error info' for this failure.
>>    */
>>   static void ingress_pkey_table_fail(struct hfi1_pportdata *ppd, u16 pkey,
>> -				    u16 slid)
>> +				    u32 slid)
>>   {
>>   	struct hfi1_devdata *dd = ppd->dd;
>>   
>> diff --git a/drivers/infiniband/hw/hfi1/mad.c b/drivers/infiniband/hw/hfi1/mad.c
>> index cf8dba3..34547a4 100644
>> +++ b/drivers/infiniband/hw/hfi1/mad.c
>> @@ -4348,11 +4348,7 @@ static int opa_local_smp_check(struct hfi1_ibport *ibp,
>>   	 */
>>   	if (pkey == LIM_MGMT_P_KEY || pkey == FULL_MGMT_P_KEY)
>>   		return 0;
>> -	/*
>> -	 * On OPA devices it is okay to lose the upper 16 bits of LID as this
>> -	 * information is obtained elsewhere. Mask off the upper 16 bits.
>> -	 */
>> -	ingress_pkey_table_fail(ppd, pkey, ib_lid_cpu16(0xFFFF & in_wc->slid));
>> +	ingress_pkey_table_fail(ppd, pkey, in_wc->slid);
>>   	return 1;
>>   }
> I'm confused by this patch.
>
> It seems to totally revert the -stable patch
> 4988be5813ff2afdc0d8bfa315ef34a577d3efbf, with the exception that
> ingress_pkey_table_fail now accepts a u32.
>
> Is this saying the correct version of
> 4988be5813ff2afdc0d8bfa315ef34a577d3efbf was to just change that one
> type??
>
> Jason

Yes, the correct version was to just change the type. When I made the 
original fix I didn't notice that was the easy/proper way of doing it 
until your comments. Our original implementation had the masking off and 
I've been just carrying it along without much thought until you 
commented. Thanks again!

don

--
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	[flat|nested] 11+ messages in thread

* Re: [PATCH for-next 0/3] IB/hfi1,core: Driver updates for 12/22/2017
       [not found] ` <20171222164036.29731.43475.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-12-22 16:46   ` [PATCH for-next 3/3] IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit Dennis Dalessandro
@ 2017-12-22 23:37   ` Jason Gunthorpe
       [not found]     ` <20171222233738.GB17198-uk2M96/98Pc@public.gmane.org>
  3 siblings, 1 reply; 11+ messages in thread
From: Jason Gunthorpe @ 2017-12-22 23:37 UTC (permalink / raw)
  To: Dennis Dalessandro
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Don Hiatt, Mike Marciniszyn,
	Michael J. Ruhl

On Fri, Dec 22, 2017 at 08:45:35AM -0800, Dennis Dalessandro wrote:
> Don Hiatt (2):
>       IB/core: Use rdma_cap_opa_mad to check for OPA
>       IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit

For now I took these two to for-next the other should sit on the list
for a bit.

Thanks
Jason
--
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	[flat|nested] 11+ messages in thread

* Re: [PATCH for-next 0/3] IB/hfi1,core: Driver updates for 12/22/2017
       [not found]     ` <20171222233738.GB17198-uk2M96/98Pc@public.gmane.org>
@ 2017-12-25 10:46       ` Leon Romanovsky
       [not found]         ` <20171225104615.GH2942-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Leon Romanovsky @ 2017-12-25 10:46 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Dennis Dalessandro, dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Don Hiatt, Mike Marciniszyn,
	Michael J. Ruhl

[-- Attachment #1: Type: text/plain, Size: 1924 bytes --]

On Fri, Dec 22, 2017 at 04:37:38PM -0700, Jason Gunthorpe wrote:
> On Fri, Dec 22, 2017 at 08:45:35AM -0800, Dennis Dalessandro wrote:
> > Don Hiatt (2):
> >       IB/core: Use rdma_cap_opa_mad to check for OPA
> >       IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit
>
> For now I took these two to for-next the other should sit on the list
> for a bit.

Just to emphasize how easy to add new field in nldev:

diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
index 6b22f1f2d084..ca07f845a6ae 100644
--- a/drivers/infiniband/core/nldev.c
+++ b/drivers/infiniband/core/nldev.c
@@ -70,6 +70,7 @@ static const struct nla_policy nldev_policy[RDMA_NLDEV_ATTR_MAX] = {
 	[RDMA_NLDEV_ATTR_RES_PID]		= { .type = NLA_U32 },
 	[RDMA_NLDEV_ATTR_RES_PID_COMM]	= { .type = NLA_NUL_STRING,
 						    .len = TASK_COMM_LEN },
+	[RDMA_NLDEV_ATTR_RES_RNR_TIMEOUT]	= { .type = NLA_U8 },
 };

 static int fill_nldev_handle(struct sk_buff *msg, struct ib_device *device)
@@ -283,6 +284,9 @@ static int fill_res_qp_entry(struct sk_buff *msg,
 			   RDMA_NLDEV_ATTR_RES_PID_COMM, qp->res.task_comm))
 		goto err;

+	if (nla_put_u8(msg, RDMA_NLDEV_ATTR_RES_RNR_TIMEOUT, qp_attr.min_rnr_timer))
+		goto err;
+
 	nla_nest_end(msg, entry_attr);

 	return 0;
diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
index 9a90cd9f614e..241a9184a9f7 100644
--- a/include/uapi/rdma/rdma_netlink.h
+++ b/include/uapi/rdma/rdma_netlink.h
@@ -357,6 +357,8 @@ enum rdma_nldev_attr {
 	 */
 	RDMA_NLDEV_ATTR_RES_PID_COMM,		/* string */

+	RDMA_NLDEV_ATTR_RES_RNR_TIMEOUT,	/* u8 */
+
 	RDMA_NLDEV_ATTR_MAX
 };
 #endif /* _UAPI_RDMA_NETLINK_H */

>
> Thanks
> Jason
> --
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH for-next 0/3] IB/hfi1,core: Driver updates for 12/22/2017
       [not found]         ` <20171225104615.GH2942-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2018-01-03 15:13           ` Dennis Dalessandro
       [not found]             ` <2517cf89-211d-0f40-17e5-eae670ff429e-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Dennis Dalessandro @ 2018-01-03 15:13 UTC (permalink / raw)
  To: Leon Romanovsky, Jason Gunthorpe
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Don Hiatt, Mike Marciniszyn,
	Michael J. Ruhl

On 12/25/2017 5:46 AM, Leon Romanovsky wrote:
> On Fri, Dec 22, 2017 at 04:37:38PM -0700, Jason Gunthorpe wrote:
>> On Fri, Dec 22, 2017 at 08:45:35AM -0800, Dennis Dalessandro wrote:
>>> Don Hiatt (2):
>>>        IB/core: Use rdma_cap_opa_mad to check for OPA
>>>        IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit
>>
>> For now I took these two to for-next the other should sit on the list
>> for a bit.
> 
> Just to emphasize how easy to add new field in nldev:

Agree. I'm going to look into that when I can. For now, the patch is 
minor and adds something important for debugging. I've made folks aware 
internally this is the last patch like this, so I'd like to see this go 
in for the current cycle and then we'll get to work on the new 
implementation. Does that sound reasonable?

-Denny
--
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	[flat|nested] 11+ messages in thread

* Re: [PATCH for-next 0/3] IB/hfi1,core: Driver updates for 12/22/2017
       [not found]             ` <2517cf89-211d-0f40-17e5-eae670ff429e-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2018-01-03 15:25               ` Leon Romanovsky
  0 siblings, 0 replies; 11+ messages in thread
From: Leon Romanovsky @ 2018-01-03 15:25 UTC (permalink / raw)
  To: Dennis Dalessandro
  Cc: Jason Gunthorpe, dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Don Hiatt, Mike Marciniszyn,
	Michael J. Ruhl

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

On Wed, Jan 03, 2018 at 10:13:19AM -0500, Dennis Dalessandro wrote:
> On 12/25/2017 5:46 AM, Leon Romanovsky wrote:
> > On Fri, Dec 22, 2017 at 04:37:38PM -0700, Jason Gunthorpe wrote:
> > > On Fri, Dec 22, 2017 at 08:45:35AM -0800, Dennis Dalessandro wrote:
> > > > Don Hiatt (2):
> > > >        IB/core: Use rdma_cap_opa_mad to check for OPA
> > > >        IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit
> > >
> > > For now I took these two to for-next the other should sit on the list
> > > for a bit.
> >
> > Just to emphasize how easy to add new field in nldev:
>
> Agree. I'm going to look into that when I can. For now, the patch is minor
> and adds something important for debugging. I've made folks aware internally
> this is the last patch like this, so I'd like to see this go in for the
> current cycle and then we'll get to work on the new implementation. Does
> that sound reasonable?

It will be great.

Thanks

>
> -Denny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH for-next 1/3] IB/hfi1: Add RQ/SRQ information to QP stats
       [not found]     ` <20171222164540.29731.68770.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
@ 2018-01-03 21:22       ` Jason Gunthorpe
  0 siblings, 0 replies; 11+ messages in thread
From: Jason Gunthorpe @ 2018-01-03 21:22 UTC (permalink / raw)
  To: Dennis Dalessandro
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Michael J. Ruhl,
	Mike Marciniszyn

On Fri, Dec 22, 2017 at 08:45:44AM -0800, Dennis Dalessandro wrote:
> From: Michael J. Ruhl <michael.j.ruhl-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> 
> When debugging issues with RC QPs, it is useful to know if a QP
> has an associated RQ or SRQ, the size of the RQ, and any RNR timeout
> values.
> 
> Add the necessary information to the QP stats output.
> 
> Reviewed-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Michael J. Ruhl <michael.j.ruhl-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>  drivers/infiniband/hw/hfi1/qp.c |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)

Okay, applied to for-next, lets use netlink in future.

Jason
--
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	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-01-03 21:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-22 16:45 [PATCH for-next 0/3] IB/hfi1,core: Driver updates for 12/22/2017 Dennis Dalessandro
     [not found] ` <20171222164036.29731.43475.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2017-12-22 16:45   ` [PATCH for-next 1/3] IB/hfi1: Add RQ/SRQ information to QP stats Dennis Dalessandro
     [not found]     ` <20171222164540.29731.68770.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2018-01-03 21:22       ` Jason Gunthorpe
2017-12-22 16:45   ` [PATCH for-next 2/3] IB/core: Use rdma_cap_opa_mad to check for OPA Dennis Dalessandro
2017-12-22 16:46   ` [PATCH for-next 3/3] IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit Dennis Dalessandro
     [not found]     ` <20171222164557.29731.16649.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2017-12-22 16:56       ` Jason Gunthorpe
     [not found]         ` <20171222165600.GE30884-uk2M96/98Pc@public.gmane.org>
2017-12-22 17:28           ` Don Hiatt
2017-12-22 23:37   ` [PATCH for-next 0/3] IB/hfi1,core: Driver updates for 12/22/2017 Jason Gunthorpe
     [not found]     ` <20171222233738.GB17198-uk2M96/98Pc@public.gmane.org>
2017-12-25 10:46       ` Leon Romanovsky
     [not found]         ` <20171225104615.GH2942-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-03 15:13           ` Dennis Dalessandro
     [not found]             ` <2517cf89-211d-0f40-17e5-eae670ff429e-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-01-03 15:25               ` Leon Romanovsky

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).