Skip to contentSkip to conversation

ethtool: fbnic: ethtool dump parser

PATCH Applied Mohsin Bashir 2 participants 2 messages Apr 17, 2025 – Apr 29, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ethtool: fbnic: ethtool dump parser

This patch adds support for parsing the register dump for fbnic.

The patch is composed of several register sections, and each of these sections is dumped lineraly except for the RPC_RAM section which is handled differently.

For each of the sections, we dump register name, its value, the bit mask of any subfields within that register, the name of the subfield, and the corresponding value.

Furthermore, there may be unused blocks within a section; we skip such blocks while dumping registers linearly.

Validation:
- Validate patch applies to master without any warning
- Validate 'ethtool -d' for net-next branch generates ascii dump

	$ uname -r
	  6.14.0-0_fbk701_rc0_429_g8e5edf971d0
	$ ./ethtool -d eth0 > /tmp/fbnic_ascii_dump

- Verify patch compiles without any warning on 32bit make clean && ./configure CFLAGS="-m32" && make && make check
=======================================================================
Testsuite summary for ethtool 6.14
=======================================================================
# TOTAL: 1
# PASS: 1
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
=======================================================================

---
Changelog:

V2: Address type related warnings
V1: https://lore.kernel.org/netdev/[email protected]

---
 Makefile.am |     2 +-
 ethtool.c   |     1 +
 fbnic.c     | 25504 ++++++++++++++++++++++++++++++++++++++++++++++++++
 internal.h  |     2 +
 4 files changed, 25508 insertions(+), 1 deletion(-)
 create mode 100644 fbnic.c
Makefile.am +1 -1
index 70aa040..cdf2bd8 100644
@@ -28,7 +28,7 @@ ethtool_SOURCES += \
 		  sff-common.c sff-common.h module-common.c module-common.h \
 		  sfpid.c sfpdiag.c ixgbevf.c tse.c vmxnet3.c qsfp.c qsfp.h \
 		  fjes.c lan78xx.c igc.c cmis.c cmis.h bnxt.c cpsw.c lan743x.c \
-		  hns3.c
+		  hns3.c fbnic.c
 endif
 
 if ENABLE_BASH_COMPLETION
ethtool.c +1 -0
index 9c8a542..44a3ba4 100644
@@ -1206,6 +1206,7 @@ static const struct {
 	{ "fsl_enetc", fsl_enetc_dump_regs },
 	{ "fsl_enetc_vf", fsl_enetc_dump_regs },
 	{ "hns3", hns3_dump_regs },
+	{ "fbnic", fbnic_dump_regs },
 };
 #endif
 
fbnic.c new file +25504 -0

2,985 lines not on this page · raw message

internal.h +2 -0
index f33539d..6947ec1 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.47.1

Part of the diff is not shown here. View the raw message.

#1 lore raw
This patch was applied to ethtool/ethtool.git (master) by Michal Kubecek <[email protected]>:

Hello:

This patch was applied to ethtool/ethtool.git (master) by Michal Kubecek <[email protected]>:

Quoted 11 lines · On Wed, 16 Apr 2025 17:30:20 -0700 you wrote:

This patch adds support for parsing the register dump for fbnic.

The patch is composed of several register sections, and each of these sections is dumped lineraly except for the RPC_RAM section which is handled differently.

For each of the sections, we dump register name, its value, the bit mask of any subfields within that register, the name of the subfield, and the corresponding value.

[...]

Here is the summary with links:
- [ethtool-next,V2] ethtool: fbnic: ethtool dump parser

    https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/?id=a38a2d3a8271

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html