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

Reply via email to