History

ethtool: document reserved fields in the uAPI

Add a note on expected handling of reserved fields, and references to all kdocs. This fixes a bunch of kdoc warnings.

Jakub Kicinski committed 5 years ago

Commit 83e5fee1 parent f0ebc2b1 file · +21 −1Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/ethtool.h+21−1
@@ -26,6 +26,14 @@ · 25 unmodified lines
2626 * have the same layout for 32-bit and 64-bit userland.
2727 */
2828
29+/* Note on reserved space.
30+ * Reserved fields must not be accessed directly by user space because
31+ * they may be replaced by a different field in the future. They must
32+ * be initialized to zero before making the request, e.g. via memset
33+ * of the entire structure or implicitly by not being set in a structure
34+ * initializer.
35+ */
36+
2937 /**
3038 * struct ethtool_cmd - DEPRECATED, link control and status
3139 * This structure is DEPRECATED, please use struct ethtool_link_settings.
@@ -67,6 +75,7 @@ · 35 unmodified lines
6775 * and other link features that the link partner advertised
6876 * through autonegotiation; 0 if unknown or not applicable.
6977 * Read-only.
78+ * @reserved: Reserved for future use; see the note on reserved space.
7079 *
7180 * The link speed in Mbps is split between @speed and @speed_hi. Use
7281 * the ethtool_cmd_speed() and ethtool_cmd_speed_set() functions to
@@ -155,6 +164,7 @@ static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep) · 82 unmodified lines
155164 * @bus_info: Device bus address. This should match the dev_name()
156165 * string for the underlying bus device, if there is one. May be
157166 * an empty string.
167+ * @reserved2: Reserved for future use; see the note on reserved space.
158168 * @n_priv_flags: Number of flags valid for %ETHTOOL_GPFLAGS and
159169 * %ETHTOOL_SPFLAGS commands; also the number of strings in the
160170 * %ETH_SS_PRIV_FLAGS set
@@ -356,6 +366,7 @@ struct ethtool_eeprom { · 195 unmodified lines
356366 * @tx_lpi_timer: Time in microseconds the interface delays prior to asserting
357367 * its tx lpi (after reaching 'idle' state). Effective only when eee
358368 * was negotiated and tx_lpi_enabled was set.
369+ * @reserved: Reserved for future use; see the note on reserved space.
359370 */
360371 struct ethtool_eee {
361372 __u32 cmd;
@@ -374,6 +385,7 @@ struct ethtool_eee { · 12 unmodified lines
374385 * @cmd: %ETHTOOL_GMODULEINFO
375386 * @type: Standard the module information conforms to %ETH_MODULE_SFF_xxxx
376387 * @eeprom_len: Length of the eeprom
388+ * @reserved: Reserved for future use; see the note on reserved space.
377389 *
378390 * This structure is used to return the information to
379391 * properly size memory for a subsequent call to %ETHTOOL_GMODULEEEPROM.
@@ -701,6 +713,7 @@ struct ethtool_gstrings { · 321 unmodified lines
701713 /**
702714 * struct ethtool_sset_info - string set information
703715 * @cmd: Command number = %ETHTOOL_GSSET_INFO
716+ * @reserved: Reserved for future use; see the note on reserved space.
704717 * @sset_mask: On entry, a bitmask of string sets to query, with bits
705718 * numbered according to &enum ethtool_stringset. On return, a
706719 * bitmask of those string sets queried that are supported.
@@ -745,6 +758,7 @@ enum ethtool_test_flags { · 38 unmodified lines
745758 * @flags: A bitmask of flags from &enum ethtool_test_flags. Some
746759 * flags may be set by the user on entry; others may be set by
747760 * the driver on return.
761+ * @reserved: Reserved for future use; see the note on reserved space.
748762 * @len: On return, the number of test results
749763 * @data: Array of test results
750764 *
@@ -945,6 +959,7 @@ union ethtool_flow_union { · 194 unmodified lines
945959 * @vlan_etype: VLAN EtherType
946960 * @vlan_tci: VLAN tag control information
947961 * @data: user defined data
962+ * @padding: Reserved for future use; see the note on reserved space.
948963 *
949964 * Note, @vlan_etype, @vlan_tci, and @data are only valid if %FLOW_EXT
950965 * is set in &struct ethtool_rx_flow_spec @flow_type.
@@ -1120,7 +1135,8 @@ struct ethtool_rxfh_indir { · 169 unmodified lines
11201135 * hardware hash key.
11211136 * @hfunc: Defines the current RSS hash function used by HW (or to be set to).
11221137 * Valid values are one of the %ETH_RSS_HASH_*.
1123− * @rsvd: Reserved for future extensions.
1138+ * @rsvd8: Reserved for future use; see the note on reserved space.
1139+ * @rsvd32: Reserved for future use; see the note on reserved space.
11241140 * @rss_config: RX ring/queue index for each hash value i.e., indirection table
11251141 * of @indir_size __u32 elements, followed by hash key of @key_size
11261142 * bytes.
@@ -1288,7 +1304,9 @@ struct ethtool_sfeatures { · 161 unmodified lines
12881304 * @so_timestamping: bit mask of the sum of the supported SO_TIMESTAMPING flags
12891305 * @phc_index: device index of the associated PHC, or -1 if there is none
12901306 * @tx_types: bit mask of the supported hwtstamp_tx_types enumeration values
1307+ * @tx_reserved: Reserved for future use; see the note on reserved space.
12911308 * @rx_filters: bit mask of the supported hwtstamp_rx_filters enumeration values
1309+ * @rx_reserved: Reserved for future use; see the note on reserved space.
12921310 *
12931311 * The bits in the 'tx_types' and 'rx_filters' fields correspond to
12941312 * the 'hwtstamp_tx_types' and 'hwtstamp_rx_filters' enumeration values,
@@ -1944,6 +1962,8 @@ enum ethtool_reset_flags { · 649 unmodified lines
19441962 * autonegotiation; 0 if unknown or not applicable. Read-only.
19451963 * @transceiver: Used to distinguish different possible PHY types,
19461964 * reported consistently by PHYLIB. Read-only.
1965+ * @reserved: Reserved for future use; see the note on reserved space.
1966+ * @reserved1: Reserved for future use; see the note on reserved space.
19471967 *
19481968 * If autonegotiation is disabled, the speed and @duplex represent the
19491969 * fixed link mode and are writable if the driver supports multiple

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t