diff mbox series

[for-rc,or,next,1/2] IB/hfi1: Indicate DMA wait when txq is queued for wakeup

Message ID 20210701154700.93459.5335.stgit@awfm-01.cornelisnetworks.com (mailing list archive)
State Changes Requested
Headers show
Series Two small fixups | expand

Commit Message

Dennis Dalessandro July 1, 2021, 3:47 p.m. UTC
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(+)


External recipient
diff mbox series

Patch

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);
                }