From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: Joe Perches <joe@perches.com>
Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>,
netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH v2 net-next 5/8] net/ncsi: Dump NCSI packet statistics
Date: Tue, 18 Apr 2017 10:22:47 +1000 [thread overview]
Message-ID: <20170418002247.GB11300@gwshan> (raw)
In-Reply-To: <1492137045.28586.26.camel@perches.com>
On Thu, Apr 13, 2017 at 07:30:45PM -0700, Joe Perches wrote:
>On Thu, 2017-04-13 at 17:48 +1000, Gavin Shan wrote:
>> 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
>>
>> CMD OK TIMEOUT ERROR
>> =======================================
>> CIS 32 29 0
>> SP 10 7 0
>> DP 17 14 0
>> EC 1 0 0
>> ECNT 1 0 0
>> AE 1 0 0
>> GLS 11 0 0
>> SMA 1 0 0
>> EBF 1 0 0
>> GVI 2 0 0
>> GC 2 0 0
>
>more trivia:
>
>> diff --git a/net/ncsi/ncsi-debug.c b/net/ncsi/ncsi-debug.c
>[]
>> @@ -23,6 +23,235 @@
>> #include "ncsi-pkt.h"
>>
>> static struct dentry *ncsi_dentry;
>> +static struct ncsi_pkt_handler {
>> + unsigned char type;
>> + const char *name;
>> +} ncsi_pkt_handlers[] = {
>> + { NCSI_PKT_CMD_CIS, "CIS" },
>> + { NCSI_PKT_CMD_SP, "SP" },
>> + { NCSI_PKT_CMD_DP, "DP" },
>> + { NCSI_PKT_CMD_EC, "EC" },
>> + { NCSI_PKT_CMD_DC, "DC" },
>> + { NCSI_PKT_CMD_RC, "RC" },
>> + { NCSI_PKT_CMD_ECNT, "ECNT" },
>> + { NCSI_PKT_CMD_DCNT, "DCNT" },
>> + { NCSI_PKT_CMD_AE, "AE" },
>> + { NCSI_PKT_CMD_SL, "SL" },
>> + { NCSI_PKT_CMD_GLS, "GLS" },
>> + { NCSI_PKT_CMD_SVF, "SVF" },
>> + { NCSI_PKT_CMD_EV, "EV" },
>> + { NCSI_PKT_CMD_DV, "DV" },
>> + { NCSI_PKT_CMD_SMA, "SMA" },
>> + { NCSI_PKT_CMD_EBF, "EBF" },
>> + { NCSI_PKT_CMD_DBF, "DBF" },
>> + { NCSI_PKT_CMD_EGMF, "EGMF" },
>> + { NCSI_PKT_CMD_DGMF, "DGMF" },
>> + { NCSI_PKT_CMD_SNFC, "SNFC" },
>> + { NCSI_PKT_CMD_GVI, "GVI" },
>> + { NCSI_PKT_CMD_GC, "GC" },
>> + { NCSI_PKT_CMD_GP, "GP" },
>> + { NCSI_PKT_CMD_GCPS, "GCPS" },
>> + { NCSI_PKT_CMD_GNS, "GNS" },
>> + { NCSI_PKT_CMD_GNPTS, "GNPTS" },
>> + { NCSI_PKT_CMD_GPS, "GPS" },
>> + { NCSI_PKT_CMD_OEM, "OEM" },
>> + { NCSI_PKT_CMD_PLDM, "PLDM" },
>> + { NCSI_PKT_CMD_GPUUID, "GPUUID" },
>
>I don't know how common these are and how
>intelligible these acronyms are to knowledgeable
>developer/users, but maybe it'd be better to
>spell out what these are instead of having to
>look up what the acronyms stand for
>
> CIS - Clear Initial State
> SP - Select Package
> etc...
>
>Maybe copy the descriptions from the ncsi-pkt.h file
>
Joe, good question. As these decriptive strings are part of
the output from ncsi/eth0/stats and input to ncsi/eth0/pkt,
I intended to keep them short enough. Also, this debugging
interface would service developers who knows NCSI protocol
and perhaps know the meanings of these acronyms.
Thanks,
Gavin
>#define NCSI_PKT_CMD_CIS 0x00 /* Clear Initial State */
>#define NCSI_PKT_CMD_SP 0x01 /* Select Package */
>#define NCSI_PKT_CMD_DP 0x02 /* Deselect Package */
>#define NCSI_PKT_CMD_EC 0x03 /* Enable Channel */
>#define NCSI_PKT_CMD_DC 0x04 /* Disable Channel */
>#define NCSI_PKT_CMD_RC 0x05 /* Reset Channel */
>#define NCSI_PKT_CMD_ECNT 0x06 /* Enable Channel Network Tx */
>#define NCSI_PKT_CMD_DCNT 0x07 /* Disable Channel Network Tx */
>#define NCSI_PKT_CMD_AE 0x08 /* AEN Enable */
>#define NCSI_PKT_CMD_SL 0x09 /* Set Link */
>#define NCSI_PKT_CMD_GLS 0x0a /* Get Link */
>#define NCSI_PKT_CMD_SVF 0x0b /* Set VLAN Filter */
>#define NCSI_PKT_CMD_EV 0x0c /* Enable VLAN */
>#define NCSI_PKT_CMD_DV 0x0d /* Disable VLAN */
>#define NCSI_PKT_CMD_SMA 0x0e /* Set MAC address */
>#define NCSI_PKT_CMD_EBF 0x10 /* Enable Broadcast Filter */
>#define NCSI_PKT_CMD_DBF 0x11 /* Disable Broadcast Filter */
>#define NCSI_PKT_CMD_EGMF 0x12 /* Enable Global Multicast Filter */
>#define NCSI_PKT_CMD_DGMF 0x13 /* Disable Global Multicast Filter */
>#define NCSI_PKT_CMD_SNFC 0x14 /* Set NCSI Flow Control */
>#define NCSI_PKT_CMD_GVI 0x15 /* Get Version ID */
>#define NCSI_PKT_CMD_GC 0x16 /* Get Capabilities */
>#define NCSI_PKT_CMD_GP 0x17 /* Get Parameters */
>#define NCSI_PKT_CMD_GCPS 0x18 /* Get Controller Packet Statistics */
>#define NCSI_PKT_CMD_GNS 0x19 /* Get NCSI Statistics */
>#define NCSI_PKT_CMD_GNPTS 0x1a /* Get NCSI Pass-throu Statistics */
>#define NCSI_PKT_CMD_GPS 0x1b /* Get package status */
>#define NCSI_PKT_CMD_OEM 0x50 /* OEM */
>#define NCSI_PKT_CMD_PLDM 0x51 /* PLDM request over NCSI over RBT */
>#define NCSI_PKT_CMD_GPUUID 0x52 /* Get package UUID */
>
next prev parent reply other threads:[~2017-04-18 0:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-13 7:48 [PATCH v2 net-next 0/8] net/ncsi: Add debugging functionality Gavin Shan
2017-04-13 7:48 ` [PATCH v2 net-next 1/8] net/ncsi: Disable HWA mode when no channels are found Gavin Shan
2017-04-13 7:48 ` [PATCH v2 net-next 2/8] net/ncsi: Properly track channel monitor timer state Gavin Shan
2017-04-13 7:48 ` [PATCH v2 net-next 3/8] net/ncsi: Enforce failover on link monitor timeout Gavin Shan
2017-04-13 7:48 ` [PATCH v2 net-next 4/8] net/ncsi: Add debugging infrastructurre Gavin Shan
2017-04-13 10:41 ` Joe Perches
2017-04-17 23:22 ` Gavin Shan
2017-04-13 7:48 ` [PATCH v2 net-next 5/8] net/ncsi: Dump NCSI packet statistics Gavin Shan
2017-04-13 10:50 ` Joe Perches
2017-04-17 23:23 ` Gavin Shan
2017-04-14 1:50 ` Jakub Kicinski
2017-04-18 0:14 ` Gavin Shan
2017-04-14 2:30 ` Joe Perches
2017-04-18 0:22 ` Gavin Shan [this message]
2017-04-13 7:48 ` [PATCH v2 net-next 6/8] net/ncsi: Support NCSI packet generation Gavin Shan
2017-04-13 7:48 ` [PATCH v2 net-next 7/8] net/ncsi: No error report on DP response to non-existing package Gavin Shan
2017-04-13 7:48 ` [PATCH v2 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=20170418002247.GB11300@gwshan \
--to=gwshan@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--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