From: Leon Romanovsky <leon@kernel.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Sanman Pradhan <sanman.p211993@gmail.com>,
Bjorn Helgaas <bhelgaas@google.com>,
netdev@vger.kernel.org, alexanderduyck@fb.com, kuba@kernel.org,
kernel-team@meta.com, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, horms@kernel.org, corbet@lwn.net,
mohsin.bashr@gmail.com, sanmanpradhan@meta.com,
andrew+netdev@lunn.ch, vadim.fedorenko@linux.dev,
jdamato@fastly.com, sdf@fomichev.me, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH net-next] eth: fbnic: Add PCIe hardware statistics
Date: Thu, 7 Nov 2024 10:11:55 +0200 [thread overview]
Message-ID: <20241107081155.GH5006@unreal> (raw)
In-Reply-To: <20241106211738.GA1540450@bhelgaas>
On Wed, Nov 06, 2024 at 03:17:38PM -0600, Bjorn Helgaas wrote:
> On Wed, Nov 06, 2024 at 07:50:54PM +0200, Leon Romanovsky wrote:
> > On Wed, Nov 06, 2024 at 11:12:57AM -0600, Bjorn Helgaas wrote:
> > > On Wed, Nov 06, 2024 at 02:22:51PM +0200, Leon Romanovsky wrote:
> > > > On Tue, Nov 05, 2024 at 04:26:25PM -0800, Sanman Pradhan wrote:
> > > > > Add PCIe hardware statistics support to the fbnic driver. These stats
> > > > > provide insight into PCIe transaction performance and error conditions,
> > > > > including, 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 ethtool and can be used to monitor PCIe
> > > > > performance and debug PCIe issues.
> > > >
> > > > And how does PCIe statistics belong to ethtool?
> > > >
> > > > This PCIe statistics to debug PCIe errors and arguably should be part of
> > > > PCI core and not hidden in netdev tool.
> > >
> > > How would this be done in the PCI core? As far as I can tell, all
> > > these registers are device-specific and live in some device BAR.
> >
> > I would expect some sysfs file/directory exposed through PCI core.
> > That sysfs needs to be connected to the relevant device through
> > callback, like we are doing with .sriov_configure(). So every PCI
> > device will be able to expose statistics without relation to netdev.
> >
> > That interface should provide read access and write access with zero
> > value to reset the counter/counters.
>
> Seems plausible. We do already have something sort of similar with
> aer_stats_attrs[]. I don't think there's a way to reset them though,
Our HW supports reset of PCIe counters.
> and they're just all thrown in the top-level device directory, which
> probably isn't scalable.
This is why directory is probably the best solution.
Thanks
>
> Bjorn
next prev parent reply other threads:[~2024-11-07 8:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 0:26 [PATCH net-next] eth: fbnic: Add PCIe hardware statistics Sanman Pradhan
2024-11-06 0:43 ` Jakub Kicinski
2024-11-06 0:49 ` Joe Damato
2024-11-07 2:14 ` Sanman Pradhan
2024-11-06 12:22 ` Leon Romanovsky
2024-11-06 17:12 ` Bjorn Helgaas
2024-11-06 17:36 ` Andrew Lunn
2024-11-07 0:09 ` Jakub Kicinski
2024-11-07 8:23 ` Leon Romanovsky
2024-11-07 11:30 ` Vadim Fedorenko
2024-11-07 12:03 ` Leon Romanovsky
2024-11-07 15:40 ` Jakub Kicinski
2024-11-07 16:42 ` Leon Romanovsky
2024-11-06 17:50 ` Leon Romanovsky
2024-11-06 21:17 ` Bjorn Helgaas
2024-11-07 8:11 ` Leon Romanovsky [this message]
2024-11-06 17:32 ` Andrew Lunn
2024-11-07 2:16 ` Sanman Pradhan
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=20241107081155.GH5006@unreal \
--to=leon@kernel.org \
--cc=alexanderduyck@fb.com \
--cc=andrew+netdev@lunn.ch \
--cc=bhelgaas@google.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=helgaas@kernel.org \
--cc=horms@kernel.org \
--cc=jdamato@fastly.com \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mohsin.bashr@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sanman.p211993@gmail.com \
--cc=sanmanpradhan@meta.com \
--cc=sdf@fomichev.me \
--cc=vadim.fedorenko@linux.dev \
/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.