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]
Message-Id: <20170417232349.GB3569@gwshan>
Date:   Tue, 18 Apr 2017 09:23:49 +1000
From:   Gavin Shan <gwshan@...ux.vnet.ibm.com>
To:     Joe Perches <joe@...ches.com>
Cc:     Gavin Shan <gwshan@...ux.vnet.ibm.com>, netdev@...r.kernel.org,
        davem@...emloft.net
Subject: Re: [PATCH v2 net-next 5/8] net/ncsi: Dump NCSI packet statistics

On Thu, Apr 13, 2017 at 03:50:40AM -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.
>
>trivia:
>
>> diff --git a/net/ncsi/ncsi-debug.c b/net/ncsi/ncsi-debug.c
>> index 6c00e9b..29c233c 100644
>> --- 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 {
>
>static const struct etc...
>

Yes.

>> +	unsigned char	type;
>> +	const char	*name;
>> +} ncsi_pkt_handlers[] = {
>> +	{ NCSI_PKT_CMD_CIS,    "CIS"    },
>[]
>> +static bool ncsi_dev_stats_index(struct ncsi_dev_priv *ndp, loff_t pos,
>> +				 unsigned long *type, unsigned long *index,
>> +				 unsigned long *entries)
>> +{
>> +	int i;
>> +	unsigned long ranges[3][2] = {
>> +		{ 1,
>> +		  ARRAY_SIZE(ndp->stats.cmd) - 1		},
>> +		{ ranges[0][1] + 2,
>> +		  ranges[1][0] + ARRAY_SIZE(ndp->stats.rsp) - 1	},
>> +		{ ranges[1][1] + 2,
>> +		  ranges[2][0] + ARRAY_SIZE(ndp->stats.aen) - 1 }
>> +	};
>
>const?
>

Yes. I will modify in next respin.

Thanks,
Gavin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ