From: Ben Hutchings <ben@decadent.org.uk>
To: David Laight <David.Laight@ACULAB.COM>
Cc: David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 10/14] ethtool: Expand documentation of struct ethtool_stats
Date: Thu, 13 Feb 2014 22:56:08 +0000 [thread overview]
Message-ID: <1392332168.15615.54.camel@deadeye.wl.decadent.org.uk> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D0F6BE9D4@AcuExch.aculab.com>
[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]
On Thu, 2014-02-13 at 09:17 +0000, David Laight wrote:
> From: Of Ben Hutchings
> > -/* for dumping NIC-specific statistics */
> > +/**
> > + * struct ethtool_stats - device-specific statistics
> > + * @cmd: Command number = %ETHTOOL_GSTATS
> > + * @n_stats: On return, the number of statistics
> > + * @data: Array of statistics
> > + *
> > + * Users must use %ETHTOOL_GSSET_INFO or %ETHTOOL_GDRVINFO to find the
> > + * number of statistics that will be returned. They must allocate a
> > + * buffer of the appropriate size (8 * number of statistics)
> > + * immediately following this structure.
> > + */
> > struct ethtool_stats {
> > - __u32 cmd; /* ETHTOOL_GSTATS */
> > - __u32 n_stats; /* number of u64's being returned */
> > + __u32 cmd;
> > + __u32 n_stats;
> > __u64 data[0];
> > };
>
> Hmmm... Although that allows some script to generate documentation,
> for anyone looking at the heeder file it seems a retrograde step.
Really, it's not that far to look. And this way allows explaining how
the whole thing works, not just each field in isolation.
Ben.
--
Ben Hutchings
The world is coming to an end. Please log off.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
next prev parent reply other threads:[~2014-02-13 22:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-12 22:13 [PATCH net-next 00/14] ethtool: Improve documentation Ben Hutchings
2014-02-12 22:13 ` [PATCH net-next 01/14] ethtool: Expand documentation of struct ethtool_cmd Ben Hutchings
2014-02-12 22:14 ` [PATCH net-next 02/14] ethtool: Expand documentation of struct ethtool_drvinfo Ben Hutchings
2014-02-12 22:14 ` [PATCH net-next 03/14] ethtool: Expand documentation of struct ethtool_wol Ben Hutchings
2014-02-12 22:14 ` [PATCH net-next 04/14] ethtool: Expand documentation of struct ethtool_regs Ben Hutchings
2014-02-12 22:14 ` [PATCH net-next 05/14] ethtool: Expand documentation of struct ethtool_eeprom Ben Hutchings
2014-02-12 22:14 ` [PATCH net-next 06/14] ethtool: Expand documentation of struct ethtool_ringparam Ben Hutchings
2014-02-12 22:14 ` [PATCH net-next 07/14] ethtool: Update documentation of struct ethtool_pauseparam Ben Hutchings
2014-02-12 22:14 ` [PATCH net-next 08/14] ethtool: Expand documentation of string set types Ben Hutchings
2014-02-12 22:14 ` [PATCH net-next 09/14] ethtool: Expand documentation of struct ethtool_test Ben Hutchings
2014-02-12 22:14 ` [PATCH net-next 10/14] ethtool: Expand documentation of struct ethtool_stats Ben Hutchings
2014-02-13 9:17 ` David Laight
2014-02-13 22:56 ` Ben Hutchings [this message]
2014-02-12 22:14 ` [PATCH net-next 11/14] ethtool: Expand documentation of struct ethtool_perm_addr Ben Hutchings
2014-02-12 22:14 ` [PATCH net-next 12/14] ethtool: Document the general convention for VLAs in kernel space Ben Hutchings
2014-02-12 22:14 ` [PATCH net-next 13/14] ethtool: Move kernel-doc comment next to struct ethtool_dump definition Ben Hutchings
2014-02-12 22:15 ` [PATCH net-next 14/14] ethtool: Fix unwanted section breaks in kernel-doc Ben Hutchings
2014-02-12 22:36 ` [PATCH net-next 00/14] ethtool: Improve documentation David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1392332168.15615.54.camel@deadeye.wl.decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=David.Laight@ACULAB.COM \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox