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: <122f35a6-a8b6-446a-a76d-9b761c716dfe@lunn.ch>
Date: Mon, 7 Apr 2025 22:43:41 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Moon Yeounsu <yyyynoom@...il.com>
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v6] net: dlink: add support for reporting stats
 via `ethtool -S` and `ip -s -s link show`

> +static const struct dlink_stats stats[] = {
> +	{
> +		.string = "tx_jumbo_frames",
> +		.stat_offset = offsetof(struct netdev_private,
> +					tx_jumbo_frames),
> +		.size = sizeof(u16),
> +		.regs = TxJumboFrames
> +	},
> +	{
> +		.string = "rmon_rx_packets",
> +		.stat_offset = offsetof(struct netdev_private,
> +					rmon_rx_packets),
> +		.size = sizeof(u32),
> +		.regs = EtherStatsPkts
> +	}
> +}, ctrl_stats[] = {
> +	{
> +		.string = "tx_mac_control_frames",

That is an odd way of doing it. It would be better to repeat the
static const struct dlink_stats.

       Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ