lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 18 Apr 2017 10:14:19 +1000
From:   Gavin Shan <gwshan@...ux.vnet.ibm.com>
To:     Jakub Kicinski <kubakici@...pl>
Cc:     Gavin Shan <gwshan@...ux.vnet.ibm.com>, netdev@...r.kernel.org,
        joe@...ches.com, davem@...emloft.net
Subject: Re: [PATCH v2 net-next 5/8] net/ncsi: Dump NCSI packet statistics

On Thu, Apr 13, 2017 at 06:50:42PM -0700, Jakub Kicinski wrote:
>On Thu, 13 Apr 2017 17:48:18 +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
>> 
>>  RSP          OK       TIMEOUT  ERROR
>>  =======================================
>>  CIS          3        0        0
>>  SP           3        0        0
>>  DP           2        0        1
>>  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          0        0        2
>>  GC           2        0        0
>> 
>>  AEN          OK       TIMEOUT  ERROR
>>  =======================================
>> 
>> Signed-off-by: Gavin Shan <gwshan@...ux.vnet.ibm.com>
>
>I'm not familiar with NC-SI but these look like some standard stats.
>Would it make sense to provide a proper netlink API for them?
>
>[...]
>> +#ifdef CONFIG_NET_NCSI_DEBUG
>> +		ndp->stats.aen[h->type][NCSI_PKT_STAT_ERROR]++;
>> +#endif
>
>In any case, did you consider creating a macro or inline helper to
>limit the number of #ifdefs?
>

Jakub, thanks for the comments. NCSI does have standard statistics
about the packets passed to peer (NIC) or NCSI packets handled by
hardware. I have some patches (not posted yet and won't post in
this merge window) to create debugfs file ncsi/eth0/p0/c0/stats
and dump them there.

This debugfs tracks NCSI packets sent and received by software
in order to see if the software has obvious bugs.

Yeah, it's definitely worthy to eliminate the #ifdef's. I'll do
in next respin.

Thanks,
Gavin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ