[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1392332168.15615.54.camel@deadeye.wl.decadent.org.uk>
Date: Thu, 13 Feb 2014 22:56:08 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: David Laight <David.Laight@...LAB.COM>
Cc: David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 10/14] ethtool: Expand documentation of struct
ethtool_stats
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.
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)
Powered by blists - more mailing lists