diff mbox series

[ethtool] ethtool: ixgbe dump strings for security registers

Message ID 1530576578-17109-1-git-send-email-shannon.nelson@oracle.com
State Awaiting Upstream, archived
Delegated to: John Linville
Headers show
Series [ethtool] ethtool: ixgbe dump strings for security registers | expand

Commit Message

Shannon Nelson July 3, 2018, 12:09 a.m. UTC
Add the ixgbe's security configuration registers into
the register dump.

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
---
 ixgbe.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

NOTE: Obviously this should wait until Intel accepts and pushes the related
      ixgbe patch and Dave accepts it into net-next, but I figured I may
      as well send them out together.
diff mbox series

Patch

diff --git a/ixgbe.c b/ixgbe.c
index c632137..6779402 100644
--- a/ixgbe.c
+++ b/ixgbe.c
@@ -1265,5 +1265,31 @@  ixgbe_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 			regs_buff[1127]);
 	}
 
+	if (regs_buff_len > 1139 && mac_type != ixgbe_mac_82598EB) {
+		fprintf(stdout,
+			"0x08800: SECTXCTRL   (Security Tx Control)            0x%08X\n",
+			regs_buff[1139]);
+
+		fprintf(stdout,
+			"0x08804: SECTXSTAT   (Security Tx Status)             0x%08X\n",
+			regs_buff[1140]);
+
+		fprintf(stdout,
+			"0x08808: SECTXBUFFAF (Security Tx Buffer Almost Full) 0x%08X\n",
+			regs_buff[1141]);
+
+		fprintf(stdout,
+			"0x08800: SECTXMINIFG (Security Tx Buffer Minimum IFG) 0x%08X\n",
+			regs_buff[1142]);
+
+		fprintf(stdout,
+			"0x08800: SECRXCTRL   (Security Rx Control)            0x%08X\n",
+			regs_buff[1143]);
+
+		fprintf(stdout,
+			"0x08800: SECRXSTAT   (Security Rx Status)             0x%08X\n",
+			regs_buff[1144]);
+	}
+
 	return 0;
 }