Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1173857
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Allen Hubbe <Allen.Hubbe@emc.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/9] NTB: Fix transport stats for multiple devices |
| Date | Mon, 29 Jun 2015 17:00:02 +0200 |
| Message-ID | <pGIHo-683-23@gated-at.bofh.it> (permalink) |
| References | <pGIHn-683-5@gated-at.bofh.it> |
| X-Original-To | linux-ntb@googlegroups.com |
| X-Dkim | OpenDKIM Filter v2.4.3 mailuogwprd53.lss.emc.com t5TEoWHc001410 |
| Dkim-Signature | v=1; a=rsa-sha1; c=relaxed/relaxed; d=emc.com; s=jan2013; t=1435589434; bh=kPd5t3k+syc7TsaxCgNZ3R9POc0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: In-Reply-To:References; b=r4nmbAQ8EASmL9RhYQlgvCsd/DzGsYhf4nWWa/Ad5rRmJD2f+L1vtNItoW7Hyv+3c cQxWecVzR3d6gyMKujk45Gg2LnKkfuxh2ZO78T+VpruOrT4h2JX0UFtCMeBt6llSqF w7x4ufwkEveKpjVpdXRb2nT7ILUmY3i/fk6l7HL8= |
| X-Dkim | OpenDKIM Filter v2.4.3 mailuogwprd53.lss.emc.com t5TEoWHc001410 |
| X-Mailer | git-send-email 2.4.0.rc0.44.g244209c.dirty |
| X-Rsa-Classifications | public |
| X-Sentrion-Hostname | mailuogwprd53.lss.emc.com |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 63 |
| Organization | linux.* mail to news gateway |
| X-Original-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> |
| X-Original-Date | Mon, 29 Jun 2015 10:49:59 -0400 |
| X-Original-Message-ID | <1d24d41d6f61b4e06bf7097ea235adf4ca58c363.1435587291.git.Allen.Hubbe@emc.com> |
| X-Original-References | <cover.1435587291.git.Allen.Hubbe@emc.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1173857 |
Show key headers only | View raw
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/9] NTB: Fix and cleanup ntb drivers Allen Hubbe <Allen.Hubbe@emc.com> - 2015-06-29 17:00 +0200
[PATCH 5/9] NTB: Fix oops in debugfs when transport is half-up Allen Hubbe <Allen.Hubbe@emc.com> - 2015-06-29 17:00 +0200
[PATCH 6/9] NTB: Schedule to receive on QP link up Allen Hubbe <Allen.Hubbe@emc.com> - 2015-06-29 17:00 +0200
[PATCH 8/9] NTB: Make the transport list in order of discovery Allen Hubbe <Allen.Hubbe@emc.com> - 2015-06-29 17:00 +0200
[PATCH 3/9] NTB: Fix transport stats for multiple devices Allen Hubbe <Allen.Hubbe@emc.com> - 2015-06-29 17:00 +0200
[PATCH 1/9] NTB: Fix ntb_transport out-of-order RX update Allen Hubbe <Allen.Hubbe@emc.com> - 2015-06-29 17:00 +0200
RE: [PATCH 4/9] NTB: ntb_netdev not covering all receive errors "Hubbe, Allen" <Allen.Hubbe@emc.com> - 2015-06-29 17:10 +0200
RE: [PATCH 0/9] NTB: Fix and cleanup ntb drivers "Hubbe, Allen" <Allen.Hubbe@emc.com> - 2015-06-29 17:20 +0200
[PATCH 2/9] NTB: Add flow control to the ntb_netdev Allen Hubbe <Allen.Hubbe@emc.com> - 2015-06-29 17:30 +0200
[PATCH 4/9] NTB: ntb_netdev not covering all receive errors Allen Hubbe <Allen.Hubbe@emc.com> - 2015-06-29 17:40 +0200
csiph-web