All of lore.kernel.org
 help / color / mirror / Atom feed
From: Murali Karicheri <m-karicheri2@ti.com>
To: <davem@davemloft.net>, <kuba@kernel.org>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-api@vger.kernel.org>, <nsekhar@ti.com>,
	<grygorii.strashko@ti.com>
Subject: [net-next RFC PATCH 13/13] net: prp: enhance debugfs to display PRP specific info in node table
Date: Wed, 6 May 2020 12:30:33 -0400	[thread overview]
Message-ID: <20200506163033.3843-14-m-karicheri2@ti.com> (raw)
In-Reply-To: <20200506163033.3843-1-m-karicheri2@ti.com>

Print PRP specific information from node table as part of debugfs
node table display

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
---
 net/hsr-prp/hsr_prp_debugfs.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/net/hsr-prp/hsr_prp_debugfs.c b/net/hsr-prp/hsr_prp_debugfs.c
index 7d8dd5ab3afd..28580de4de44 100644
--- a/net/hsr-prp/hsr_prp_debugfs.c
+++ b/net/hsr-prp/hsr_prp_debugfs.c
@@ -37,7 +37,11 @@ hsr_prp_node_table_show(struct seq_file *sfp, void *data)
 
 	seq_puts(sfp, "Node Table entries\n");
 	seq_puts(sfp, "MAC-Address-A,   MAC-Address-B, time_in[A], ");
-	seq_puts(sfp, "time_in[B], Address-B port\n");
+	seq_puts(sfp, "time_in[B], Address-B port");
+	if (priv->prot_version == PRP_V1)
+		seq_puts(sfp, ", san_a, san_b\n");
+	else
+		seq_puts(sfp, "\n");
 	rcu_read_lock();
 	list_for_each_entry_rcu(node, &priv->node_db, mac_list) {
 		/* skip self node */
@@ -48,7 +52,12 @@ hsr_prp_node_table_show(struct seq_file *sfp, void *data)
 		print_mac_address(sfp, &node->macaddress_B[0]);
 		seq_printf(sfp, "0x%lx, ", node->time_in[HSR_PRP_PT_SLAVE_A]);
 		seq_printf(sfp, "0x%lx ", node->time_in[HSR_PRP_PT_SLAVE_B]);
-		seq_printf(sfp, "0x%x\n", node->addr_B_port);
+		seq_printf(sfp, "0x%x", node->addr_B_port);
+
+		if (priv->prot_version == PRP_V1)
+			seq_printf(sfp, ", %x, %x\n", node->san_a, node->san_b);
+		else
+			seq_puts(sfp, "\n");
 	}
 	rcu_read_unlock();
 	return 0;
@@ -57,7 +66,8 @@ hsr_prp_node_table_show(struct seq_file *sfp, void *data)
 /* hsr_prp_node_table_open - Open the node_table file
  *
  * Description:
- * This routine opens a debugfs file node_table of specific hsr device
+ * This routine opens a debugfs file node_table of specific hsr
+ * or prp device
  */
 static int
 hsr_prp_node_table_open(struct inode *inode, struct file *filp)
-- 
2.17.1


  parent reply	other threads:[~2020-05-06 16:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 16:30 [net-next RFC PATCH 00/13] net: hsr: Add PRP driver Murali Karicheri
2020-05-06 16:30 ` [net-next RFC PATCH 01/13] net: hsr: Re-use Kconfig option to support PRP Murali Karicheri
2020-05-06 16:30 ` [net-next RFC PATCH 02/13] net: hsr: rename hsr directory to hsr-prp to introduce PRP Murali Karicheri
2020-05-06 16:30 ` [net-next RFC PATCH 03/13] net: hsr: rename files to introduce PRP support Murali Karicheri
2020-05-06 16:30 ` [net-next RFC PATCH 04/13] net: hsr: rename hsr variable inside struct hsr_port to priv Murali Karicheri
2020-05-06 16:30 ` [net-next RFC PATCH 05/13] net: hsr: rename hsr_port_get_hsr() to hsr_prp_get_port() Murali Karicheri
2020-05-06 16:30 ` [net-next RFC PATCH 06/13] net: hsr: some renaming to introduce PRP driver support Murali Karicheri
2020-05-06 16:30 ` [net-next RFC PATCH 07/13] net: hsr: introduce common uapi include/definitions for HSR and PRP Murali Karicheri
2020-05-06 16:30 ` [net-next RFC PATCH 08/13] net: hsr: migrate HSR netlink socket code to use new common API Murali Karicheri
2020-05-06 16:30 ` [net-next RFC PATCH 09/13] net: hsr: move re-usable code for PRP to hsr_prp_netlink.c Murali Karicheri
2020-05-06 16:30 ` [net-next RFC PATCH 10/13] net: hsr: add netlink socket interface for PRP Murali Karicheri
2020-05-06 16:30 ` [net-next RFC PATCH 11/13] net: prp: add supervision frame generation and handling support Murali Karicheri
2020-05-06 16:30 ` [net-next RFC PATCH 12/13] net: prp: add packet " Murali Karicheri
2020-05-06 16:30 ` Murali Karicheri [this message]
2020-05-13 12:27 ` [net-next RFC PATCH 00/13] net: hsr: Add PRP driver Murali Karicheri
2020-05-21 12:34   ` Murali Karicheri
2020-05-21 17:31 ` Vinicius Costa Gomes
2020-05-25 16:49   ` Murali Karicheri
2020-05-26 18:56     ` Vinicius Costa Gomes
2020-05-26 21:51       ` Murali Karicheri
2020-05-25 21:37   ` Vladimir Oltean
2020-05-26 14:12     ` Murali Karicheri
2020-05-26 18:25       ` Vladimir Oltean
2020-05-26 21:33         ` Murali Karicheri
2020-05-26 18:09     ` Vinicius Costa Gomes

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=20200506163033.3843-14-m-karicheri2@ti.com \
    --to=m-karicheri2@ti.com \
    --cc=davem@davemloft.net \
    --cc=grygorii.strashko@ti.com \
    --cc=kuba@kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.