summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2014-02-12 22:14:43 +0000
committerNitin Garg <nitin.garg@freescale.com>2015-04-14 14:00:45 -0500
commit62627b7d4c9052080420fa053755a19722a1ef7a (patch)
treeecd3fed1e55d27361c29f8d22d2339a9bdc77162 /include/uapi
parent74e36eacaf943bb32d9e7ef707c08cab5734da43 (diff)
ethtool: Expand documentation of struct ethtool_stats
Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/ethtool.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index f246f3703ed8..e96aec0bf7c1 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -597,10 +597,20 @@ struct ethtool_test {
__u64 data[0];
};
-/* 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];
};