public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: jgg-uk2M96/98Pc@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Mitko Haralanov
	<mitko.haralanov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Michael J. Ruhl"
	<michael.j.ruhl-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: [PATCH for-next v2 07/16] IB/hfi1: Show fault stats in both TX and RX directions
Date: Fri, 26 Jan 2018 13:29:43 -0800	[thread overview]
Message-ID: <20180126212941.12097.34672.stgit@scvm10.sc.intel.com> (raw)
In-Reply-To: <20180126211126.12097.47410.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>

From: Mitko Haralanov <mitko.haralanov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

The routine which shows the fault stats checks the counters
to determine whether to show any stats based on the number of
transmitted pkts/bytes for a particular opcode.

Unfortunately, it only checked the receive counters. As a result,
if any packet faults have happened for packets egressing the HFI,
those stats would not be shown.

In order to fix this, the routine is amended to also check the
TX counters. With this change the pkt/byte counts are the sum of
both TX and RX counts for the opcode.

Fixes: 1b311f8931cf ("IB/hfi1: Add tx_opcode_stats like the opcode_stats")
Reviewed-by: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Mitko Haralanov <mitko.haralanov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/hfi1/debugfs.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/debugfs.c b/drivers/infiniband/hw/hfi1/debugfs.c
index 2e6e0c5..852173b 100644
--- a/drivers/infiniband/hw/hfi1/debugfs.c
+++ b/drivers/infiniband/hw/hfi1/debugfs.c
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2015-2017 Intel Corporation.
+ * Copyright(c) 2015-2018 Intel Corporation.
  *
  * This file is provided under a dual BSD/GPLv2 license.  When using or
  * redistributing this file, you may do so under either license.
@@ -1201,6 +1201,13 @@ static int _fault_stats_seq_show(struct seq_file *s, void *v)
 		}
 		hfi1_rcd_put(rcd);
 	}
+	for_each_possible_cpu(j) {
+		struct hfi1_opcode_stats_perctx *sp =
+			per_cpu_ptr(dd->tx_opstats, j);
+
+		n_packets += sp->stats[i].n_packets;
+		n_bytes += sp->stats[i].n_bytes;
+	}
 	if (!n_packets && !n_bytes)
 		return SEQ_SKIP;
 	if (!ibd->fault_opcode->n_rxfaults[i] &&

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

  parent reply	other threads:[~2018-01-26 21:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-26 21:28 [PATCH for-next v2 00/16] IB/hfi1, core: Driver updates for 1/26/2018 Dennis Dalessandro
     [not found] ` <20180126211126.12097.47410.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2018-01-26 21:28   ` [PATCH for-next v2 01/16] IB/hfi1: Do not override given pcie_pset value Dennis Dalessandro
2018-01-26 21:29   ` [PATCH for-next v2 02/16] IB/hfi1: Fix for early release of sdma context Dennis Dalessandro
2018-01-26 21:29   ` [PATCH for-next v2 03/16] IB/hfi1: Remove dependence on qp->s_hdrwords Dennis Dalessandro
2018-01-26 21:29   ` [PATCH for-next v2 04/16] IB/hfi1: Remove blind constants from 16B update Dennis Dalessandro
2018-01-26 21:29   ` [PATCH for-next v2 05/16] IB/hfi1: Convert PortXmitWait/PortVLXmitWait counters to flit times Dennis Dalessandro
2018-01-26 21:29   ` [PATCH for-next v2 06/16] IB/hfi1: Fix for potential refcount leak in hfi1_open_file() Dennis Dalessandro
     [not found]     ` <20180126212933.12097.3989.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2018-01-26 22:33       ` Jason Gunthorpe
2018-01-26 21:29   ` Dennis Dalessandro [this message]
2018-01-26 21:29   ` [PATCH for-next v2 08/16] IB/hfi1: Prevent LNI hang when LCB can't obtain lanes Dennis Dalessandro
2018-01-26 21:29   ` [PATCH for-next v2 09/16] IB/hfi1: Compute BTH only for RDMA_WRITE_LAST/SEND_LAST packet Dennis Dalessandro
2018-01-26 21:30   ` [PATCH for-next v2 10/16] IB/hfi1: Optimize packet type comparison using 9B and bypass code paths Dennis Dalessandro
2018-01-26 21:30   ` [PATCH for-next v2 11/16] IB/hfi1: Look up ibport using a pointer in receive path Dennis Dalessandro
2018-01-26 21:30   ` [PATCH for-next v2 12/16] IB/hfi1: Remove unnecessary fecn and becn fields Dennis Dalessandro
2018-01-26 21:30   ` [PATCH for-next v2 13/16] IB/hfi1: Optimize process_receive_ib() Dennis Dalessandro
2018-01-26 21:30   ` [PATCH for-next v2 14/16] IB/hfi1: Re-order IRQ cleanup to address driver cleanup race Dennis Dalessandro
2018-01-26 21:30   ` [PATCH for-next v2 15/16] IB/core: Map iWarp AH type to undefined in rdma_ah_find_type Dennis Dalessandro
     [not found]     ` <20180126213043.12097.88707.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2018-01-26 21:39       ` Parav Pandit
     [not found]         ` <VI1PR0502MB300863FABEA9D4B962E4D826D1E00-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2018-01-26 21:41           ` Parav Pandit
2018-01-27  1:24           ` Weiny, Ira
2018-01-26 22:32       ` Jason Gunthorpe
     [not found]         ` <20180126223252.GE23869-uk2M96/98Pc@public.gmane.org>
2018-01-29 13:24           ` Dennis Dalessandro
     [not found]             ` <368266b8-ae79-3804-38d0-e7730126b532-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-01-31 13:55               ` Dennis Dalessandro
     [not found]                 ` <e2a7ac03-539f-9427-b2bb-03ba7f54cbf3-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-01-31 15:31                   ` Doug Ledford
2018-01-26 21:30   ` [PATCH for-next v2 16/16] IB/ipoib: Fix for potential no-carrier state Dennis Dalessandro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180126212941.12097.34672.stgit@scvm10.sc.intel.com \
    --to=dennis.dalessandro-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=jgg-uk2M96/98Pc@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=michael.j.ruhl-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=mitko.haralanov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox