From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: David Miller <davem@davemloft.net>
Cc: gwshan@linux.vnet.ibm.com, netdev@vger.kernel.org,
joe@perches.com, kubakici@wp.pl
Subject: Re: [PATCH v3 net-next 5/8] net/ncsi: Dump NCSI packet statistics
Date: Fri, 21 Apr 2017 09:38:12 +1000 [thread overview]
Message-ID: <20170420233812.GA7223@gwshan> (raw)
In-Reply-To: <20170420.132103.454438573956782815.davem@davemloft.net>
On Thu, Apr 20, 2017 at 01:21:03PM -0400, David Miller wrote:
>From: Gavin Shan <gwshan@linux.vnet.ibm.com>
>Date: Tue, 18 Apr 2017 16:51:32 +1000
>
>> This creates /sys/kernel/debug/ncsi/<eth0>/stats to dump the NCSI
>> packets sent and received over all packages and channels. It's useful
>> to diagnose NCSI problems, especially when NCSI packages and channels
>> aren't probed properly. The statistics can be gained from debugfs file
>> as below:
>>
>> # cat /sys/kernel/debug/ncsi/eth0/stats
>
>There is no reason you cannot use ethtool statistics to provide this
>information to the user.
>
It can be dumped by ethtool, but it's more reasonable to dump them
through debugfs for couple of reasons: (1) ethtool usually dumps
statistics collected by hardware, but this debugfs file dumps the
statistics of packets seen (collected) by software. They are different
things. Note that NCSI channel collects statistics in hardware and it's
not exposed or dumped by this patchset. They are candidates for ethtool.
(2) To expose this through ethtool relies on the availability of the tool.
It's nicer not to depend on it. (3) This interface can be used to check
the debug packet has been sent successfully through /sys/kernel/debug/ncsi/eth0/pkt,
dumping the statistics through debugfs make this (debugging) mechanism
consistent.
Thanks,
Gavin
next prev parent reply other threads:[~2017-04-20 23:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 6:51 [PATCH v3 net-next 0/8] net/ncsi: Add debugging functionality Gavin Shan
2017-04-18 6:51 ` [PATCH v3 net-next 1/8] net/ncsi: Disable HWA mode when no channels are found Gavin Shan
2017-04-18 6:51 ` [PATCH v3 net-next 2/8] net/ncsi: Properly track channel monitor timer state Gavin Shan
2017-04-18 6:51 ` [PATCH v3 net-next 3/8] net/ncsi: Enforce failover on link monitor timeout Gavin Shan
2017-04-18 6:51 ` [PATCH v3 net-next 4/8] net/ncsi: Add debugging infrastructurre Gavin Shan
2017-04-18 6:51 ` [PATCH v3 net-next 5/8] net/ncsi: Dump NCSI packet statistics Gavin Shan
2017-04-20 17:21 ` David Miller
2017-04-20 23:38 ` Gavin Shan [this message]
2017-04-21 0:26 ` Florian Fainelli
2017-04-21 0:44 ` Gavin Shan
2017-04-21 0:59 ` Florian Fainelli
2017-04-21 1:35 ` Gavin Shan
2017-04-21 1:43 ` Joe Perches
2017-04-21 0:58 ` David Miller
2017-04-21 2:33 ` Gavin Shan
2017-04-18 6:51 ` [PATCH v3 net-next 6/8] net/ncsi: Support NCSI packet generation Gavin Shan
2017-04-18 6:51 ` [PATCH v3 net-next 7/8] net/ncsi: No error report on DP response to non-existing package Gavin Shan
2017-04-18 6:51 ` [PATCH v3 net-next 8/8] net/ncsi: Fix length of GVI response packet Gavin Shan
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=20170420233812.GA7223@gwshan \
--to=gwshan@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=kubakici@wp.pl \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox