On Mon, Nov 11, 2024 at 11:57:15AM -0800, Sanman Pradhan wrote: > Add PCIe hardware statistics support to the fbnic driver. These stats > provide insight into PCIe transaction performance and error conditions. > > Which includes, read/write and completion TLP counts and DWORD counts and > debug counters for tag, completion credit and NP credit exhaustion > > The stats are exposed via debugfs and can be used to monitor PCIe > performance and debug PCIe issues. > > Signed-off-by: Sanman Pradhan <sanman.p211993@xxxxxxxxx> > --- > v5: > - Add missing fbnic_dbg_init, fbnic_dbg_exit, fbnic_dbg_fbd_init and fbnic_dbg_fbd_exit functions > - Add missing entry in fbnic.h > - Tested on 1-NIC 2-Host system > - Test Logs: > Without ping <remote_host> > # cat /sys/kernel/debug/fbnic/0000\:01\:00.0/pcie_stats > ob_rd_tlp: 88724 > ob_rd_dword: 1363273 > ob_wr_tlp: 980410 > ob_wr_dword: 105006453 > ob_cpl_tlp: 98665 > ob_cpl_dword: 1363273 > ob_rd_no_tag: 0 > ob_rd_no_cpl_cred: 0 > ob_rd_no_np_cred: 0 > With ping <remote_host> > # cat /sys/kernel/debug/fbnic/0000\:01\:00.0/pcie_stats > ob_rd_tlp: 114081 > ob_rd_dword: 1902295 > ob_wr_tlp: 1098457 > ob_wr_dword: 112936622 > ob_cpl_tlp: 128409 > ob_cpl_dword: 1902295 > ob_rd_no_tag: 0 > ob_rd_no_cpl_cred: 0 > ob_rd_no_np_cred: 0 > v4: > - https://patchwork.kernel.org/project/netdevbpf/patch/20241109025905.1531196-1-sanman.p211993@xxxxxxxxx/ > - Fix indentations > - Adding missing updates for previous versions > v3: > - https://patchwork.kernel.org/project/netdevbpf/patch/20241108204640.3165724-1-sanman.p211993@xxxxxxxxx/ > - Moved PCIe stats to debugfs > v2: > - https://patchwork.kernel.org/project/netdevbpf/patch/20241107020555.321245-1-sanman.p211993@xxxxxxxxx/ > - Removed unnecessary code blocks > - Rephrased the commit message > v1: > - https://patchwork.kernel.org/project/netdevbpf/patch/20241106002625.1857904-1-sanman.p211993@xxxxxxxxx/ > --- > .../device_drivers/ethernet/meta/fbnic.rst | 26 ++++ > drivers/net/ethernet/meta/fbnic/Makefile | 1 + > drivers/net/ethernet/meta/fbnic/fbnic.h | 6 + > drivers/net/ethernet/meta/fbnic/fbnic_csr.h | 37 ++++++ > .../net/ethernet/meta/fbnic/fbnic_debugfs.c | 68 +++++++++++ > .../net/ethernet/meta/fbnic/fbnic_devlink.c | 4 + > .../net/ethernet/meta/fbnic/fbnic_hw_stats.c | 114 ++++++++++++++++++ > .../net/ethernet/meta/fbnic/fbnic_hw_stats.h | 12 ++ > .../net/ethernet/meta/fbnic/fbnic_netdev.c | 3 + > drivers/net/ethernet/meta/fbnic/fbnic_pci.c | 8 +- > 10 files changed, 278 insertions(+), 1 deletion(-) > create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_debugfs.c Just FYI this patch does not seem to apply to net-next/main. Did you rebase?