public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-rc or next 1/2] IB/hfi1: Indicate DMA wait when txq is queued for wakeup
  2021-07-01 15:46 [PATCH for-rc or next 0/2] Two small fixups Dennis Dalessandro
@ 2021-07-01 15:47 ` Dennis Dalessandro
  0 siblings, 0 replies; 8+ messages in thread
From: Dennis Dalessandro @ 2021-07-01 15:47 UTC (permalink / raw)
  To: jgg, dledford; +Cc: linux-rdma, Mike Marciniszyn

From: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>

There is no counter for dmawait in AIP, which hampers debugging
performance issues.

Add the counter increment when the txq is queued.

Fixes: d99dc602e2a5 ("IB/hfi1: Add functions to transmit datagram ipoib packets")
Fixes: c4cf5688ea69 ("IB/hfi1: Indicate DMA wait when txq is queued for wakeup")
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
---
 drivers/infiniband/hw/hfi1/ipoib_tx.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/infiniband/hw/hfi1/ipoib_tx.c b/drivers/infiniband/hw/hfi1/ipoib_tx.c
index 993f983..e74ddbe 100644
--- a/drivers/infiniband/hw/hfi1/ipoib_tx.c
+++ b/drivers/infiniband/hw/hfi1/ipoib_tx.c
@@ -644,10 +644,13 @@ static int hfi1_ipoib_sdma_sleep(struct sdma_engine *sde,
                        /* came from non-list submit */
                        list_add_tail(&txreq->list, &txq->tx_list);
                if (list_empty(&txq->wait.list)) {
+                       struct hfi1_ibport *ibp = &sde->ppd->ibport_data;
+
                        if (!atomic_xchg(&txq->no_desc, 1)) {
                                trace_hfi1_txq_queued(txq);
                                hfi1_ipoib_stop_txq(txq);
                        }
+                       ibp->rvp.n_dmawait++;
                        iowait_queue(pkts_sent, wait->iow, &sde->dmawait);
                }


External recipient

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

* [PATCH for-rc or next 0/2] Second attempt at two small fixups
@ 2021-07-06 17:23 Dennis Dalessandro
  2021-07-06 17:23 ` [PATCH for-rc or next 1/2] IB/hfi1: Indicate DMA wait when txq is queued for wakeup Dennis Dalessandro
  2021-07-06 17:23 ` [PATCH for-rc or next 2/2] IB/hfi1: Adjust pkey entry in index 0 Dennis Dalessandro
  0 siblings, 2 replies; 8+ messages in thread
From: Dennis Dalessandro @ 2021-07-06 17:23 UTC (permalink / raw)
  To: jgg, dledford; +Cc: linux-rdma

Word from IT dept is they got the issue addressed. Test to my gmail account
looks good so here goes shot number 2. Sorry for the extra noise. Jason will
check our your mdir sync stuff thanks for the pointer.

---

Mike Marciniszyn (2):
      IB/hfi1: Indicate DMA wait when txq is queued for wakeup
      IB/hfi1: Adjust pkey entry in index 0


 drivers/infiniband/hw/hfi1/init.c     |    7 +------
 drivers/infiniband/hw/hfi1/ipoib_tx.c |    3 +++
 2 files changed, 4 insertions(+), 6 deletions(-)

--
-Denny

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

* [PATCH for-rc or next 1/2] IB/hfi1: Indicate DMA wait when txq is queued for wakeup
  2021-07-06 17:23 [PATCH for-rc or next 0/2] Second attempt at two small fixups Dennis Dalessandro
@ 2021-07-06 17:23 ` Dennis Dalessandro
  2021-07-12 17:42   ` Jason Gunthorpe
  2021-07-06 17:23 ` [PATCH for-rc or next 2/2] IB/hfi1: Adjust pkey entry in index 0 Dennis Dalessandro
  1 sibling, 1 reply; 8+ messages in thread
From: Dennis Dalessandro @ 2021-07-06 17:23 UTC (permalink / raw)
  To: jgg, dledford; +Cc: linux-rdma, Mike Marciniszyn

From: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>

There is no counter for dmawait in AIP, which hampers debugging
performance issues.

Add the counter increment when the txq is queued.

Fixes: d99dc602e2a5 ("IB/hfi1: Add functions to transmit datagram ipoib packets")
Fixes: c4cf5688ea69 ("IB/hfi1: Indicate DMA wait when txq is queued for wakeup")
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
---
 drivers/infiniband/hw/hfi1/ipoib_tx.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/infiniband/hw/hfi1/ipoib_tx.c b/drivers/infiniband/hw/hfi1/ipoib_tx.c
index 993f983..e74ddbe 100644
--- a/drivers/infiniband/hw/hfi1/ipoib_tx.c
+++ b/drivers/infiniband/hw/hfi1/ipoib_tx.c
@@ -644,10 +644,13 @@ static int hfi1_ipoib_sdma_sleep(struct sdma_engine *sde,
 			/* came from non-list submit */
 			list_add_tail(&txreq->list, &txq->tx_list);
 		if (list_empty(&txq->wait.list)) {
+			struct hfi1_ibport *ibp = &sde->ppd->ibport_data;
+
 			if (!atomic_xchg(&txq->no_desc, 1)) {
 				trace_hfi1_txq_queued(txq);
 				hfi1_ipoib_stop_txq(txq);
 			}
+			ibp->rvp.n_dmawait++;
 			iowait_queue(pkts_sent, wait->iow, &sde->dmawait);
 		}
 


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

* [PATCH for-rc or next 2/2] IB/hfi1: Adjust pkey entry in index 0
  2021-07-06 17:23 [PATCH for-rc or next 0/2] Second attempt at two small fixups Dennis Dalessandro
  2021-07-06 17:23 ` [PATCH for-rc or next 1/2] IB/hfi1: Indicate DMA wait when txq is queued for wakeup Dennis Dalessandro
@ 2021-07-06 17:23 ` Dennis Dalessandro
  1 sibling, 0 replies; 8+ messages in thread
From: Dennis Dalessandro @ 2021-07-06 17:23 UTC (permalink / raw)
  To: jgg, dledford; +Cc: linux-rdma, Mike Marciniszyn

From: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>

It is possible for the primary IPoIB network device associated with any
RDMA device to fail to join certain multicast groups preventing IPv6
neighbor discovery and possibly other network ULPs from working
correctly. The IPv4 broadcast group is not affected as the IPoIB
network device handles joining that multicast group directly.

This is because the primary IPoIB network device uses the pkey at
ndex 0 in the associated RDMA device's pkey table. Anytime the pkey
value of index 0 changes, the primary IPoIB network device
automatically modifies it's broadcast address
(i.e. /sys/class/net/[ib0]/broadcast), since the broadcast address
includes the pkey value, and then bounces carrier. This includes
initial pkey assignment, such as when the pkey at index 0 transitions
from the opa default of invalid (0x0000) to some value such as the
OPA default pkey for Virtual Fabric 0: 0x8001 or when the fabric manager
is restarted with a configuration change causing the pkey at index 0
to change. Many network ULPs are not sensitive to the carrier bounce
and are not expecting the broadcast address to change including the
linux IPv6 stack.  This problem does not affect IPoIB child network
devices as their pkey value is constant for all time.

To mitigate this issue, change the default pkey in at index 0 to
0x8001 to cover the predominant case and avoid issues as ipoib
comes up and the FM sweeps.

At some point, ipoib multicast support should automatically
fix non-broadcast addresses as it does with the primary broadcast
address.


Fixes: 7724105686e7 ("IB/hfi1: add driver files")
Suggested-by: Josh Collier <josh.d.collier@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
---
 drivers/infiniband/hw/hfi1/init.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c
index 0986aa0..34106e5 100644
--- a/drivers/infiniband/hw/hfi1/init.c
+++ b/drivers/infiniband/hw/hfi1/init.c
@@ -650,12 +650,7 @@ void hfi1_init_pportdata(struct pci_dev *pdev, struct hfi1_pportdata *ppd,
 
 	ppd->pkeys[default_pkey_idx] = DEFAULT_P_KEY;
 	ppd->part_enforce |= HFI1_PART_ENFORCE_IN;
-
-	if (loopback) {
-		dd_dev_err(dd, "Faking data partition 0x8001 in idx %u\n",
-			   !default_pkey_idx);
-		ppd->pkeys[!default_pkey_idx] = 0x8001;
-	}
+	ppd->pkeys[0] = 0x8001;
 
 	INIT_WORK(&ppd->link_vc_work, handle_verify_cap);
 	INIT_WORK(&ppd->link_up_work, handle_link_up);


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

* Re: [PATCH for-rc or next 1/2] IB/hfi1: Indicate DMA wait when txq is queued for wakeup
  2021-07-06 17:23 ` [PATCH for-rc or next 1/2] IB/hfi1: Indicate DMA wait when txq is queued for wakeup Dennis Dalessandro
@ 2021-07-12 17:42   ` Jason Gunthorpe
  2021-07-12 19:33     ` Dennis Dalessandro
  2021-07-14 15:45     ` Marciniszyn, Mike
  0 siblings, 2 replies; 8+ messages in thread
From: Jason Gunthorpe @ 2021-07-12 17:42 UTC (permalink / raw)
  To: Dennis Dalessandro; +Cc: dledford, linux-rdma, Mike Marciniszyn

On Tue, Jul 06, 2021 at 01:23:45PM -0400, Dennis Dalessandro wrote:
> From: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
> 
> There is no counter for dmawait in AIP, which hampers debugging
> performance issues.
> 
> Add the counter increment when the txq is queued.
> 
> Fixes: d99dc602e2a5 ("IB/hfi1: Add functions to transmit datagram ipoib packets")
> Fixes: c4cf5688ea69 ("IB/hfi1: Indicate DMA wait when txq is queued for wakeup")

Neither of these fixes lines are correct, please resend it with
correct fixes lines.

This commit message is not quite good enough to justfy adding a
counter increment to rc, can you explain how this is an existing
counter and it is a bug that this single case was not incremented?

Jason

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

* Re: [PATCH for-rc or next 1/2] IB/hfi1: Indicate DMA wait when txq is queued for wakeup
  2021-07-12 17:42   ` Jason Gunthorpe
@ 2021-07-12 19:33     ` Dennis Dalessandro
  2021-07-13  0:00       ` Jason Gunthorpe
  2021-07-14 15:45     ` Marciniszyn, Mike
  1 sibling, 1 reply; 8+ messages in thread
From: Dennis Dalessandro @ 2021-07-12 19:33 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: dledford, linux-rdma, Mike Marciniszyn

On 7/12/21 1:42 PM, Jason Gunthorpe wrote:
> On Tue, Jul 06, 2021 at 01:23:45PM -0400, Dennis Dalessandro wrote:
>> From: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
>>
>> There is no counter for dmawait in AIP, which hampers debugging
>> performance issues.
>>
>> Add the counter increment when the txq is queued.
>>
>> Fixes: d99dc602e2a5 ("IB/hfi1: Add functions to transmit datagram ipoib packets")
>> Fixes: c4cf5688ea69 ("IB/hfi1: Indicate DMA wait when txq is queued for wakeup")
> 
> Neither of these fixes lines are correct, please resend it with
> correct fixes lines.

I believe the thinking is these are fixes that should have had the counter in
the first place.

> This commit message is not quite good enough to justfy adding a
> counter increment to rc, can you explain how this is an existing
> counter and it is a bug that this single case was not incremented?

Yeah, agree. Fine to go to for-next instead.

I don't know why zero-day builds threw up on this commit. Seems unrelated.

-Denny

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

* Re: [PATCH for-rc or next 1/2] IB/hfi1: Indicate DMA wait when txq is queued for wakeup
  2021-07-12 19:33     ` Dennis Dalessandro
@ 2021-07-13  0:00       ` Jason Gunthorpe
  0 siblings, 0 replies; 8+ messages in thread
From: Jason Gunthorpe @ 2021-07-13  0:00 UTC (permalink / raw)
  To: Dennis Dalessandro; +Cc: dledford, linux-rdma, Mike Marciniszyn

On Mon, Jul 12, 2021 at 03:33:37PM -0400, Dennis Dalessandro wrote:
> On 7/12/21 1:42 PM, Jason Gunthorpe wrote:
> > On Tue, Jul 06, 2021 at 01:23:45PM -0400, Dennis Dalessandro wrote:
> >> From: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
> >>
> >> There is no counter for dmawait in AIP, which hampers debugging
> >> performance issues.
> >>
> >> Add the counter increment when the txq is queued.
> >>
> >> Fixes: d99dc602e2a5 ("IB/hfi1: Add functions to transmit datagram ipoib packets")
> >> Fixes: c4cf5688ea69 ("IB/hfi1: Indicate DMA wait when txq is queued for wakeup")
> > 
> > Neither of these fixes lines are correct, please resend it with
> > correct fixes lines.
> 
> I believe the thinking is these are fixes that should have had the counter in
> the first place.

$ git describe --contains c4cf5688ea69
Could not get sha1 for c4cf5688ea69. Skipping.

Jason

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

* RE: [PATCH for-rc or next 1/2] IB/hfi1: Indicate DMA wait when txq is queued for wakeup
  2021-07-12 17:42   ` Jason Gunthorpe
  2021-07-12 19:33     ` Dennis Dalessandro
@ 2021-07-14 15:45     ` Marciniszyn, Mike
  1 sibling, 0 replies; 8+ messages in thread
From: Marciniszyn, Mike @ 2021-07-14 15:45 UTC (permalink / raw)
  To: Jason Gunthorpe, Dalessandro, Dennis
  Cc: dledford@redhat.com, linux-rdma@vger.kernel.org

> >
> > Fixes: d99dc602e2a5 ("IB/hfi1: Add functions to transmit datagram
> > ipoib packets")
> > Fixes: c4cf5688ea69 ("IB/hfi1: Indicate DMA wait when txq is queued
> > for wakeup")
> 
> Neither of these fixes lines are correct, please resend it with correct fixes
> lines.

d99dc602e2a5 is ok and is clearly there and adds the file itself:

commit d99dc602e2a55a99940ba9506a7126dfa54d54ea
Author: Gary Leshner <Gary.S.Leshner@intel.com>
Date:   Mon May 11 12:05:48 2020 -0400

    IB/hfi1: Add functions to transmit datagram ipoib packets

The second one is just the patch itself.   Not sure what happened there, but Denny is going to resubmit.

Mike

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

end of thread, other threads:[~2021-07-14 15:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-06 17:23 [PATCH for-rc or next 0/2] Second attempt at two small fixups Dennis Dalessandro
2021-07-06 17:23 ` [PATCH for-rc or next 1/2] IB/hfi1: Indicate DMA wait when txq is queued for wakeup Dennis Dalessandro
2021-07-12 17:42   ` Jason Gunthorpe
2021-07-12 19:33     ` Dennis Dalessandro
2021-07-13  0:00       ` Jason Gunthorpe
2021-07-14 15:45     ` Marciniszyn, Mike
2021-07-06 17:23 ` [PATCH for-rc or next 2/2] IB/hfi1: Adjust pkey entry in index 0 Dennis Dalessandro
  -- strict thread matches above, loose matches on Subject: below --
2021-07-01 15:46 [PATCH for-rc or next 0/2] Two small fixups Dennis Dalessandro
2021-07-01 15:47 ` [PATCH for-rc or next 1/2] IB/hfi1: Indicate DMA wait when txq is queued for wakeup Dennis Dalessandro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox