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: <1492080640.28586.15.camel@perches.com>
Date:   Thu, 13 Apr 2017 03:50:40 -0700
From:   Joe Perches <joe@...ches.com>
To:     Gavin Shan <gwshan@...ux.vnet.ibm.com>, netdev@...r.kernel.org
Cc:     davem@...emloft.net
Subject: Re: [PATCH v2 net-next 5/8] net/ncsi: Dump NCSI packet statistics

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...

> +	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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ