From: "Ruhl, Michael J" <michael.j.ruhl@intel.com>
To: "Dalessandro, Dennis" <dennis.dalessandro@intel.com>,
"jgg@ziepe.ca" <jgg@ziepe.ca>,
"dledford@redhat.com" <dledford@redhat.com>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"Marciniszyn, Mike" <mike.marciniszyn@intel.com>,
"Wan, Kaike" <kaike.wan@intel.com>
Subject: RE: [PATCH for-next v2 02/11] IB/hfi1: List all receive contexts from debugfs
Date: Mon, 2 Dec 2019 13:30:59 +0000 [thread overview]
Message-ID: <14063C7AD467DE4B82DEDB5C278E8663D9C96A57@FMSMSX108.amr.corp.intel.com> (raw)
In-Reply-To: <20191126141220.58836.41480.stgit@awfm-01.aw.intel.com>
>-----Original Message-----
>From: Dalessandro, Dennis <dennis.dalessandro@intel.com>
>Sent: Tuesday, November 26, 2019 9:12 AM
>To: jgg@ziepe.ca; dledford@redhat.com
>Cc: linux-rdma@vger.kernel.org; Ruhl, Michael J <michael.j.ruhl@intel.com>;
>Marciniszyn, Mike <mike.marciniszyn@intel.com>; Wan, Kaike
><kaike.wan@intel.com>
>Subject: [PATCH for-next v2 02/11] IB/hfi1: List all receive contexts from
>debugfs
>
>From: Michael J. Ruhl <michael.j.ruhl@intel.com>
>
>The current debugfs output for receive contexts (rcds), stops after
>the kernel receive contexts have been displayed. This is not enough
>information.
>
>Display all of the receive contexts.
>
>Augment the output with some more context information.
>
>Limit the ring buffer header output to 5 entries to avoid
>overextending they sequential file output.
Minor nit:
s/they/the
Mike
>
>Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
>Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
>Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
>Signed-off-by: Kaike Wan <kaike.wan@intel.com>
>Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
>---
> drivers/infiniband/hw/hfi1/debugfs.c | 2 +-
> drivers/infiniband/hw/hfi1/driver.c | 12 +++++++++---
> 2 files changed, 10 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/infiniband/hw/hfi1/debugfs.c
>b/drivers/infiniband/hw/hfi1/debugfs.c
>index d268bf9..4633a0c 100644
>--- a/drivers/infiniband/hw/hfi1/debugfs.c
>+++ b/drivers/infiniband/hw/hfi1/debugfs.c
>@@ -379,7 +379,7 @@ static void *_rcds_seq_next(struct seq_file *s, void *v,
>loff_t *pos)
> struct hfi1_devdata *dd = dd_from_dev(ibd);
>
> ++*pos;
>- if (!dd->rcd || *pos >= dd->n_krcv_queues)
>+ if (!dd->rcd || *pos >= dd->num_rcv_contexts)
> return NULL;
> return pos;
> }
>diff --git a/drivers/infiniband/hw/hfi1/driver.c
>b/drivers/infiniband/hw/hfi1/driver.c
>index cbc5219..8374922 100644
>--- a/drivers/infiniband/hw/hfi1/driver.c
>+++ b/drivers/infiniband/hw/hfi1/driver.c
>@@ -1726,23 +1726,29 @@ static int process_receive_invalid(struct
>hfi1_packet *packet)
> return RHF_RCV_CONTINUE;
> }
>
>+#define HFI1_RCVHDR_DUMP_MAX 5
>+
> void seqfile_dump_rcd(struct seq_file *s, struct hfi1_ctxtdata *rcd)
> {
> struct hfi1_packet packet;
> struct ps_mdata mdata;
>+ int i;
>
>- seq_printf(s, "Rcd %u: RcvHdr cnt %u entsize %u %s head %llu tail
>%llu\n",
>+ seq_printf(s, "Rcd %u: RcvHdr cnt %u entsize %u %s ctrl 0x%08llx
>status 0x%08llx, head %llu tail %llu sw head %u\n",
> rcd->ctxt, get_hdrq_cnt(rcd), get_hdrqentsize(rcd),
> get_dma_rtail_setting(rcd) ?
> "dma_rtail" : "nodma_rtail",
>+ read_kctxt_csr(rcd->dd, rcd->ctxt, RCV_CTXT_CTRL),
>+ read_kctxt_csr(rcd->dd, rcd->ctxt, RCV_CTXT_STATUS),
> read_uctxt_csr(rcd->dd, rcd->ctxt, RCV_HDR_HEAD) &
> RCV_HDR_HEAD_HEAD_MASK,
>- read_uctxt_csr(rcd->dd, rcd->ctxt, RCV_HDR_TAIL));
>+ read_uctxt_csr(rcd->dd, rcd->ctxt, RCV_HDR_TAIL),
>+ rcd->head);
>
> init_packet(rcd, &packet);
> init_ps_mdata(&mdata, &packet);
>
>- while (1) {
>+ for (i = 0; i < HFI1_RCVHDR_DUMP_MAX; i++) {
> __le32 *rhf_addr = (__le32 *)rcd->rcvhdrq + mdata.ps_head
>+
> rcd->rhf_offset;
> struct ib_header *hdr;
next prev parent reply other threads:[~2019-12-02 13:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 14:12 [PATCH for-next v2 00/11] rdmavt/hfi1 updates for next Dennis Dalessandro
2019-11-26 14:12 ` [PATCH for-next v2 01/11] IB/hfi1: Add accessor API routines to access context members Dennis Dalessandro
2019-11-26 14:12 ` [PATCH for-next v2 02/11] IB/hfi1: List all receive contexts from debugfs Dennis Dalessandro
2019-12-02 13:30 ` Ruhl, Michael J [this message]
2019-12-05 13:49 ` [PATCH for-next v3] " Dennis Dalessandro
2020-01-03 19:48 ` Jason Gunthorpe
2019-11-26 14:12 ` [PATCH for-next v2 03/11] IB/hfi1: Move chip specific functions to chip.c Dennis Dalessandro
2019-11-26 14:12 ` [PATCH for-next v2 04/11] IB/hfi1: Add fast and slow handlers for receive context Dennis Dalessandro
2019-11-26 14:12 ` [PATCH for-next v2 05/11] IB/hfi1: Move common receive IRQ code to function Dennis Dalessandro
2019-11-26 14:12 ` [PATCH for-next v2 06/11] IB/hfi1: IB/hfi1: Add an API to handle special case drop Dennis Dalessandro
2019-11-26 14:12 ` [PATCH for-next v2 07/11] IB/hfi1: Create API for auto activate Dennis Dalessandro
2019-11-26 14:12 ` [PATCH for-next v2 08/11] IB/hfi1: Decouple IRQ name from type Dennis Dalessandro
2019-11-26 14:13 ` [PATCH for-next v2 09/11] IB/hfi1: Return void in packet receiving functions Dennis Dalessandro
2019-11-26 14:13 ` [PATCH for-next v2 10/11] IB/rdmavt: Correct comments in rdmavt_qp.h header Dennis Dalessandro
2019-11-26 14:13 ` [PATCH for-next v2 11/11] IB/hfi1: Don't cancel unused work item Dennis Dalessandro
2019-11-26 15:31 ` [PATCH for-next v2 00/11] rdmavt/hfi1 updates for next Jason Gunthorpe
2019-12-11 13:34 ` Dennis Dalessandro
2019-12-11 16:21 ` Jason Gunthorpe
2019-12-11 16:33 ` 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=14063C7AD467DE4B82DEDB5C278E8663D9C96A57@FMSMSX108.amr.corp.intel.com \
--to=michael.j.ruhl@intel.com \
--cc=dennis.dalessandro@intel.com \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=kaike.wan@intel.com \
--cc=linux-rdma@vger.kernel.org \
--cc=mike.marciniszyn@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).