From: Allen Hubbe <Allen.Hubbe@emc.com>
To: linux-ntb@googlegroups.com
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
Jon Mason <jdmason@kudzu.us>, Dave Jiang <dave.jiang@intel.com>,
Allen Hubbe <Allen.Hubbe@emc.com>
Subject: [PATCH 3/9] NTB: Fix transport stats for multiple devices
Date: Mon, 29 Jun 2015 10:49:59 -0400 [thread overview]
Message-ID: <1d24d41d6f61b4e06bf7097ea235adf4ca58c363.1435587291.git.Allen.Hubbe@emc.com> (raw)
In-Reply-To: <cover.1435587291.git.Allen.Hubbe@emc.com>
In-Reply-To: <cover.1435587291.git.Allen.Hubbe@emc.com>
From: Dave Jiang <dave.jiang@intel.com>
Currently the debugfs does not have files for all NTB transport queue
pairs. When there are multiple NTBs present in a system, the QP names
of the last transport clobber the names of previously added transport
QPs. Only the last added QPs can be observed via debugfs.
Create a directory per NTB transport to associate the QPs with that
transport. Name the directory the same as the PCI device.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
drivers/ntb/ntb_transport.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c
index 3c257f1d235f..30d8b52421ec 100644
--- a/drivers/ntb/ntb_transport.c
+++ b/drivers/ntb/ntb_transport.c
@@ -211,6 +211,8 @@ struct ntb_transport_ctx {
bool link_is_up;
struct delayed_work link_work;
struct work_struct link_cleanup;
+
+ struct dentry *debugfs_node_dir;
};
enum {
@@ -951,12 +953,12 @@ static int ntb_transport_init_queue(struct ntb_transport_ctx *nt,
qp->tx_max_frame = min(transport_mtu, tx_size / 2);
qp->tx_max_entry = tx_size / qp->tx_max_frame;
- if (nt_debugfs_dir) {
+ if (nt->debugfs_node_dir) {
char debugfs_name[4];
snprintf(debugfs_name, 4, "qp%d", qp_num);
qp->debugfs_dir = debugfs_create_dir(debugfs_name,
- nt_debugfs_dir);
+ nt->debugfs_node_dir);
qp->debugfs_stats = debugfs_create_file("stats", S_IRUSR,
qp->debugfs_dir, qp,
@@ -1059,6 +1061,11 @@ static int ntb_transport_probe(struct ntb_client *self, struct ntb_dev *ndev)
goto err2;
}
+ if (nt_debugfs_dir) {
+ nt->debugfs_node_dir =
+ debugfs_create_dir(pci_name(ndev->pdev), nt_debugfs_dir);
+ }
+
for (i = 0; i < qp_count; i++) {
rc = ntb_transport_init_queue(nt, i);
if (rc)
--
2.4.0.rc0.43.gcf8a8c6
next prev parent reply other threads:[~2015-06-29 14:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 14:49 [PATCH 0/9] NTB: Fix and cleanup ntb drivers Allen Hubbe
2015-06-29 14:49 ` [PATCH 1/9] NTB: Fix ntb_transport out-of-order RX update Allen Hubbe
2015-06-29 14:49 ` Allen Hubbe [this message]
2015-06-29 14:50 ` [PATCH 5/9] NTB: Fix oops in debugfs when transport is half-up Allen Hubbe
2015-06-29 14:50 ` [PATCH 6/9] NTB: Schedule to receive on QP link up Allen Hubbe
2015-06-29 14:50 ` [PATCH 7/9] NTB: Add PCI Device IDs for Broadwell Xeon Allen Hubbe
2015-06-29 14:50 ` [PATCH 8/9] NTB: Make the transport list in order of discovery Allen Hubbe
2015-06-29 14:50 ` [PATCH 9/9] NTB: Clean up QP stats info Allen Hubbe
2015-06-29 15:10 ` [PATCH 0/9] NTB: Fix and cleanup ntb drivers Hubbe, Allen
2015-06-29 15:28 ` [PATCH 2/9] NTB: Add flow control to the ntb_netdev Allen Hubbe
2015-06-29 15:28 ` [PATCH 4/9] NTB: ntb_netdev not covering all receive errors Allen Hubbe
2015-06-29 15:06 ` Hubbe, Allen
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=1d24d41d6f61b4e06bf7097ea235adf4ca58c363.1435587291.git.Allen.Hubbe@emc.com \
--to=allen.hubbe@emc.com \
--cc=dave.jiang@intel.com \
--cc=jdmason@kudzu.us \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntb@googlegroups.com \
--cc=linux-pci@vger.kernel.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
all inboxes | Powered by JetHome®