Linux Audio

Check our new training course

Loading...
Note: File does not exist in v4.6.
   1=============================
   2Netlink interface for ethtool
   3=============================
   4
   5
   6Basic information
   7=================
   8
   9Netlink interface for ethtool uses generic netlink family ``ethtool``
  10(userspace application should use macros ``ETHTOOL_GENL_NAME`` and
  11``ETHTOOL_GENL_VERSION`` defined in ``<linux/ethtool_netlink.h>`` uapi
  12header). This family does not use a specific header, all information in
  13requests and replies is passed using netlink attributes.
  14
  15The ethtool netlink interface uses extended ACK for error and warning
  16reporting, userspace application developers are encouraged to make these
  17messages available to user in a suitable way.
  18
  19Requests can be divided into three categories: "get" (retrieving information),
  20"set" (setting parameters) and "action" (invoking an action).
  21
  22All "set" and "action" type requests require admin privileges
  23(``CAP_NET_ADMIN`` in the namespace). Most "get" type requests are allowed for
  24anyone but there are exceptions (where the response contains sensitive
  25information). In some cases, the request as such is allowed for anyone but
  26unprivileged users have attributes with sensitive information (e.g.
  27wake-on-lan password) omitted.
  28
  29
  30Conventions
  31===========
  32
  33Attributes which represent a boolean value usually use NLA_U8 type so that we
  34can distinguish three states: "on", "off" and "not present" (meaning the
  35information is not available in "get" requests or value is not to be changed
  36in "set" requests). For these attributes, the "true" value should be passed as
  37number 1 but any non-zero value should be understood as "true" by recipient.
  38In the tables below, "bool" denotes NLA_U8 attributes interpreted in this way.
  39
  40In the message structure descriptions below, if an attribute name is suffixed
  41with "+", parent nest can contain multiple attributes of the same type. This
  42implements an array of entries.
  43
  44Attributes that need to be filled-in by device drivers and that are dumped to
  45user space based on whether they are valid or not should not use zero as a
  46valid value. This avoids the need to explicitly signal the validity of the
  47attribute in the device driver API.
  48
  49
  50Request header
  51==============
  52
  53Each request or reply message contains a nested attribute with common header.
  54Structure of this header is
  55
  56  ==============================  ======  =============================
  57  ``ETHTOOL_A_HEADER_DEV_INDEX``  u32     device ifindex
  58  ``ETHTOOL_A_HEADER_DEV_NAME``   string  device name
  59  ``ETHTOOL_A_HEADER_FLAGS``      u32     flags common for all requests
  60  ``ETHTOOL_A_HEADER_PHY_INDEX``  u32     phy device index
  61  ==============================  ======  =============================
  62
  63``ETHTOOL_A_HEADER_DEV_INDEX`` and ``ETHTOOL_A_HEADER_DEV_NAME`` identify the
  64device message relates to. One of them is sufficient in requests, if both are
  65used, they must identify the same device. Some requests, e.g. global string
  66sets, do not require device identification. Most ``GET`` requests also allow
  67dump requests without device identification to query the same information for
  68all devices providing it (each device in a separate message).
  69
  70``ETHTOOL_A_HEADER_FLAGS`` is a bitmap of request flags common for all request
  71types. The interpretation of these flags is the same for all request types but
  72the flags may not apply to requests. Recognized flags are:
  73
  74  =================================  ===================================
  75  ``ETHTOOL_FLAG_COMPACT_BITSETS``   use compact format bitsets in reply
  76  ``ETHTOOL_FLAG_OMIT_REPLY``        omit optional reply (_SET and _ACT)
  77  ``ETHTOOL_FLAG_STATS``             include optional device statistics
  78  =================================  ===================================
  79
  80New request flags should follow the general idea that if the flag is not set,
  81the behaviour is backward compatible, i.e. requests from old clients not aware
  82of the flag should be interpreted the way the client expects. A client must
  83not set flags it does not understand.
  84
  85``ETHTOOL_A_HEADER_PHY_INDEX`` identifies the Ethernet PHY the message relates to.
  86As there are numerous commands that are related to PHY configuration, and because
  87there may be more than one PHY on the link, the PHY index can be passed in the
  88request for the commands that needs it. It is, however, not mandatory, and if it
  89is not passed for commands that target a PHY, the net_device.phydev pointer
  90is used.
  91
  92Bit sets
  93========
  94
  95For short bitmaps of (reasonably) fixed length, standard ``NLA_BITFIELD32``
  96type is used. For arbitrary length bitmaps, ethtool netlink uses a nested
  97attribute with contents of one of two forms: compact (two binary bitmaps
  98representing bit values and mask of affected bits) and bit-by-bit (list of
  99bits identified by either index or name).
 100
 101Verbose (bit-by-bit) bitsets allow sending symbolic names for bits together
 102with their values which saves a round trip (when the bitset is passed in a
 103request) or at least a second request (when the bitset is in a reply). This is
 104useful for one shot applications like traditional ethtool command. On the
 105other hand, long running applications like ethtool monitor (displaying
 106notifications) or network management daemons may prefer fetching the names
 107only once and using compact form to save message size. Notifications from
 108ethtool netlink interface always use compact form for bitsets.
 109
 110A bitset can represent either a value/mask pair (``ETHTOOL_A_BITSET_NOMASK``
 111not set) or a single bitmap (``ETHTOOL_A_BITSET_NOMASK`` set). In requests
 112modifying a bitmap, the former changes the bit set in mask to values set in
 113value and preserves the rest; the latter sets the bits set in the bitmap and
 114clears the rest.
 115
 116Compact form: nested (bitset) attribute contents:
 117
 118  ============================  ======  ============================
 119  ``ETHTOOL_A_BITSET_NOMASK``   flag    no mask, only a list
 120  ``ETHTOOL_A_BITSET_SIZE``     u32     number of significant bits
 121  ``ETHTOOL_A_BITSET_VALUE``    binary  bitmap of bit values
 122  ``ETHTOOL_A_BITSET_MASK``     binary  bitmap of valid bits
 123  ============================  ======  ============================
 124
 125Value and mask must have length at least ``ETHTOOL_A_BITSET_SIZE`` bits
 126rounded up to a multiple of 32 bits. They consist of 32-bit words in host byte
 127order, words ordered from least significant to most significant (i.e. the same
 128way as bitmaps are passed with ioctl interface).
 129
 130For compact form, ``ETHTOOL_A_BITSET_SIZE`` and ``ETHTOOL_A_BITSET_VALUE`` are
 131mandatory. ``ETHTOOL_A_BITSET_MASK`` attribute is mandatory if
 132``ETHTOOL_A_BITSET_NOMASK`` is not set (bitset represents a value/mask pair);
 133if ``ETHTOOL_A_BITSET_NOMASK`` is not set, ``ETHTOOL_A_BITSET_MASK`` is not
 134allowed (bitset represents a single bitmap.
 135
 136Kernel bit set length may differ from userspace length if older application is
 137used on newer kernel or vice versa. If userspace bitmap is longer, an error is
 138issued only if the request actually tries to set values of some bits not
 139recognized by kernel.
 140
 141Bit-by-bit form: nested (bitset) attribute contents:
 142
 143 +------------------------------------+--------+-----------------------------+
 144 | ``ETHTOOL_A_BITSET_NOMASK``        | flag   | no mask, only a list        |
 145 +------------------------------------+--------+-----------------------------+
 146 | ``ETHTOOL_A_BITSET_SIZE``          | u32    | number of significant bits  |
 147 +------------------------------------+--------+-----------------------------+
 148 | ``ETHTOOL_A_BITSET_BITS``          | nested | array of bits               |
 149 +-+----------------------------------+--------+-----------------------------+
 150 | | ``ETHTOOL_A_BITSET_BITS_BIT+``   | nested | one bit                     |
 151 +-+-+--------------------------------+--------+-----------------------------+
 152 | | | ``ETHTOOL_A_BITSET_BIT_INDEX`` | u32    | bit index (0 for LSB)       |
 153 +-+-+--------------------------------+--------+-----------------------------+
 154 | | | ``ETHTOOL_A_BITSET_BIT_NAME``  | string | bit name                    |
 155 +-+-+--------------------------------+--------+-----------------------------+
 156 | | | ``ETHTOOL_A_BITSET_BIT_VALUE`` | flag   | present if bit is set       |
 157 +-+-+--------------------------------+--------+-----------------------------+
 158
 159Bit size is optional for bit-by-bit form. ``ETHTOOL_A_BITSET_BITS`` nest can
 160only contain ``ETHTOOL_A_BITSET_BITS_BIT`` attributes but there can be an
 161arbitrary number of them.  A bit may be identified by its index or by its
 162name. When used in requests, listed bits are set to 0 or 1 according to
 163``ETHTOOL_A_BITSET_BIT_VALUE``, the rest is preserved. A request fails if
 164index exceeds kernel bit length or if name is not recognized.
 165
 166When ``ETHTOOL_A_BITSET_NOMASK`` flag is present, bitset is interpreted as
 167a simple bitmap. ``ETHTOOL_A_BITSET_BIT_VALUE`` attributes are not used in
 168such case. Such bitset represents a bitmap with listed bits set and the rest
 169zero.
 170
 171In requests, application can use either form. Form used by kernel in reply is
 172determined by ``ETHTOOL_FLAG_COMPACT_BITSETS`` flag in flags field of request
 173header. Semantics of value and mask depends on the attribute.
 174
 175
 176List of message types
 177=====================
 178
 179All constants identifying message types use ``ETHTOOL_CMD_`` prefix and suffix
 180according to message purpose:
 181
 182  ==============    ======================================
 183  ``_GET``          userspace request to retrieve data
 184  ``_SET``          userspace request to set data
 185  ``_ACT``          userspace request to perform an action
 186  ``_GET_REPLY``    kernel reply to a ``GET`` request
 187  ``_SET_REPLY``    kernel reply to a ``SET`` request
 188  ``_ACT_REPLY``    kernel reply to an ``ACT`` request
 189  ``_NTF``          kernel notification
 190  ==============    ======================================
 191
 192Userspace to kernel:
 193
 194  ===================================== =================================
 195  ``ETHTOOL_MSG_STRSET_GET``            get string set
 196  ``ETHTOOL_MSG_LINKINFO_GET``          get link settings
 197  ``ETHTOOL_MSG_LINKINFO_SET``          set link settings
 198  ``ETHTOOL_MSG_LINKMODES_GET``         get link modes info
 199  ``ETHTOOL_MSG_LINKMODES_SET``         set link modes info
 200  ``ETHTOOL_MSG_LINKSTATE_GET``         get link state
 201  ``ETHTOOL_MSG_DEBUG_GET``             get debugging settings
 202  ``ETHTOOL_MSG_DEBUG_SET``             set debugging settings
 203  ``ETHTOOL_MSG_WOL_GET``               get wake-on-lan settings
 204  ``ETHTOOL_MSG_WOL_SET``               set wake-on-lan settings
 205  ``ETHTOOL_MSG_FEATURES_GET``          get device features
 206  ``ETHTOOL_MSG_FEATURES_SET``          set device features
 207  ``ETHTOOL_MSG_PRIVFLAGS_GET``         get private flags
 208  ``ETHTOOL_MSG_PRIVFLAGS_SET``         set private flags
 209  ``ETHTOOL_MSG_RINGS_GET``             get ring sizes
 210  ``ETHTOOL_MSG_RINGS_SET``             set ring sizes
 211  ``ETHTOOL_MSG_CHANNELS_GET``          get channel counts
 212  ``ETHTOOL_MSG_CHANNELS_SET``          set channel counts
 213  ``ETHTOOL_MSG_COALESCE_GET``          get coalescing parameters
 214  ``ETHTOOL_MSG_COALESCE_SET``          set coalescing parameters
 215  ``ETHTOOL_MSG_PAUSE_GET``             get pause parameters
 216  ``ETHTOOL_MSG_PAUSE_SET``             set pause parameters
 217  ``ETHTOOL_MSG_EEE_GET``               get EEE settings
 218  ``ETHTOOL_MSG_EEE_SET``               set EEE settings
 219  ``ETHTOOL_MSG_TSINFO_GET``		get timestamping info
 220  ``ETHTOOL_MSG_CABLE_TEST_ACT``        action start cable test
 221  ``ETHTOOL_MSG_CABLE_TEST_TDR_ACT``    action start raw TDR cable test
 222  ``ETHTOOL_MSG_TUNNEL_INFO_GET``       get tunnel offload info
 223  ``ETHTOOL_MSG_FEC_GET``               get FEC settings
 224  ``ETHTOOL_MSG_FEC_SET``               set FEC settings
 225  ``ETHTOOL_MSG_MODULE_EEPROM_GET``     read SFP module EEPROM
 226  ``ETHTOOL_MSG_STATS_GET``             get standard statistics
 227  ``ETHTOOL_MSG_PHC_VCLOCKS_GET``       get PHC virtual clocks info
 228  ``ETHTOOL_MSG_MODULE_SET``            set transceiver module parameters
 229  ``ETHTOOL_MSG_MODULE_GET``            get transceiver module parameters
 230  ``ETHTOOL_MSG_PSE_SET``               set PSE parameters
 231  ``ETHTOOL_MSG_PSE_GET``               get PSE parameters
 232  ``ETHTOOL_MSG_RSS_GET``               get RSS settings
 233  ``ETHTOOL_MSG_PLCA_GET_CFG``          get PLCA RS parameters
 234  ``ETHTOOL_MSG_PLCA_SET_CFG``          set PLCA RS parameters
 235  ``ETHTOOL_MSG_PLCA_GET_STATUS``       get PLCA RS status
 236  ``ETHTOOL_MSG_MM_GET``                get MAC merge layer state
 237  ``ETHTOOL_MSG_MM_SET``                set MAC merge layer parameters
 238  ``ETHTOOL_MSG_MODULE_FW_FLASH_ACT``   flash transceiver module firmware
 239  ``ETHTOOL_MSG_PHY_GET``               get Ethernet PHY information
 240  ===================================== =================================
 241
 242Kernel to userspace:
 243
 244  ======================================== =================================
 245  ``ETHTOOL_MSG_STRSET_GET_REPLY``         string set contents
 246  ``ETHTOOL_MSG_LINKINFO_GET_REPLY``       link settings
 247  ``ETHTOOL_MSG_LINKINFO_NTF``             link settings notification
 248  ``ETHTOOL_MSG_LINKMODES_GET_REPLY``      link modes info
 249  ``ETHTOOL_MSG_LINKMODES_NTF``            link modes notification
 250  ``ETHTOOL_MSG_LINKSTATE_GET_REPLY``      link state info
 251  ``ETHTOOL_MSG_DEBUG_GET_REPLY``          debugging settings
 252  ``ETHTOOL_MSG_DEBUG_NTF``                debugging settings notification
 253  ``ETHTOOL_MSG_WOL_GET_REPLY``            wake-on-lan settings
 254  ``ETHTOOL_MSG_WOL_NTF``                  wake-on-lan settings notification
 255  ``ETHTOOL_MSG_FEATURES_GET_REPLY``       device features
 256  ``ETHTOOL_MSG_FEATURES_SET_REPLY``       optional reply to FEATURES_SET
 257  ``ETHTOOL_MSG_FEATURES_NTF``             netdev features notification
 258  ``ETHTOOL_MSG_PRIVFLAGS_GET_REPLY``      private flags
 259  ``ETHTOOL_MSG_PRIVFLAGS_NTF``            private flags
 260  ``ETHTOOL_MSG_RINGS_GET_REPLY``          ring sizes
 261  ``ETHTOOL_MSG_RINGS_NTF``                ring sizes
 262  ``ETHTOOL_MSG_CHANNELS_GET_REPLY``       channel counts
 263  ``ETHTOOL_MSG_CHANNELS_NTF``             channel counts
 264  ``ETHTOOL_MSG_COALESCE_GET_REPLY``       coalescing parameters
 265  ``ETHTOOL_MSG_COALESCE_NTF``             coalescing parameters
 266  ``ETHTOOL_MSG_PAUSE_GET_REPLY``          pause parameters
 267  ``ETHTOOL_MSG_PAUSE_NTF``                pause parameters
 268  ``ETHTOOL_MSG_EEE_GET_REPLY``            EEE settings
 269  ``ETHTOOL_MSG_EEE_NTF``                  EEE settings
 270  ``ETHTOOL_MSG_TSINFO_GET_REPLY``         timestamping info
 271  ``ETHTOOL_MSG_CABLE_TEST_NTF``           Cable test results
 272  ``ETHTOOL_MSG_CABLE_TEST_TDR_NTF``       Cable test TDR results
 273  ``ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY``    tunnel offload info
 274  ``ETHTOOL_MSG_FEC_GET_REPLY``            FEC settings
 275  ``ETHTOOL_MSG_FEC_NTF``                  FEC settings
 276  ``ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY``  read SFP module EEPROM
 277  ``ETHTOOL_MSG_STATS_GET_REPLY``          standard statistics
 278  ``ETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY``    PHC virtual clocks info
 279  ``ETHTOOL_MSG_MODULE_GET_REPLY``         transceiver module parameters
 280  ``ETHTOOL_MSG_PSE_GET_REPLY``            PSE parameters
 281  ``ETHTOOL_MSG_RSS_GET_REPLY``            RSS settings
 282  ``ETHTOOL_MSG_PLCA_GET_CFG_REPLY``       PLCA RS parameters
 283  ``ETHTOOL_MSG_PLCA_GET_STATUS_REPLY``    PLCA RS status
 284  ``ETHTOOL_MSG_PLCA_NTF``                 PLCA RS parameters
 285  ``ETHTOOL_MSG_MM_GET_REPLY``             MAC merge layer status
 286  ``ETHTOOL_MSG_MODULE_FW_FLASH_NTF``      transceiver module flash updates
 287  ``ETHTOOL_MSG_PHY_GET_REPLY``            Ethernet PHY information
 288  ``ETHTOOL_MSG_PHY_NTF``                  Ethernet PHY information change
 289  ======================================== =================================
 290
 291``GET`` requests are sent by userspace applications to retrieve device
 292information. They usually do not contain any message specific attributes.
 293Kernel replies with corresponding "GET_REPLY" message. For most types, ``GET``
 294request with ``NLM_F_DUMP`` and no device identification can be used to query
 295the information for all devices supporting the request.
 296
 297If the data can be also modified, corresponding ``SET`` message with the same
 298layout as corresponding ``GET_REPLY`` is used to request changes. Only
 299attributes where a change is requested are included in such request (also, not
 300all attributes may be changed). Replies to most ``SET`` request consist only
 301of error code and extack; if kernel provides additional data, it is sent in
 302the form of corresponding ``SET_REPLY`` message which can be suppressed by
 303setting ``ETHTOOL_FLAG_OMIT_REPLY`` flag in request header.
 304
 305Data modification also triggers sending a ``NTF`` message with a notification.
 306These usually bear only a subset of attributes which was affected by the
 307change. The same notification is issued if the data is modified using other
 308means (mostly ioctl ethtool interface). Unlike notifications from ethtool
 309netlink code which are only sent if something actually changed, notifications
 310triggered by ioctl interface may be sent even if the request did not actually
 311change any data.
 312
 313``ACT`` messages request kernel (driver) to perform a specific action. If some
 314information is reported by kernel (which can be suppressed by setting
 315``ETHTOOL_FLAG_OMIT_REPLY`` flag in request header), the reply takes form of
 316an ``ACT_REPLY`` message. Performing an action also triggers a notification
 317(``NTF`` message).
 318
 319Later sections describe the format and semantics of these messages.
 320
 321
 322STRSET_GET
 323==========
 324
 325Requests contents of a string set as provided by ioctl commands
 326``ETHTOOL_GSSET_INFO`` and ``ETHTOOL_GSTRINGS.`` String sets are not user
 327writeable so that the corresponding ``STRSET_SET`` message is only used in
 328kernel replies. There are two types of string sets: global (independent of
 329a device, e.g. device feature names) and device specific (e.g. device private
 330flags).
 331
 332Request contents:
 333
 334 +---------------------------------------+--------+------------------------+
 335 | ``ETHTOOL_A_STRSET_HEADER``           | nested | request header         |
 336 +---------------------------------------+--------+------------------------+
 337 | ``ETHTOOL_A_STRSET_STRINGSETS``       | nested | string set to request  |
 338 +-+-------------------------------------+--------+------------------------+
 339 | | ``ETHTOOL_A_STRINGSETS_STRINGSET+`` | nested | one string set         |
 340 +-+-+-----------------------------------+--------+------------------------+
 341 | | | ``ETHTOOL_A_STRINGSET_ID``        | u32    | set id                 |
 342 +-+-+-----------------------------------+--------+------------------------+
 343
 344Kernel response contents:
 345
 346 +---------------------------------------+--------+-----------------------+
 347 | ``ETHTOOL_A_STRSET_HEADER``           | nested | reply header          |
 348 +---------------------------------------+--------+-----------------------+
 349 | ``ETHTOOL_A_STRSET_STRINGSETS``       | nested | array of string sets  |
 350 +-+-------------------------------------+--------+-----------------------+
 351 | | ``ETHTOOL_A_STRINGSETS_STRINGSET+`` | nested | one string set        |
 352 +-+-+-----------------------------------+--------+-----------------------+
 353 | | | ``ETHTOOL_A_STRINGSET_ID``        | u32    | set id                |
 354 +-+-+-----------------------------------+--------+-----------------------+
 355 | | | ``ETHTOOL_A_STRINGSET_COUNT``     | u32    | number of strings     |
 356 +-+-+-----------------------------------+--------+-----------------------+
 357 | | | ``ETHTOOL_A_STRINGSET_STRINGS``   | nested | array of strings      |
 358 +-+-+-+---------------------------------+--------+-----------------------+
 359 | | | | ``ETHTOOL_A_STRINGS_STRING+``   | nested | one string            |
 360 +-+-+-+-+-------------------------------+--------+-----------------------+
 361 | | | | | ``ETHTOOL_A_STRING_INDEX``    | u32    | string index          |
 362 +-+-+-+-+-------------------------------+--------+-----------------------+
 363 | | | | | ``ETHTOOL_A_STRING_VALUE``    | string | string value          |
 364 +-+-+-+-+-------------------------------+--------+-----------------------+
 365 | ``ETHTOOL_A_STRSET_COUNTS_ONLY``      | flag   | return only counts    |
 366 +---------------------------------------+--------+-----------------------+
 367
 368Device identification in request header is optional. Depending on its presence
 369a and ``NLM_F_DUMP`` flag, there are three type of ``STRSET_GET`` requests:
 370
 371 - no ``NLM_F_DUMP,`` no device: get "global" stringsets
 372 - no ``NLM_F_DUMP``, with device: get string sets related to the device
 373 - ``NLM_F_DUMP``, no device: get device related string sets for all devices
 374
 375If there is no ``ETHTOOL_A_STRSET_STRINGSETS`` array, all string sets of
 376requested type are returned, otherwise only those specified in the request.
 377Flag ``ETHTOOL_A_STRSET_COUNTS_ONLY`` tells kernel to only return string
 378counts of the sets, not the actual strings.
 379
 380
 381LINKINFO_GET
 382============
 383
 384Requests link settings as provided by ``ETHTOOL_GLINKSETTINGS`` except for
 385link modes and autonegotiation related information. The request does not use
 386any attributes.
 387
 388Request contents:
 389
 390  ====================================  ======  ==========================
 391  ``ETHTOOL_A_LINKINFO_HEADER``         nested  request header
 392  ====================================  ======  ==========================
 393
 394Kernel response contents:
 395
 396  ====================================  ======  ==========================
 397  ``ETHTOOL_A_LINKINFO_HEADER``         nested  reply header
 398  ``ETHTOOL_A_LINKINFO_PORT``           u8      physical port
 399  ``ETHTOOL_A_LINKINFO_PHYADDR``        u8      phy MDIO address
 400  ``ETHTOOL_A_LINKINFO_TP_MDIX``        u8      MDI(-X) status
 401  ``ETHTOOL_A_LINKINFO_TP_MDIX_CTRL``   u8      MDI(-X) control
 402  ``ETHTOOL_A_LINKINFO_TRANSCEIVER``    u8      transceiver
 403  ====================================  ======  ==========================
 404
 405Attributes and their values have the same meaning as matching members of the
 406corresponding ioctl structures.
 407
 408``LINKINFO_GET`` allows dump requests (kernel returns reply message for all
 409devices supporting the request).
 410
 411
 412LINKINFO_SET
 413============
 414
 415``LINKINFO_SET`` request allows setting some of the attributes reported by
 416``LINKINFO_GET``.
 417
 418Request contents:
 419
 420  ====================================  ======  ==========================
 421  ``ETHTOOL_A_LINKINFO_HEADER``         nested  request header
 422  ``ETHTOOL_A_LINKINFO_PORT``           u8      physical port
 423  ``ETHTOOL_A_LINKINFO_PHYADDR``        u8      phy MDIO address
 424  ``ETHTOOL_A_LINKINFO_TP_MDIX_CTRL``   u8      MDI(-X) control
 425  ====================================  ======  ==========================
 426
 427MDI(-X) status and transceiver cannot be set, request with the corresponding
 428attributes is rejected.
 429
 430
 431LINKMODES_GET
 432=============
 433
 434Requests link modes (supported, advertised and peer advertised) and related
 435information (autonegotiation status, link speed and duplex) as provided by
 436``ETHTOOL_GLINKSETTINGS``. The request does not use any attributes.
 437
 438Request contents:
 439
 440  ====================================  ======  ==========================
 441  ``ETHTOOL_A_LINKMODES_HEADER``        nested  request header
 442  ====================================  ======  ==========================
 443
 444Kernel response contents:
 445
 446  ==========================================  ======  ==========================
 447  ``ETHTOOL_A_LINKMODES_HEADER``              nested  reply header
 448  ``ETHTOOL_A_LINKMODES_AUTONEG``             u8      autonegotiation status
 449  ``ETHTOOL_A_LINKMODES_OURS``                bitset  advertised link modes
 450  ``ETHTOOL_A_LINKMODES_PEER``                bitset  partner link modes
 451  ``ETHTOOL_A_LINKMODES_SPEED``               u32     link speed (Mb/s)
 452  ``ETHTOOL_A_LINKMODES_DUPLEX``              u8      duplex mode
 453  ``ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG``    u8      Master/slave port mode
 454  ``ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE``  u8      Master/slave port state
 455  ``ETHTOOL_A_LINKMODES_RATE_MATCHING``       u8      PHY rate matching
 456  ==========================================  ======  ==========================
 457
 458For ``ETHTOOL_A_LINKMODES_OURS``, value represents advertised modes and mask
 459represents supported modes. ``ETHTOOL_A_LINKMODES_PEER`` in the reply is a bit
 460list.
 461
 462``LINKMODES_GET`` allows dump requests (kernel returns reply messages for all
 463devices supporting the request).
 464
 465
 466LINKMODES_SET
 467=============
 468
 469Request contents:
 470
 471  ==========================================  ======  ==========================
 472  ``ETHTOOL_A_LINKMODES_HEADER``              nested  request header
 473  ``ETHTOOL_A_LINKMODES_AUTONEG``             u8      autonegotiation status
 474  ``ETHTOOL_A_LINKMODES_OURS``                bitset  advertised link modes
 475  ``ETHTOOL_A_LINKMODES_PEER``                bitset  partner link modes
 476  ``ETHTOOL_A_LINKMODES_SPEED``               u32     link speed (Mb/s)
 477  ``ETHTOOL_A_LINKMODES_DUPLEX``              u8      duplex mode
 478  ``ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG``    u8      Master/slave port mode
 479  ``ETHTOOL_A_LINKMODES_RATE_MATCHING``       u8      PHY rate matching
 480  ``ETHTOOL_A_LINKMODES_LANES``               u32     lanes
 481  ==========================================  ======  ==========================
 482
 483``ETHTOOL_A_LINKMODES_OURS`` bit set allows setting advertised link modes. If
 484autonegotiation is on (either set now or kept from before), advertised modes
 485are not changed (no ``ETHTOOL_A_LINKMODES_OURS`` attribute) and at least one
 486of speed, duplex and lanes is specified, kernel adjusts advertised modes to all
 487supported modes matching speed, duplex, lanes or all (whatever is specified).
 488This autoselection is done on ethtool side with ioctl interface, netlink
 489interface is supposed to allow requesting changes without knowing what exactly
 490kernel supports.
 491
 492
 493LINKSTATE_GET
 494=============
 495
 496Requests link state information. Link up/down flag (as provided by
 497``ETHTOOL_GLINK`` ioctl command) is provided. Optionally, extended state might
 498be provided as well. In general, extended state describes reasons for why a port
 499is down, or why it operates in some non-obvious mode. This request does not have
 500any attributes.
 501
 502Request contents:
 503
 504  ====================================  ======  ==========================
 505  ``ETHTOOL_A_LINKSTATE_HEADER``        nested  request header
 506  ====================================  ======  ==========================
 507
 508Kernel response contents:
 509
 510  ====================================  ======  ============================
 511  ``ETHTOOL_A_LINKSTATE_HEADER``        nested  reply header
 512  ``ETHTOOL_A_LINKSTATE_LINK``          bool    link state (up/down)
 513  ``ETHTOOL_A_LINKSTATE_SQI``           u32     Current Signal Quality Index
 514  ``ETHTOOL_A_LINKSTATE_SQI_MAX``       u32     Max support SQI value
 515  ``ETHTOOL_A_LINKSTATE_EXT_STATE``     u8      link extended state
 516  ``ETHTOOL_A_LINKSTATE_EXT_SUBSTATE``  u8      link extended substate
 517  ``ETHTOOL_A_LINKSTATE_EXT_DOWN_CNT``  u32     count of link down events
 518  ====================================  ======  ============================
 519
 520For most NIC drivers, the value of ``ETHTOOL_A_LINKSTATE_LINK`` returns
 521carrier flag provided by ``netif_carrier_ok()`` but there are drivers which
 522define their own handler.
 523
 524``ETHTOOL_A_LINKSTATE_EXT_STATE`` and ``ETHTOOL_A_LINKSTATE_EXT_SUBSTATE`` are
 525optional values. ethtool core can provide either both
 526``ETHTOOL_A_LINKSTATE_EXT_STATE`` and ``ETHTOOL_A_LINKSTATE_EXT_SUBSTATE``,
 527or only ``ETHTOOL_A_LINKSTATE_EXT_STATE``, or none of them.
 528
 529``LINKSTATE_GET`` allows dump requests (kernel returns reply messages for all
 530devices supporting the request).
 531
 532
 533Link extended states:
 534
 535  ================================================      ============================================
 536  ``ETHTOOL_LINK_EXT_STATE_AUTONEG``                    States relating to the autonegotiation or
 537                                                        issues therein
 538
 539  ``ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE``      Failure during link training
 540
 541  ``ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH``      Logical mismatch in physical coding sublayer
 542                                                        or forward error correction sublayer
 543
 544  ``ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY``       Signal integrity issues
 545
 546  ``ETHTOOL_LINK_EXT_STATE_NO_CABLE``                   No cable connected
 547
 548  ``ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE``                Failure is related to cable,
 549                                                        e.g., unsupported cable
 550
 551  ``ETHTOOL_LINK_EXT_STATE_EEPROM_ISSUE``               Failure is related to EEPROM, e.g., failure
 552                                                        during reading or parsing the data
 553
 554  ``ETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE``        Failure during calibration algorithm
 555
 556  ``ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED``      The hardware is not able to provide the
 557                                                        power required from cable or module
 558
 559  ``ETHTOOL_LINK_EXT_STATE_OVERHEAT``                   The module is overheated
 560
 561  ``ETHTOOL_LINK_EXT_STATE_MODULE``                     Transceiver module issue
 562  ================================================      ============================================
 563
 564Link extended substates:
 565
 566  Autoneg substates:
 567
 568  ===============================================================   ================================
 569  ``ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED``              Peer side is down
 570
 571  ``ETHTOOL_LINK_EXT_SUBSTATE_AN_ACK_NOT_RECEIVED``                 Ack not received from peer side
 572
 573  ``ETHTOOL_LINK_EXT_SUBSTATE_AN_NEXT_PAGE_EXCHANGE_FAILED``        Next page exchange failed
 574
 575  ``ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED_FORCE_MODE``   Peer side is down during force
 576                                                                    mode or there is no agreement of
 577                                                                    speed
 578
 579  ``ETHTOOL_LINK_EXT_SUBSTATE_AN_FEC_MISMATCH_DURING_OVERRIDE``     Forward error correction modes
 580                                                                    in both sides are mismatched
 581
 582  ``ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_HCD``                           No Highest Common Denominator
 583  ===============================================================   ================================
 584
 585  Link training substates:
 586
 587  ===========================================================================   ====================
 588  ``ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_FRAME_LOCK_NOT_ACQUIRED``                    Frames were not
 589                                                                                 recognized, the
 590                                                                                 lock failed
 591
 592  ``ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_INHIBIT_TIMEOUT``                       The lock did not
 593                                                                                 occur before
 594                                                                                 timeout
 595
 596  ``ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_PARTNER_DID_NOT_SET_RECEIVER_READY``    Peer side did not
 597                                                                                 send ready signal
 598                                                                                 after training
 599                                                                                 process
 600
 601  ``ETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT``                                  Remote side is not
 602                                                                                 ready yet
 603  ===========================================================================   ====================
 604
 605  Link logical mismatch substates:
 606
 607  ================================================================   ===============================
 608  ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_BLOCK_LOCK``   Physical coding sublayer was
 609                                                                     not locked in first phase -
 610                                                                     block lock
 611
 612  ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_AM_LOCK``      Physical coding sublayer was
 613                                                                     not locked in second phase -
 614                                                                     alignment markers lock
 615
 616  ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_GET_ALIGN_STATUS``     Physical coding sublayer did
 617                                                                     not get align status
 618
 619  ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_FC_FEC_IS_NOT_LOCKED``             FC forward error correction is
 620                                                                     not locked
 621
 622  ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_RS_FEC_IS_NOT_LOCKED``             RS forward error correction is
 623                                                                     not locked
 624  ================================================================   ===============================
 625
 626  Bad signal integrity substates:
 627
 628  =================================================================    =============================
 629  ``ETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS``    Large number of physical
 630                                                                       errors
 631
 632  ``ETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE``                   The system attempted to
 633                                                                       operate the cable at a rate
 634                                                                       that is not formally
 635                                                                       supported, which led to
 636                                                                       signal integrity issues
 637
 638  ``ETHTOOL_LINK_EXT_SUBSTATE_BSI_SERDES_REFERENCE_CLOCK_LOST``        The external clock signal for
 639                                                                       SerDes is too weak or
 640                                                                       unavailable.
 641
 642  ``ETHTOOL_LINK_EXT_SUBSTATE_BSI_SERDES_ALOS``                        The received signal for
 643                                                                       SerDes is too weak because
 644                                                                       analog loss of signal.
 645  =================================================================    =============================
 646
 647  Cable issue substates:
 648
 649  ===================================================   ============================================
 650  ``ETHTOOL_LINK_EXT_SUBSTATE_CI_UNSUPPORTED_CABLE``    Unsupported cable
 651
 652  ``ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE``   Cable test failure
 653  ===================================================   ============================================
 654
 655  Transceiver module issue substates:
 656
 657  ===================================================   ============================================
 658  ``ETHTOOL_LINK_EXT_SUBSTATE_MODULE_CMIS_NOT_READY``   The CMIS Module State Machine did not reach
 659                                                        the ModuleReady state. For example, if the
 660                                                        module is stuck at ModuleFault state
 661  ===================================================   ============================================
 662
 663DEBUG_GET
 664=========
 665
 666Requests debugging settings of a device. At the moment, only message mask is
 667provided.
 668
 669Request contents:
 670
 671  ====================================  ======  ==========================
 672  ``ETHTOOL_A_DEBUG_HEADER``            nested  request header
 673  ====================================  ======  ==========================
 674
 675Kernel response contents:
 676
 677  ====================================  ======  ==========================
 678  ``ETHTOOL_A_DEBUG_HEADER``            nested  reply header
 679  ``ETHTOOL_A_DEBUG_MSGMASK``           bitset  message mask
 680  ====================================  ======  ==========================
 681
 682The message mask (``ETHTOOL_A_DEBUG_MSGMASK``) is equal to message level as
 683provided by ``ETHTOOL_GMSGLVL`` and set by ``ETHTOOL_SMSGLVL`` in ioctl
 684interface. While it is called message level there for historical reasons, most
 685drivers and almost all newer drivers use it as a mask of enabled message
 686classes (represented by ``NETIF_MSG_*`` constants); therefore netlink
 687interface follows its actual use in practice.
 688
 689``DEBUG_GET`` allows dump requests (kernel returns reply messages for all
 690devices supporting the request).
 691
 692
 693DEBUG_SET
 694=========
 695
 696Set or update debugging settings of a device. At the moment, only message mask
 697is supported.
 698
 699Request contents:
 700
 701  ====================================  ======  ==========================
 702  ``ETHTOOL_A_DEBUG_HEADER``            nested  request header
 703  ``ETHTOOL_A_DEBUG_MSGMASK``           bitset  message mask
 704  ====================================  ======  ==========================
 705
 706``ETHTOOL_A_DEBUG_MSGMASK`` bit set allows setting or modifying mask of
 707enabled debugging message types for the device.
 708
 709
 710WOL_GET
 711=======
 712
 713Query device wake-on-lan settings. Unlike most "GET" type requests,
 714``ETHTOOL_MSG_WOL_GET`` requires (netns) ``CAP_NET_ADMIN`` privileges as it
 715(potentially) provides SecureOn(tm) password which is confidential.
 716
 717Request contents:
 718
 719  ====================================  ======  ==========================
 720  ``ETHTOOL_A_WOL_HEADER``              nested  request header
 721  ====================================  ======  ==========================
 722
 723Kernel response contents:
 724
 725  ====================================  ======  ==========================
 726  ``ETHTOOL_A_WOL_HEADER``              nested  reply header
 727  ``ETHTOOL_A_WOL_MODES``               bitset  mask of enabled WoL modes
 728  ``ETHTOOL_A_WOL_SOPASS``              binary  SecureOn(tm) password
 729  ====================================  ======  ==========================
 730
 731In reply, ``ETHTOOL_A_WOL_MODES`` mask consists of modes supported by the
 732device, value of modes which are enabled. ``ETHTOOL_A_WOL_SOPASS`` is only
 733included in reply if ``WAKE_MAGICSECURE`` mode is supported.
 734
 735
 736WOL_SET
 737=======
 738
 739Set or update wake-on-lan settings.
 740
 741Request contents:
 742
 743  ====================================  ======  ==========================
 744  ``ETHTOOL_A_WOL_HEADER``              nested  request header
 745  ``ETHTOOL_A_WOL_MODES``               bitset  enabled WoL modes
 746  ``ETHTOOL_A_WOL_SOPASS``              binary  SecureOn(tm) password
 747  ====================================  ======  ==========================
 748
 749``ETHTOOL_A_WOL_SOPASS`` is only allowed for devices supporting
 750``WAKE_MAGICSECURE`` mode.
 751
 752
 753FEATURES_GET
 754============
 755
 756Gets netdev features like ``ETHTOOL_GFEATURES`` ioctl request.
 757
 758Request contents:
 759
 760  ====================================  ======  ==========================
 761  ``ETHTOOL_A_FEATURES_HEADER``         nested  request header
 762  ====================================  ======  ==========================
 763
 764Kernel response contents:
 765
 766  ====================================  ======  ==========================
 767  ``ETHTOOL_A_FEATURES_HEADER``         nested  reply header
 768  ``ETHTOOL_A_FEATURES_HW``             bitset  dev->hw_features
 769  ``ETHTOOL_A_FEATURES_WANTED``         bitset  dev->wanted_features
 770  ``ETHTOOL_A_FEATURES_ACTIVE``         bitset  dev->features
 771  ``ETHTOOL_A_FEATURES_NOCHANGE``       bitset  NETIF_F_NEVER_CHANGE
 772  ====================================  ======  ==========================
 773
 774Bitmaps in kernel response have the same meaning as bitmaps used in ioctl
 775interference but attribute names are different (they are based on
 776corresponding members of struct net_device). Legacy "flags" are not provided,
 777if userspace needs them (most likely only ethtool for backward compatibility),
 778it can calculate their values from related feature bits itself.
 779ETHA_FEATURES_HW uses mask consisting of all features recognized by kernel (to
 780provide all names when using verbose bitmap format), the other three use no
 781mask (simple bit lists).
 782
 783
 784FEATURES_SET
 785============
 786
 787Request to set netdev features like ``ETHTOOL_SFEATURES`` ioctl request.
 788
 789Request contents:
 790
 791  ====================================  ======  ==========================
 792  ``ETHTOOL_A_FEATURES_HEADER``         nested  request header
 793  ``ETHTOOL_A_FEATURES_WANTED``         bitset  requested features
 794  ====================================  ======  ==========================
 795
 796Kernel response contents:
 797
 798  ====================================  ======  ==========================
 799  ``ETHTOOL_A_FEATURES_HEADER``         nested  reply header
 800  ``ETHTOOL_A_FEATURES_WANTED``         bitset  diff wanted vs. result
 801  ``ETHTOOL_A_FEATURES_ACTIVE``         bitset  diff old vs. new active
 802  ====================================  ======  ==========================
 803
 804Request contains only one bitset which can be either value/mask pair (request
 805to change specific feature bits and leave the rest) or only a value (request
 806to set all features to specified set).
 807
 808As request is subject to netdev_change_features() sanity checks, optional
 809kernel reply (can be suppressed by ``ETHTOOL_FLAG_OMIT_REPLY`` flag in request
 810header) informs client about the actual result. ``ETHTOOL_A_FEATURES_WANTED``
 811reports the difference between client request and actual result: mask consists
 812of bits which differ between requested features and result (dev->features
 813after the operation), value consists of values of these bits in the request
 814(i.e. negated values from resulting features). ``ETHTOOL_A_FEATURES_ACTIVE``
 815reports the difference between old and new dev->features: mask consists of
 816bits which have changed, values are their values in new dev->features (after
 817the operation).
 818
 819``ETHTOOL_MSG_FEATURES_NTF`` notification is sent not only if device features
 820are modified using ``ETHTOOL_MSG_FEATURES_SET`` request or on of ethtool ioctl
 821request but also each time features are modified with netdev_update_features()
 822or netdev_change_features().
 823
 824
 825PRIVFLAGS_GET
 826=============
 827
 828Gets private flags like ``ETHTOOL_GPFLAGS`` ioctl request.
 829
 830Request contents:
 831
 832  ====================================  ======  ==========================
 833  ``ETHTOOL_A_PRIVFLAGS_HEADER``        nested  request header
 834  ====================================  ======  ==========================
 835
 836Kernel response contents:
 837
 838  ====================================  ======  ==========================
 839  ``ETHTOOL_A_PRIVFLAGS_HEADER``        nested  reply header
 840  ``ETHTOOL_A_PRIVFLAGS_FLAGS``         bitset  private flags
 841  ====================================  ======  ==========================
 842
 843``ETHTOOL_A_PRIVFLAGS_FLAGS`` is a bitset with values of device private flags.
 844These flags are defined by driver, their number and names (and also meaning)
 845are device dependent. For compact bitset format, names can be retrieved as
 846``ETH_SS_PRIV_FLAGS`` string set. If verbose bitset format is requested,
 847response uses all private flags supported by the device as mask so that client
 848gets the full information without having to fetch the string set with names.
 849
 850
 851PRIVFLAGS_SET
 852=============
 853
 854Sets or modifies values of device private flags like ``ETHTOOL_SPFLAGS``
 855ioctl request.
 856
 857Request contents:
 858
 859  ====================================  ======  ==========================
 860  ``ETHTOOL_A_PRIVFLAGS_HEADER``        nested  request header
 861  ``ETHTOOL_A_PRIVFLAGS_FLAGS``         bitset  private flags
 862  ====================================  ======  ==========================
 863
 864``ETHTOOL_A_PRIVFLAGS_FLAGS`` can either set the whole set of private flags or
 865modify only values of some of them.
 866
 867
 868RINGS_GET
 869=========
 870
 871Gets ring sizes like ``ETHTOOL_GRINGPARAM`` ioctl request.
 872
 873Request contents:
 874
 875  ====================================  ======  ==========================
 876  ``ETHTOOL_A_RINGS_HEADER``            nested  request header
 877  ====================================  ======  ==========================
 878
 879Kernel response contents:
 880
 881  =======================================   ======  ===========================
 882  ``ETHTOOL_A_RINGS_HEADER``                nested  reply header
 883  ``ETHTOOL_A_RINGS_RX_MAX``                u32     max size of RX ring
 884  ``ETHTOOL_A_RINGS_RX_MINI_MAX``           u32     max size of RX mini ring
 885  ``ETHTOOL_A_RINGS_RX_JUMBO_MAX``          u32     max size of RX jumbo ring
 886  ``ETHTOOL_A_RINGS_TX_MAX``                u32     max size of TX ring
 887  ``ETHTOOL_A_RINGS_RX``                    u32     size of RX ring
 888  ``ETHTOOL_A_RINGS_RX_MINI``               u32     size of RX mini ring
 889  ``ETHTOOL_A_RINGS_RX_JUMBO``              u32     size of RX jumbo ring
 890  ``ETHTOOL_A_RINGS_TX``                    u32     size of TX ring
 891  ``ETHTOOL_A_RINGS_RX_BUF_LEN``            u32     size of buffers on the ring
 892  ``ETHTOOL_A_RINGS_TCP_DATA_SPLIT``        u8      TCP header / data split
 893  ``ETHTOOL_A_RINGS_CQE_SIZE``              u32     Size of TX/RX CQE
 894  ``ETHTOOL_A_RINGS_TX_PUSH``               u8      flag of TX Push mode
 895  ``ETHTOOL_A_RINGS_RX_PUSH``               u8      flag of RX Push mode
 896  ``ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN``       u32     size of TX push buffer
 897  ``ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN_MAX``   u32     max size of TX push buffer
 898  =======================================   ======  ===========================
 899
 900``ETHTOOL_A_RINGS_TCP_DATA_SPLIT`` indicates whether the device is usable with
 901page-flipping TCP zero-copy receive (``getsockopt(TCP_ZEROCOPY_RECEIVE)``).
 902If enabled the device is configured to place frame headers and data into
 903separate buffers. The device configuration must make it possible to receive
 904full memory pages of data, for example because MTU is high enough or through
 905HW-GRO.
 906
 907``ETHTOOL_A_RINGS_[RX|TX]_PUSH`` flag is used to enable descriptor fast
 908path to send or receive packets. In ordinary path, driver fills descriptors in DRAM and
 909notifies NIC hardware. In fast path, driver pushes descriptors to the device
 910through MMIO writes, thus reducing the latency. However, enabling this feature
 911may increase the CPU cost. Drivers may enforce additional per-packet
 912eligibility checks (e.g. on packet size).
 913
 914``ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN`` specifies the maximum number of bytes of a
 915transmitted packet a driver can push directly to the underlying device
 916('push' mode). Pushing some of the payload bytes to the device has the
 917advantages of reducing latency for small packets by avoiding DMA mapping (same
 918as ``ETHTOOL_A_RINGS_TX_PUSH`` parameter) as well as allowing the underlying
 919device to process packet headers ahead of fetching its payload.
 920This can help the device to make fast actions based on the packet's headers.
 921This is similar to the "tx-copybreak" parameter, which copies the packet to a
 922preallocated DMA memory area instead of mapping new memory. However,
 923tx-push-buff parameter copies the packet directly to the device to allow the
 924device to take faster actions on the packet.
 925
 926RINGS_SET
 927=========
 928
 929Sets ring sizes like ``ETHTOOL_SRINGPARAM`` ioctl request.
 930
 931Request contents:
 932
 933  ====================================  ======  ===========================
 934  ``ETHTOOL_A_RINGS_HEADER``            nested  reply header
 935  ``ETHTOOL_A_RINGS_RX``                u32     size of RX ring
 936  ``ETHTOOL_A_RINGS_RX_MINI``           u32     size of RX mini ring
 937  ``ETHTOOL_A_RINGS_RX_JUMBO``          u32     size of RX jumbo ring
 938  ``ETHTOOL_A_RINGS_TX``                u32     size of TX ring
 939  ``ETHTOOL_A_RINGS_RX_BUF_LEN``        u32     size of buffers on the ring
 940  ``ETHTOOL_A_RINGS_CQE_SIZE``          u32     Size of TX/RX CQE
 941  ``ETHTOOL_A_RINGS_TX_PUSH``           u8      flag of TX Push mode
 942  ``ETHTOOL_A_RINGS_RX_PUSH``           u8      flag of RX Push mode
 943  ``ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN``   u32     size of TX push buffer
 944  ====================================  ======  ===========================
 945
 946Kernel checks that requested ring sizes do not exceed limits reported by
 947driver. Driver may impose additional constraints and may not support all
 948attributes.
 949
 950
 951``ETHTOOL_A_RINGS_CQE_SIZE`` specifies the completion queue event size.
 952Completion queue events (CQE) are the events posted by NIC to indicate the
 953completion status of a packet when the packet is sent (like send success or
 954error) or received (like pointers to packet fragments). The CQE size parameter
 955enables to modify the CQE size other than default size if NIC supports it.
 956A bigger CQE can have more receive buffer pointers, and in turn the NIC can
 957transfer a bigger frame from wire. Based on the NIC hardware, the overall
 958completion queue size can be adjusted in the driver if CQE size is modified.
 959
 960CHANNELS_GET
 961============
 962
 963Gets channel counts like ``ETHTOOL_GCHANNELS`` ioctl request.
 964
 965Request contents:
 966
 967  ====================================  ======  ==========================
 968  ``ETHTOOL_A_CHANNELS_HEADER``         nested  request header
 969  ====================================  ======  ==========================
 970
 971Kernel response contents:
 972
 973  =====================================  ======  ==========================
 974  ``ETHTOOL_A_CHANNELS_HEADER``          nested  reply header
 975  ``ETHTOOL_A_CHANNELS_RX_MAX``          u32     max receive channels
 976  ``ETHTOOL_A_CHANNELS_TX_MAX``          u32     max transmit channels
 977  ``ETHTOOL_A_CHANNELS_OTHER_MAX``       u32     max other channels
 978  ``ETHTOOL_A_CHANNELS_COMBINED_MAX``    u32     max combined channels
 979  ``ETHTOOL_A_CHANNELS_RX_COUNT``        u32     receive channel count
 980  ``ETHTOOL_A_CHANNELS_TX_COUNT``        u32     transmit channel count
 981  ``ETHTOOL_A_CHANNELS_OTHER_COUNT``     u32     other channel count
 982  ``ETHTOOL_A_CHANNELS_COMBINED_COUNT``  u32     combined channel count
 983  =====================================  ======  ==========================
 984
 985
 986CHANNELS_SET
 987============
 988
 989Sets channel counts like ``ETHTOOL_SCHANNELS`` ioctl request.
 990
 991Request contents:
 992
 993  =====================================  ======  ==========================
 994  ``ETHTOOL_A_CHANNELS_HEADER``          nested  request header
 995  ``ETHTOOL_A_CHANNELS_RX_COUNT``        u32     receive channel count
 996  ``ETHTOOL_A_CHANNELS_TX_COUNT``        u32     transmit channel count
 997  ``ETHTOOL_A_CHANNELS_OTHER_COUNT``     u32     other channel count
 998  ``ETHTOOL_A_CHANNELS_COMBINED_COUNT``  u32     combined channel count
 999  =====================================  ======  ==========================
1000
1001Kernel checks that requested channel counts do not exceed limits reported by
1002driver. Driver may impose additional constraints and may not support all
1003attributes.
1004
1005
1006COALESCE_GET
1007============
1008
1009Gets coalescing parameters like ``ETHTOOL_GCOALESCE`` ioctl request.
1010
1011Request contents:
1012
1013  ====================================  ======  ==========================
1014  ``ETHTOOL_A_COALESCE_HEADER``         nested  request header
1015  ====================================  ======  ==========================
1016
1017Kernel response contents:
1018
1019  ===========================================  ======  =======================
1020  ``ETHTOOL_A_COALESCE_HEADER``                nested  reply header
1021  ``ETHTOOL_A_COALESCE_RX_USECS``              u32     delay (us), normal Rx
1022  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES``         u32     max packets, normal Rx
1023  ``ETHTOOL_A_COALESCE_RX_USECS_IRQ``          u32     delay (us), Rx in IRQ
1024  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ``     u32     max packets, Rx in IRQ
1025  ``ETHTOOL_A_COALESCE_TX_USECS``              u32     delay (us), normal Tx
1026  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES``         u32     max packets, normal Tx
1027  ``ETHTOOL_A_COALESCE_TX_USECS_IRQ``          u32     delay (us), Tx in IRQ
1028  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ``     u32     IRQ packets, Tx in IRQ
1029  ``ETHTOOL_A_COALESCE_STATS_BLOCK_USECS``     u32     delay of stats update
1030  ``ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX``       bool    adaptive Rx coalesce
1031  ``ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX``       bool    adaptive Tx coalesce
1032  ``ETHTOOL_A_COALESCE_PKT_RATE_LOW``          u32     threshold for low rate
1033  ``ETHTOOL_A_COALESCE_RX_USECS_LOW``          u32     delay (us), low Rx
1034  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW``     u32     max packets, low Rx
1035  ``ETHTOOL_A_COALESCE_TX_USECS_LOW``          u32     delay (us), low Tx
1036  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW``     u32     max packets, low Tx
1037  ``ETHTOOL_A_COALESCE_PKT_RATE_HIGH``         u32     threshold for high rate
1038  ``ETHTOOL_A_COALESCE_RX_USECS_HIGH``         u32     delay (us), high Rx
1039  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH``    u32     max packets, high Rx
1040  ``ETHTOOL_A_COALESCE_TX_USECS_HIGH``         u32     delay (us), high Tx
1041  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH``    u32     max packets, high Tx
1042  ``ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL``  u32     rate sampling interval
1043  ``ETHTOOL_A_COALESCE_USE_CQE_TX``            bool    timer reset mode, Tx
1044  ``ETHTOOL_A_COALESCE_USE_CQE_RX``            bool    timer reset mode, Rx
1045  ``ETHTOOL_A_COALESCE_TX_AGGR_MAX_BYTES``     u32     max aggr size, Tx
1046  ``ETHTOOL_A_COALESCE_TX_AGGR_MAX_FRAMES``    u32     max aggr packets, Tx
1047  ``ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS``    u32     time (us), aggr, Tx
1048  ``ETHTOOL_A_COALESCE_RX_PROFILE``            nested  profile of DIM, Rx
1049  ``ETHTOOL_A_COALESCE_TX_PROFILE``            nested  profile of DIM, Tx
1050  ===========================================  ======  =======================
1051
1052Attributes are only included in reply if their value is not zero or the
1053corresponding bit in ``ethtool_ops::supported_coalesce_params`` is set (i.e.
1054they are declared as supported by driver).
1055
1056Timer reset mode (``ETHTOOL_A_COALESCE_USE_CQE_TX`` and
1057``ETHTOOL_A_COALESCE_USE_CQE_RX``) controls the interaction between packet
1058arrival and the various time based delay parameters. By default timers are
1059expected to limit the max delay between any packet arrival/departure and a
1060corresponding interrupt. In this mode timer should be started by packet
1061arrival (sometimes delivery of previous interrupt) and reset when interrupt
1062is delivered.
1063Setting the appropriate attribute to 1 will enable ``CQE`` mode, where
1064each packet event resets the timer. In this mode timer is used to force
1065the interrupt if queue goes idle, while busy queues depend on the packet
1066limit to trigger interrupts.
1067
1068Tx aggregation consists of copying frames into a contiguous buffer so that they
1069can be submitted as a single IO operation. ``ETHTOOL_A_COALESCE_TX_AGGR_MAX_BYTES``
1070describes the maximum size in bytes for the submitted buffer.
1071``ETHTOOL_A_COALESCE_TX_AGGR_MAX_FRAMES`` describes the maximum number of frames
1072that can be aggregated into a single buffer.
1073``ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS`` describes the amount of time in usecs,
1074counted since the first packet arrival in an aggregated block, after which the
1075block should be sent.
1076This feature is mainly of interest for specific USB devices which does not cope
1077well with frequent small-sized URBs transmissions.
1078
1079``ETHTOOL_A_COALESCE_RX_PROFILE`` and ``ETHTOOL_A_COALESCE_TX_PROFILE`` refer
1080to DIM parameters, see `Generic Network Dynamic Interrupt Moderation (Net DIM)
1081<https://www.kernel.org/doc/Documentation/networking/net_dim.rst>`_.
1082
1083COALESCE_SET
1084============
1085
1086Sets coalescing parameters like ``ETHTOOL_SCOALESCE`` ioctl request.
1087
1088Request contents:
1089
1090  ===========================================  ======  =======================
1091  ``ETHTOOL_A_COALESCE_HEADER``                nested  request header
1092  ``ETHTOOL_A_COALESCE_RX_USECS``              u32     delay (us), normal Rx
1093  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES``         u32     max packets, normal Rx
1094  ``ETHTOOL_A_COALESCE_RX_USECS_IRQ``          u32     delay (us), Rx in IRQ
1095  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ``     u32     max packets, Rx in IRQ
1096  ``ETHTOOL_A_COALESCE_TX_USECS``              u32     delay (us), normal Tx
1097  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES``         u32     max packets, normal Tx
1098  ``ETHTOOL_A_COALESCE_TX_USECS_IRQ``          u32     delay (us), Tx in IRQ
1099  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ``     u32     IRQ packets, Tx in IRQ
1100  ``ETHTOOL_A_COALESCE_STATS_BLOCK_USECS``     u32     delay of stats update
1101  ``ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX``       bool    adaptive Rx coalesce
1102  ``ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX``       bool    adaptive Tx coalesce
1103  ``ETHTOOL_A_COALESCE_PKT_RATE_LOW``          u32     threshold for low rate
1104  ``ETHTOOL_A_COALESCE_RX_USECS_LOW``          u32     delay (us), low Rx
1105  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW``     u32     max packets, low Rx
1106  ``ETHTOOL_A_COALESCE_TX_USECS_LOW``          u32     delay (us), low Tx
1107  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW``     u32     max packets, low Tx
1108  ``ETHTOOL_A_COALESCE_PKT_RATE_HIGH``         u32     threshold for high rate
1109  ``ETHTOOL_A_COALESCE_RX_USECS_HIGH``         u32     delay (us), high Rx
1110  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH``    u32     max packets, high Rx
1111  ``ETHTOOL_A_COALESCE_TX_USECS_HIGH``         u32     delay (us), high Tx
1112  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH``    u32     max packets, high Tx
1113  ``ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL``  u32     rate sampling interval
1114  ``ETHTOOL_A_COALESCE_USE_CQE_TX``            bool    timer reset mode, Tx
1115  ``ETHTOOL_A_COALESCE_USE_CQE_RX``            bool    timer reset mode, Rx
1116  ``ETHTOOL_A_COALESCE_TX_AGGR_MAX_BYTES``     u32     max aggr size, Tx
1117  ``ETHTOOL_A_COALESCE_TX_AGGR_MAX_FRAMES``    u32     max aggr packets, Tx
1118  ``ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS``    u32     time (us), aggr, Tx
1119  ``ETHTOOL_A_COALESCE_RX_PROFILE``            nested  profile of DIM, Rx
1120  ``ETHTOOL_A_COALESCE_TX_PROFILE``            nested  profile of DIM, Tx
1121  ===========================================  ======  =======================
1122
1123Request is rejected if it attributes declared as unsupported by driver (i.e.
1124such that the corresponding bit in ``ethtool_ops::supported_coalesce_params``
1125is not set), regardless of their values. Driver may impose additional
1126constraints on coalescing parameters and their values.
1127
1128Compared to requests issued via the ``ioctl()`` netlink version of this request
1129will try harder to make sure that values specified by the user have been applied
1130and may call the driver twice.
1131
1132
1133PAUSE_GET
1134=========
1135
1136Gets pause frame settings like ``ETHTOOL_GPAUSEPARAM`` ioctl request.
1137
1138Request contents:
1139
1140  =====================================  ======  ==========================
1141  ``ETHTOOL_A_PAUSE_HEADER``             nested  request header
1142  ``ETHTOOL_A_PAUSE_STATS_SRC``          u32     source of statistics
1143  =====================================  ======  ==========================
1144
1145``ETHTOOL_A_PAUSE_STATS_SRC`` is optional. It takes values from:
1146
1147.. kernel-doc:: include/uapi/linux/ethtool.h
1148    :identifiers: ethtool_mac_stats_src
1149
1150If absent from the request, stats will be provided with
1151an ``ETHTOOL_A_PAUSE_STATS_SRC`` attribute in the response equal to
1152``ETHTOOL_MAC_STATS_SRC_AGGREGATE``.
1153
1154Kernel response contents:
1155
1156  =====================================  ======  ==========================
1157  ``ETHTOOL_A_PAUSE_HEADER``             nested  request header
1158  ``ETHTOOL_A_PAUSE_AUTONEG``            bool    pause autonegotiation
1159  ``ETHTOOL_A_PAUSE_RX``                 bool    receive pause frames
1160  ``ETHTOOL_A_PAUSE_TX``                 bool    transmit pause frames
1161  ``ETHTOOL_A_PAUSE_STATS``              nested  pause statistics
1162  =====================================  ======  ==========================
1163
1164``ETHTOOL_A_PAUSE_STATS`` are reported if ``ETHTOOL_FLAG_STATS`` was set
1165in ``ETHTOOL_A_HEADER_FLAGS``.
1166It will be empty if driver did not report any statistics. Drivers fill in
1167the statistics in the following structure:
1168
1169.. kernel-doc:: include/linux/ethtool.h
1170    :identifiers: ethtool_pause_stats
1171
1172Each member has a corresponding attribute defined.
1173
1174PAUSE_SET
1175=========
1176
1177Sets pause parameters like ``ETHTOOL_GPAUSEPARAM`` ioctl request.
1178
1179Request contents:
1180
1181  =====================================  ======  ==========================
1182  ``ETHTOOL_A_PAUSE_HEADER``             nested  request header
1183  ``ETHTOOL_A_PAUSE_AUTONEG``            bool    pause autonegotiation
1184  ``ETHTOOL_A_PAUSE_RX``                 bool    receive pause frames
1185  ``ETHTOOL_A_PAUSE_TX``                 bool    transmit pause frames
1186  =====================================  ======  ==========================
1187
1188
1189EEE_GET
1190=======
1191
1192Gets Energy Efficient Ethernet settings like ``ETHTOOL_GEEE`` ioctl request.
1193
1194Request contents:
1195
1196  =====================================  ======  ==========================
1197  ``ETHTOOL_A_EEE_HEADER``               nested  request header
1198  =====================================  ======  ==========================
1199
1200Kernel response contents:
1201
1202  =====================================  ======  ==========================
1203  ``ETHTOOL_A_EEE_HEADER``               nested  request header
1204  ``ETHTOOL_A_EEE_MODES_OURS``           bool    supported/advertised modes
1205  ``ETHTOOL_A_EEE_MODES_PEER``           bool    peer advertised link modes
1206  ``ETHTOOL_A_EEE_ACTIVE``               bool    EEE is actively used
1207  ``ETHTOOL_A_EEE_ENABLED``              bool    EEE is enabled
1208  ``ETHTOOL_A_EEE_TX_LPI_ENABLED``       bool    Tx lpi enabled
1209  ``ETHTOOL_A_EEE_TX_LPI_TIMER``         u32     Tx lpi timeout (in us)
1210  =====================================  ======  ==========================
1211
1212In ``ETHTOOL_A_EEE_MODES_OURS``, mask consists of link modes for which EEE is
1213enabled, value of link modes for which EEE is advertised. Link modes for which
1214peer advertises EEE are listed in ``ETHTOOL_A_EEE_MODES_PEER`` (no mask). The
1215netlink interface allows reporting EEE status for all link modes but only
1216first 32 are provided by the ``ethtool_ops`` callback.
1217
1218
1219EEE_SET
1220=======
1221
1222Sets Energy Efficient Ethernet parameters like ``ETHTOOL_SEEE`` ioctl request.
1223
1224Request contents:
1225
1226  =====================================  ======  ==========================
1227  ``ETHTOOL_A_EEE_HEADER``               nested  request header
1228  ``ETHTOOL_A_EEE_MODES_OURS``           bool    advertised modes
1229  ``ETHTOOL_A_EEE_ENABLED``              bool    EEE is enabled
1230  ``ETHTOOL_A_EEE_TX_LPI_ENABLED``       bool    Tx lpi enabled
1231  ``ETHTOOL_A_EEE_TX_LPI_TIMER``         u32     Tx lpi timeout (in us)
1232  =====================================  ======  ==========================
1233
1234``ETHTOOL_A_EEE_MODES_OURS`` is used to either list link modes to advertise
1235EEE for (if there is no mask) or specify changes to the list (if there is
1236a mask). The netlink interface allows reporting EEE status for all link modes
1237but only first 32 can be set at the moment as that is what the ``ethtool_ops``
1238callback supports.
1239
1240
1241TSINFO_GET
1242==========
1243
1244Gets timestamping information like ``ETHTOOL_GET_TS_INFO`` ioctl request.
1245
1246Request contents:
1247
1248  =====================================  ======  ==========================
1249  ``ETHTOOL_A_TSINFO_HEADER``            nested  request header
1250  =====================================  ======  ==========================
1251
1252Kernel response contents:
1253
1254  =====================================  ======  ==========================
1255  ``ETHTOOL_A_TSINFO_HEADER``            nested  request header
1256  ``ETHTOOL_A_TSINFO_TIMESTAMPING``      bitset  SO_TIMESTAMPING flags
1257  ``ETHTOOL_A_TSINFO_TX_TYPES``          bitset  supported Tx types
1258  ``ETHTOOL_A_TSINFO_RX_FILTERS``        bitset  supported Rx filters
1259  ``ETHTOOL_A_TSINFO_PHC_INDEX``         u32     PTP hw clock index
1260  ``ETHTOOL_A_TSINFO_STATS``             nested  HW timestamping statistics
1261  =====================================  ======  ==========================
1262
1263``ETHTOOL_A_TSINFO_PHC_INDEX`` is absent if there is no associated PHC (there
1264is no special value for this case). The bitset attributes are omitted if they
1265would be empty (no bit set).
1266
1267Additional hardware timestamping statistics response contents:
1268
1269  =====================================  ======  ===================================
1270  ``ETHTOOL_A_TS_STAT_TX_PKTS``          uint    Packets with Tx HW timestamps
1271  ``ETHTOOL_A_TS_STAT_TX_LOST``          uint    Tx HW timestamp not arrived count
1272  ``ETHTOOL_A_TS_STAT_TX_ERR``           uint    HW error request Tx timestamp count
1273  =====================================  ======  ===================================
1274
1275CABLE_TEST
1276==========
1277
1278Start a cable test.
1279
1280Request contents:
1281
1282  ====================================  ======  ==========================
1283  ``ETHTOOL_A_CABLE_TEST_HEADER``       nested  request header
1284  ====================================  ======  ==========================
1285
1286Notification contents:
1287
1288An Ethernet cable typically contains 1, 2 or 4 pairs. The length of
1289the pair can only be measured when there is a fault in the pair and
1290hence a reflection. Information about the fault may not be available,
1291depending on the specific hardware. Hence the contents of the notify
1292message are mostly optional. The attributes can be repeated an
1293arbitrary number of times, in an arbitrary order, for an arbitrary
1294number of pairs.
1295
1296The example shows the notification sent when the test is completed for
1297a T2 cable, i.e. two pairs. One pair is OK and hence has no length
1298information. The second pair has a fault and does have length
1299information.
1300
1301 +---------------------------------------------+--------+---------------------+
1302 | ``ETHTOOL_A_CABLE_TEST_HEADER``             | nested | reply header        |
1303 +---------------------------------------------+--------+---------------------+
1304 | ``ETHTOOL_A_CABLE_TEST_STATUS``             | u8     | completed           |
1305 +---------------------------------------------+--------+---------------------+
1306 | ``ETHTOOL_A_CABLE_TEST_NTF_NEST``           | nested | all the results     |
1307 +-+-------------------------------------------+--------+---------------------+
1308 | | ``ETHTOOL_A_CABLE_NEST_RESULT``           | nested | cable test result   |
1309 +-+-+-----------------------------------------+--------+---------------------+
1310 | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR``        | u8     | pair number         |
1311 +-+-+-----------------------------------------+--------+---------------------+
1312 | | | ``ETHTOOL_A_CABLE_RESULTS_CODE``        | u8     | result code         |
1313 +-+-+-----------------------------------------+--------+---------------------+
1314 | | ``ETHTOOL_A_CABLE_NEST_RESULT``           | nested | cable test results  |
1315 +-+-+-----------------------------------------+--------+---------------------+
1316 | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR``        | u8     | pair number         |
1317 +-+-+-----------------------------------------+--------+---------------------+
1318 | | | ``ETHTOOL_A_CABLE_RESULTS_CODE``        | u8     | result code         |
1319 +-+-+-----------------------------------------+--------+---------------------+
1320 | | | ``ETHTOOL_A_CABLE_RESULT_SRC``          | u32    | information source  |
1321 +-+-+-----------------------------------------+--------+---------------------+
1322 | | ``ETHTOOL_A_CABLE_NEST_FAULT_LENGTH``     | nested | cable length        |
1323 +-+-+-----------------------------------------+--------+---------------------+
1324 | | | ``ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR``   | u8     | pair number         |
1325 +-+-+-----------------------------------------+--------+---------------------+
1326 | | | ``ETHTOOL_A_CABLE_FAULT_LENGTH_CM``     | u32    | length in cm        |
1327 +-+-+-----------------------------------------+--------+---------------------+
1328 | | | ``ETHTOOL_A_CABLE_FAULT_LENGTH_SRC``    | u32    | information source  |
1329 +-+-+-----------------------------------------+--------+---------------------+
1330
1331
1332CABLE_TEST TDR
1333==============
1334
1335Start a cable test and report raw TDR data
1336
1337Request contents:
1338
1339 +--------------------------------------------+--------+-----------------------+
1340 | ``ETHTOOL_A_CABLE_TEST_TDR_HEADER``        | nested | reply header          |
1341 +--------------------------------------------+--------+-----------------------+
1342 | ``ETHTOOL_A_CABLE_TEST_TDR_CFG``           | nested | test configuration    |
1343 +-+------------------------------------------+--------+-----------------------+
1344 | | ``ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE``  | u32    | first data distance   |
1345 +-+-+----------------------------------------+--------+-----------------------+
1346 | | ``ETHTOOL_A_CABLE_STEP_LAST_DISTANCE``   | u32    | last data distance    |
1347 +-+-+----------------------------------------+--------+-----------------------+
1348 | | ``ETHTOOL_A_CABLE_STEP_STEP_DISTANCE``   | u32    | distance of each step |
1349 +-+-+----------------------------------------+--------+-----------------------+
1350 | | ``ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR``    | u8     | pair to test          |
1351 +-+-+----------------------------------------+--------+-----------------------+
1352
1353The ETHTOOL_A_CABLE_TEST_TDR_CFG is optional, as well as all members
1354of the nest. All distances are expressed in centimeters. The PHY takes
1355the distances as a guide, and rounds to the nearest distance it
1356actually supports. If a pair is passed, only that one pair will be
1357tested. Otherwise all pairs are tested.
1358
1359Notification contents:
1360
1361Raw TDR data is gathered by sending a pulse down the cable and
1362recording the amplitude of the reflected pulse for a given distance.
1363
1364It can take a number of seconds to collect TDR data, especial if the
1365full 100 meters is probed at 1 meter intervals. When the test is
1366started a notification will be sent containing just
1367ETHTOOL_A_CABLE_TEST_TDR_STATUS with the value
1368ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED.
1369
1370When the test has completed a second notification will be sent
1371containing ETHTOOL_A_CABLE_TEST_TDR_STATUS with the value
1372ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED and the TDR data.
1373
1374The message may optionally contain the amplitude of the pulse send
1375down the cable. This is measured in mV. A reflection should not be
1376bigger than transmitted pulse.
1377
1378Before the raw TDR data should be an ETHTOOL_A_CABLE_TDR_NEST_STEP
1379nest containing information about the distance along the cable for the
1380first reading, the last reading, and the step between each
1381reading. Distances are measured in centimeters. These should be the
1382exact values the PHY used. These may be different to what the user
1383requested, if the native measurement resolution is greater than 1 cm.
1384
1385For each step along the cable, a ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE is
1386used to report the amplitude of the reflection for a given pair.
1387
1388 +---------------------------------------------+--------+----------------------+
1389 | ``ETHTOOL_A_CABLE_TEST_TDR_HEADER``         | nested | reply header         |
1390 +---------------------------------------------+--------+----------------------+
1391 | ``ETHTOOL_A_CABLE_TEST_TDR_STATUS``         | u8     | completed            |
1392 +---------------------------------------------+--------+----------------------+
1393 | ``ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST``       | nested | all the results      |
1394 +-+-------------------------------------------+--------+----------------------+
1395 | | ``ETHTOOL_A_CABLE_TDR_NEST_PULSE``        | nested | TX Pulse amplitude   |
1396 +-+-+-----------------------------------------+--------+----------------------+
1397 | | | ``ETHTOOL_A_CABLE_PULSE_mV``            | s16    | Pulse amplitude      |
1398 +-+-+-----------------------------------------+--------+----------------------+
1399 | | ``ETHTOOL_A_CABLE_NEST_STEP``             | nested | TDR step info        |
1400 +-+-+-----------------------------------------+--------+----------------------+
1401 | | | ``ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE`` | u32    | First data distance  |
1402 +-+-+-----------------------------------------+--------+----------------------+
1403 | | | ``ETHTOOL_A_CABLE_STEP_LAST_DISTANCE``  | u32    | Last data distance   |
1404 +-+-+-----------------------------------------+--------+----------------------+
1405 | | | ``ETHTOOL_A_CABLE_STEP_STEP_DISTANCE``  | u32    | distance of each step|
1406 +-+-+-----------------------------------------+--------+----------------------+
1407 | | ``ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE``    | nested | Reflection amplitude |
1408 +-+-+-----------------------------------------+--------+----------------------+
1409 | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR``        | u8     | pair number          |
1410 +-+-+-----------------------------------------+--------+----------------------+
1411 | | | ``ETHTOOL_A_CABLE_AMPLITUDE_mV``        | s16    | Reflection amplitude |
1412 +-+-+-----------------------------------------+--------+----------------------+
1413 | | ``ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE``    | nested | Reflection amplitude |
1414 +-+-+-----------------------------------------+--------+----------------------+
1415 | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR``        | u8     | pair number          |
1416 +-+-+-----------------------------------------+--------+----------------------+
1417 | | | ``ETHTOOL_A_CABLE_AMPLITUDE_mV``        | s16    | Reflection amplitude |
1418 +-+-+-----------------------------------------+--------+----------------------+
1419 | | ``ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE``    | nested | Reflection amplitude |
1420 +-+-+-----------------------------------------+--------+----------------------+
1421 | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR``        | u8     | pair number          |
1422 +-+-+-----------------------------------------+--------+----------------------+
1423 | | | ``ETHTOOL_A_CABLE_AMPLITUDE_mV``        | s16    | Reflection amplitude |
1424 +-+-+-----------------------------------------+--------+----------------------+
1425
1426TUNNEL_INFO
1427===========
1428
1429Gets information about the tunnel state NIC is aware of.
1430
1431Request contents:
1432
1433  =====================================  ======  ==========================
1434  ``ETHTOOL_A_TUNNEL_INFO_HEADER``       nested  request header
1435  =====================================  ======  ==========================
1436
1437Kernel response contents:
1438
1439 +---------------------------------------------+--------+---------------------+
1440 | ``ETHTOOL_A_TUNNEL_INFO_HEADER``            | nested | reply header        |
1441 +---------------------------------------------+--------+---------------------+
1442 | ``ETHTOOL_A_TUNNEL_INFO_UDP_PORTS``         | nested | all UDP port tables |
1443 +-+-------------------------------------------+--------+---------------------+
1444 | | ``ETHTOOL_A_TUNNEL_UDP_TABLE``            | nested | one UDP port table  |
1445 +-+-+-----------------------------------------+--------+---------------------+
1446 | | | ``ETHTOOL_A_TUNNEL_UDP_TABLE_SIZE``     | u32    | max size of the     |
1447 | | |                                         |        | table               |
1448 +-+-+-----------------------------------------+--------+---------------------+
1449 | | | ``ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES``    | bitset | tunnel types which  |
1450 | | |                                         |        | table can hold      |
1451 +-+-+-----------------------------------------+--------+---------------------+
1452 | | | ``ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY``    | nested | offloaded UDP port  |
1453 +-+-+-+---------------------------------------+--------+---------------------+
1454 | | | | ``ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT``   | be16   | UDP port            |
1455 +-+-+-+---------------------------------------+--------+---------------------+
1456 | | | | ``ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE``   | u32    | tunnel type         |
1457 +-+-+-+---------------------------------------+--------+---------------------+
1458
1459For UDP tunnel table empty ``ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES`` indicates that
1460the table contains static entries, hard-coded by the NIC.
1461
1462FEC_GET
1463=======
1464
1465Gets FEC configuration and state like ``ETHTOOL_GFECPARAM`` ioctl request.
1466
1467Request contents:
1468
1469  =====================================  ======  ==========================
1470  ``ETHTOOL_A_FEC_HEADER``               nested  request header
1471  =====================================  ======  ==========================
1472
1473Kernel response contents:
1474
1475  =====================================  ======  ==========================
1476  ``ETHTOOL_A_FEC_HEADER``               nested  request header
1477  ``ETHTOOL_A_FEC_MODES``                bitset  configured modes
1478  ``ETHTOOL_A_FEC_AUTO``                 bool    FEC mode auto selection
1479  ``ETHTOOL_A_FEC_ACTIVE``               u32     index of active FEC mode
1480  ``ETHTOOL_A_FEC_STATS``                nested  FEC statistics
1481  =====================================  ======  ==========================
1482
1483``ETHTOOL_A_FEC_ACTIVE`` is the bit index of the FEC link mode currently
1484active on the interface. This attribute may not be present if device does
1485not support FEC.
1486
1487``ETHTOOL_A_FEC_MODES`` and ``ETHTOOL_A_FEC_AUTO`` are only meaningful when
1488autonegotiation is disabled. If ``ETHTOOL_A_FEC_AUTO`` is non-zero driver will
1489select the FEC mode automatically based on the parameters of the SFP module.
1490This is equivalent to the ``ETHTOOL_FEC_AUTO`` bit of the ioctl interface.
1491``ETHTOOL_A_FEC_MODES`` carry the current FEC configuration using link mode
1492bits (rather than old ``ETHTOOL_FEC_*`` bits).
1493
1494``ETHTOOL_A_FEC_STATS`` are reported if ``ETHTOOL_FLAG_STATS`` was set in
1495``ETHTOOL_A_HEADER_FLAGS``.
1496Each attribute carries an array of 64bit statistics. First entry in the array
1497contains the total number of events on the port, while the following entries
1498are counters corresponding to lanes/PCS instances. The number of entries in
1499the array will be:
1500
1501+--------------+---------------------------------------------+
1502| `0`          | device does not support FEC statistics      |
1503+--------------+---------------------------------------------+
1504| `1`          | device does not support per-lane break down |
1505+--------------+---------------------------------------------+
1506| `1 + #lanes` | device has full support for FEC stats       |
1507+--------------+---------------------------------------------+
1508
1509Drivers fill in the statistics in the following structure:
1510
1511.. kernel-doc:: include/linux/ethtool.h
1512    :identifiers: ethtool_fec_stats
1513
1514FEC_SET
1515=======
1516
1517Sets FEC parameters like ``ETHTOOL_SFECPARAM`` ioctl request.
1518
1519Request contents:
1520
1521  =====================================  ======  ==========================
1522  ``ETHTOOL_A_FEC_HEADER``               nested  request header
1523  ``ETHTOOL_A_FEC_MODES``                bitset  configured modes
1524  ``ETHTOOL_A_FEC_AUTO``                 bool    FEC mode auto selection
1525  =====================================  ======  ==========================
1526
1527``FEC_SET`` is only meaningful when autonegotiation is disabled. Otherwise
1528FEC mode is selected as part of autonegotiation.
1529
1530``ETHTOOL_A_FEC_MODES`` selects which FEC mode should be used. It's recommended
1531to set only one bit, if multiple bits are set driver may choose between them
1532in an implementation specific way.
1533
1534``ETHTOOL_A_FEC_AUTO`` requests the driver to choose FEC mode based on SFP
1535module parameters. This does not mean autonegotiation.
1536
1537MODULE_EEPROM_GET
1538=================
1539
1540Fetch module EEPROM data dump.
1541This interface is designed to allow dumps of at most 1/2 page at once. This
1542means only dumps of 128 (or less) bytes are allowed, without crossing half page
1543boundary located at offset 128. For pages other than 0 only high 128 bytes are
1544accessible.
1545
1546Request contents:
1547
1548  =======================================  ======  ==========================
1549  ``ETHTOOL_A_MODULE_EEPROM_HEADER``       nested  request header
1550  ``ETHTOOL_A_MODULE_EEPROM_OFFSET``       u32     offset within a page
1551  ``ETHTOOL_A_MODULE_EEPROM_LENGTH``       u32     amount of bytes to read
1552  ``ETHTOOL_A_MODULE_EEPROM_PAGE``         u8      page number
1553  ``ETHTOOL_A_MODULE_EEPROM_BANK``         u8      bank number
1554  ``ETHTOOL_A_MODULE_EEPROM_I2C_ADDRESS``  u8      page I2C address
1555  =======================================  ======  ==========================
1556
1557If ``ETHTOOL_A_MODULE_EEPROM_BANK`` is not specified, bank 0 is assumed.
1558
1559Kernel response contents:
1560
1561 +---------------------------------------------+--------+---------------------+
1562 | ``ETHTOOL_A_MODULE_EEPROM_HEADER``          | nested | reply header        |
1563 +---------------------------------------------+--------+---------------------+
1564 | ``ETHTOOL_A_MODULE_EEPROM_DATA``            | binary | array of bytes from |
1565 |                                             |        | module EEPROM       |
1566 +---------------------------------------------+--------+---------------------+
1567
1568``ETHTOOL_A_MODULE_EEPROM_DATA`` has an attribute length equal to the amount of
1569bytes driver actually read.
1570
1571STATS_GET
1572=========
1573
1574Get standard statistics for the interface. Note that this is not
1575a re-implementation of ``ETHTOOL_GSTATS`` which exposed driver-defined
1576stats.
1577
1578Request contents:
1579
1580  =======================================  ======  ==========================
1581  ``ETHTOOL_A_STATS_HEADER``               nested  request header
1582  ``ETHTOOL_A_STATS_SRC``                  u32     source of statistics
1583  ``ETHTOOL_A_STATS_GROUPS``               bitset  requested groups of stats
1584  =======================================  ======  ==========================
1585
1586Kernel response contents:
1587
1588 +-----------------------------------+--------+--------------------------------+
1589 | ``ETHTOOL_A_STATS_HEADER``        | nested | reply header                   |
1590 +-----------------------------------+--------+--------------------------------+
1591 | ``ETHTOOL_A_STATS_SRC``           | u32    | source of statistics           |
1592 +-----------------------------------+--------+--------------------------------+
1593 | ``ETHTOOL_A_STATS_GRP``           | nested | one or more group of stats     |
1594 +-+---------------------------------+--------+--------------------------------+
1595 | | ``ETHTOOL_A_STATS_GRP_ID``      | u32    | group ID - ``ETHTOOL_STATS_*`` |
1596 +-+---------------------------------+--------+--------------------------------+
1597 | | ``ETHTOOL_A_STATS_GRP_SS_ID``   | u32    | string set ID for names        |
1598 +-+---------------------------------+--------+--------------------------------+
1599 | | ``ETHTOOL_A_STATS_GRP_STAT``    | nested | nest containing a statistic    |
1600 +-+---------------------------------+--------+--------------------------------+
1601 | | ``ETHTOOL_A_STATS_GRP_HIST_RX`` | nested | histogram statistic (Rx)       |
1602 +-+---------------------------------+--------+--------------------------------+
1603 | | ``ETHTOOL_A_STATS_GRP_HIST_TX`` | nested | histogram statistic (Tx)       |
1604 +-+---------------------------------+--------+--------------------------------+
1605
1606Users specify which groups of statistics they are requesting via
1607the ``ETHTOOL_A_STATS_GROUPS`` bitset. Currently defined values are:
1608
1609 ====================== ======== ===============================================
1610 ETHTOOL_STATS_ETH_MAC  eth-mac  Basic IEEE 802.3 MAC statistics (30.3.1.1.*)
1611 ETHTOOL_STATS_ETH_PHY  eth-phy  Basic IEEE 802.3 PHY statistics (30.3.2.1.*)
1612 ETHTOOL_STATS_ETH_CTRL eth-ctrl Basic IEEE 802.3 MAC Ctrl statistics (30.3.3.*)
1613 ETHTOOL_STATS_RMON     rmon     RMON (RFC 2819) statistics
1614 ====================== ======== ===============================================
1615
1616Each group should have a corresponding ``ETHTOOL_A_STATS_GRP`` in the reply.
1617``ETHTOOL_A_STATS_GRP_ID`` identifies which group's statistics nest contains.
1618``ETHTOOL_A_STATS_GRP_SS_ID`` identifies the string set ID for the names of
1619the statistics in the group, if available.
1620
1621Statistics are added to the ``ETHTOOL_A_STATS_GRP`` nest under
1622``ETHTOOL_A_STATS_GRP_STAT``. ``ETHTOOL_A_STATS_GRP_STAT`` should contain
1623single 8 byte (u64) attribute inside - the type of that attribute is
1624the statistic ID and the value is the value of the statistic.
1625Each group has its own interpretation of statistic IDs.
1626Attribute IDs correspond to strings from the string set identified
1627by ``ETHTOOL_A_STATS_GRP_SS_ID``. Complex statistics (such as RMON histogram
1628entries) are also listed inside ``ETHTOOL_A_STATS_GRP`` and do not have
1629a string defined in the string set.
1630
1631RMON "histogram" counters count number of packets within given size range.
1632Because RFC does not specify the ranges beyond the standard 1518 MTU devices
1633differ in definition of buckets. For this reason the definition of packet ranges
1634is left to each driver.
1635
1636``ETHTOOL_A_STATS_GRP_HIST_RX`` and ``ETHTOOL_A_STATS_GRP_HIST_TX`` nests
1637contain the following attributes:
1638
1639 ================================= ====== ===================================
1640 ETHTOOL_A_STATS_RMON_HIST_BKT_LOW u32    low bound of the packet size bucket
1641 ETHTOOL_A_STATS_RMON_HIST_BKT_HI  u32    high bound of the bucket
1642 ETHTOOL_A_STATS_RMON_HIST_VAL     u64    packet counter
1643 ================================= ====== ===================================
1644
1645Low and high bounds are inclusive, for example:
1646
1647 ============================= ==== ====
1648 RFC statistic                 low  high
1649 ============================= ==== ====
1650 etherStatsPkts64Octets          0    64
1651 etherStatsPkts512to1023Octets 512  1023
1652 ============================= ==== ====
1653
1654``ETHTOOL_A_STATS_SRC`` is optional. Similar to ``PAUSE_GET``, it takes values
1655from ``enum ethtool_mac_stats_src``. If absent from the request, stats will be
1656provided with an ``ETHTOOL_A_STATS_SRC`` attribute in the response equal to
1657``ETHTOOL_MAC_STATS_SRC_AGGREGATE``.
1658
1659PHC_VCLOCKS_GET
1660===============
1661
1662Query device PHC virtual clocks information.
1663
1664Request contents:
1665
1666  ====================================  ======  ==========================
1667  ``ETHTOOL_A_PHC_VCLOCKS_HEADER``      nested  request header
1668  ====================================  ======  ==========================
1669
1670Kernel response contents:
1671
1672  ====================================  ======  ==========================
1673  ``ETHTOOL_A_PHC_VCLOCKS_HEADER``      nested  reply header
1674  ``ETHTOOL_A_PHC_VCLOCKS_NUM``         u32     PHC virtual clocks number
1675  ``ETHTOOL_A_PHC_VCLOCKS_INDEX``       s32     PHC index array
1676  ====================================  ======  ==========================
1677
1678MODULE_GET
1679==========
1680
1681Gets transceiver module parameters.
1682
1683Request contents:
1684
1685  =====================================  ======  ==========================
1686  ``ETHTOOL_A_MODULE_HEADER``            nested  request header
1687  =====================================  ======  ==========================
1688
1689Kernel response contents:
1690
1691  ======================================  ======  ==========================
1692  ``ETHTOOL_A_MODULE_HEADER``             nested  reply header
1693  ``ETHTOOL_A_MODULE_POWER_MODE_POLICY``  u8      power mode policy
1694  ``ETHTOOL_A_MODULE_POWER_MODE``         u8      operational power mode
1695  ======================================  ======  ==========================
1696
1697The optional ``ETHTOOL_A_MODULE_POWER_MODE_POLICY`` attribute encodes the
1698transceiver module power mode policy enforced by the host. The default policy
1699is driver-dependent, but "auto" is the recommended default and it should be
1700implemented by new drivers and drivers where conformance to a legacy behavior
1701is not critical.
1702
1703The optional ``ETHTHOOL_A_MODULE_POWER_MODE`` attribute encodes the operational
1704power mode policy of the transceiver module. It is only reported when a module
1705is plugged-in. Possible values are:
1706
1707.. kernel-doc:: include/uapi/linux/ethtool.h
1708    :identifiers: ethtool_module_power_mode
1709
1710MODULE_SET
1711==========
1712
1713Sets transceiver module parameters.
1714
1715Request contents:
1716
1717  ======================================  ======  ==========================
1718  ``ETHTOOL_A_MODULE_HEADER``             nested  request header
1719  ``ETHTOOL_A_MODULE_POWER_MODE_POLICY``  u8      power mode policy
1720  ======================================  ======  ==========================
1721
1722When set, the optional ``ETHTOOL_A_MODULE_POWER_MODE_POLICY`` attribute is used
1723to set the transceiver module power policy enforced by the host. Possible
1724values are:
1725
1726.. kernel-doc:: include/uapi/linux/ethtool.h
1727    :identifiers: ethtool_module_power_mode_policy
1728
1729For SFF-8636 modules, low power mode is forced by the host according to table
17306-10 in revision 2.10a of the specification.
1731
1732For CMIS modules, low power mode is forced by the host according to table 6-12
1733in revision 5.0 of the specification.
1734
1735PSE_GET
1736=======
1737
1738Gets PSE attributes.
1739
1740Request contents:
1741
1742  =====================================  ======  ==========================
1743  ``ETHTOOL_A_PSE_HEADER``               nested  request header
1744  =====================================  ======  ==========================
1745
1746Kernel response contents:
1747
1748  ==========================================  ======  =============================
1749  ``ETHTOOL_A_PSE_HEADER``                    nested  reply header
1750  ``ETHTOOL_A_PODL_PSE_ADMIN_STATE``             u32  Operational state of the PoDL
1751                                                      PSE functions
1752  ``ETHTOOL_A_PODL_PSE_PW_D_STATUS``             u32  power detection status of the
1753                                                      PoDL PSE.
1754  ``ETHTOOL_A_C33_PSE_ADMIN_STATE``              u32  Operational state of the PoE
1755                                                      PSE functions.
1756  ``ETHTOOL_A_C33_PSE_PW_D_STATUS``              u32  power detection status of the
1757                                                      PoE PSE.
1758  ``ETHTOOL_A_C33_PSE_PW_CLASS``                 u32  power class of the PoE PSE.
1759  ``ETHTOOL_A_C33_PSE_ACTUAL_PW``                u32  actual power drawn on the
1760                                                      PoE PSE.
1761  ``ETHTOOL_A_C33_PSE_EXT_STATE``                u32  power extended state of the
1762                                                      PoE PSE.
1763  ``ETHTOOL_A_C33_PSE_EXT_SUBSTATE``             u32  power extended substatus of
1764                                                      the PoE PSE.
1765  ``ETHTOOL_A_C33_PSE_AVAIL_PW_LIMIT``           u32  currently configured power
1766                                                      limit of the PoE PSE.
1767  ``ETHTOOL_A_C33_PSE_PW_LIMIT_RANGES``       nested  Supported power limit
1768                                                      configuration ranges.
1769  ==========================================  ======  =============================
1770
1771When set, the optional ``ETHTOOL_A_PODL_PSE_ADMIN_STATE`` attribute identifies
1772the operational state of the PoDL PSE functions.  The operational state of the
1773PSE function can be changed using the ``ETHTOOL_A_PODL_PSE_ADMIN_CONTROL``
1774action. This attribute corresponds to ``IEEE 802.3-2018`` 30.15.1.1.2
1775aPoDLPSEAdminState. Possible values are:
1776
1777.. kernel-doc:: include/uapi/linux/ethtool.h
1778    :identifiers: ethtool_podl_pse_admin_state
1779
1780The same goes for ``ETHTOOL_A_C33_PSE_ADMIN_STATE`` implementing
1781``IEEE 802.3-2022`` 30.9.1.1.2 aPSEAdminState.
1782
1783.. kernel-doc:: include/uapi/linux/ethtool.h
1784    :identifiers: ethtool_c33_pse_admin_state
1785
1786When set, the optional ``ETHTOOL_A_PODL_PSE_PW_D_STATUS`` attribute identifies
1787the power detection status of the PoDL PSE.  The status depend on internal PSE
1788state machine and automatic PD classification support. This attribute
1789corresponds to ``IEEE 802.3-2018`` 30.15.1.1.3 aPoDLPSEPowerDetectionStatus.
1790Possible values are:
1791
1792.. kernel-doc:: include/uapi/linux/ethtool.h
1793    :identifiers: ethtool_podl_pse_pw_d_status
1794
1795The same goes for ``ETHTOOL_A_C33_PSE_ADMIN_PW_D_STATUS`` implementing
1796``IEEE 802.3-2022`` 30.9.1.1.5 aPSEPowerDetectionStatus.
1797
1798.. kernel-doc:: include/uapi/linux/ethtool.h
1799    :identifiers: ethtool_c33_pse_pw_d_status
1800
1801When set, the optional ``ETHTOOL_A_C33_PSE_PW_CLASS`` attribute identifies
1802the power class of the C33 PSE. It depends on the class negotiated between
1803the PSE and the PD. This attribute corresponds to ``IEEE 802.3-2022``
180430.9.1.1.8 aPSEPowerClassification.
1805
1806When set, the optional ``ETHTOOL_A_C33_PSE_ACTUAL_PW`` attribute identifies
1807the actual power drawn by the C33 PSE. This attribute corresponds to
1808``IEEE 802.3-2022`` 30.9.1.1.23 aPSEActualPower. Actual power is reported
1809in mW.
1810
1811When set, the optional ``ETHTOOL_A_C33_PSE_EXT_STATE`` attribute identifies
1812the extended error state of the C33 PSE. Possible values are:
1813
1814.. kernel-doc:: include/uapi/linux/ethtool.h
1815    :identifiers: ethtool_c33_pse_ext_state
1816
1817When set, the optional ``ETHTOOL_A_C33_PSE_EXT_SUBSTATE`` attribute identifies
1818the extended error state of the C33 PSE. Possible values are:
1819Possible values are:
1820
1821.. kernel-doc:: include/uapi/linux/ethtool.h
1822    :identifiers: ethtool_c33_pse_ext_substate_class_num_events
1823		  ethtool_c33_pse_ext_substate_error_condition
1824		  ethtool_c33_pse_ext_substate_mr_pse_enable
1825		  ethtool_c33_pse_ext_substate_option_detect_ted
1826		  ethtool_c33_pse_ext_substate_option_vport_lim
1827		  ethtool_c33_pse_ext_substate_ovld_detected
1828		  ethtool_c33_pse_ext_substate_pd_dll_power_type
1829		  ethtool_c33_pse_ext_substate_power_not_available
1830		  ethtool_c33_pse_ext_substate_short_detected
1831
1832When set, the optional ``ETHTOOL_A_C33_PSE_AVAIL_PW_LIMIT`` attribute
1833identifies the C33 PSE power limit in mW.
1834
1835When set the optional ``ETHTOOL_A_C33_PSE_PW_LIMIT_RANGES`` nested attribute
1836identifies the C33 PSE power limit ranges through
1837``ETHTOOL_A_C33_PSE_PWR_VAL_LIMIT_RANGE_MIN`` and
1838``ETHTOOL_A_C33_PSE_PWR_VAL_LIMIT_RANGE_MAX``.
1839If the controller works with fixed classes, the min and max values will be
1840equal.
1841
1842PSE_SET
1843=======
1844
1845Sets PSE parameters.
1846
1847Request contents:
1848
1849  ======================================  ======  =============================
1850  ``ETHTOOL_A_PSE_HEADER``                nested  request header
1851  ``ETHTOOL_A_PODL_PSE_ADMIN_CONTROL``       u32  Control PoDL PSE Admin state
1852  ``ETHTOOL_A_C33_PSE_ADMIN_CONTROL``        u32  Control PSE Admin state
1853  ``ETHTOOL_A_C33_PSE_AVAIL_PWR_LIMIT``      u32  Control PoE PSE available
1854                                                  power limit
1855  ======================================  ======  =============================
1856
1857When set, the optional ``ETHTOOL_A_PODL_PSE_ADMIN_CONTROL`` attribute is used
1858to control PoDL PSE Admin functions. This option implements
1859``IEEE 802.3-2018`` 30.15.1.2.1 acPoDLPSEAdminControl. See
1860``ETHTOOL_A_PODL_PSE_ADMIN_STATE`` for supported values.
1861
1862The same goes for ``ETHTOOL_A_C33_PSE_ADMIN_CONTROL`` implementing
1863``IEEE 802.3-2022`` 30.9.1.2.1 acPSEAdminControl.
1864
1865When set, the optional ``ETHTOOL_A_C33_PSE_AVAIL_PWR_LIMIT`` attribute is
1866used to control the available power value limit for C33 PSE in milliwatts.
1867This attribute corresponds  to the `pse_available_power` variable described in
1868``IEEE 802.3-2022`` 33.2.4.4 Variables  and `pse_avail_pwr` in 145.2.5.4
1869Variables, which are described in power classes.
1870
1871It was decided to use milliwatts for this interface to unify it with other
1872power monitoring interfaces, which also use milliwatts, and to align with
1873various existing products that document power consumption in watts rather than
1874classes. If power limit configuration based on classes is needed, the
1875conversion can be done in user space, for example by ethtool.
1876
1877RSS_GET
1878=======
1879
1880Get indirection table, hash key and hash function info associated with a
1881RSS context of an interface similar to ``ETHTOOL_GRSSH`` ioctl request.
1882
1883Request contents:
1884
1885=====================================  ======  ============================
1886  ``ETHTOOL_A_RSS_HEADER``             nested  request header
1887  ``ETHTOOL_A_RSS_CONTEXT``            u32     context number
1888  ``ETHTOOL_A_RSS_START_CONTEXT``      u32     start context number (dumps)
1889=====================================  ======  ============================
1890
1891``ETHTOOL_A_RSS_CONTEXT`` specifies which RSS context number to query,
1892if not set context 0 (the main context) is queried. Dumps can be filtered
1893by device (only listing contexts of a given netdev). Filtering single
1894context number is not supported but ``ETHTOOL_A_RSS_START_CONTEXT``
1895can be used to start dumping context from the given number (primarily
1896used to ignore context 0s and only dump additional contexts).
1897
1898Kernel response contents:
1899
1900=====================================  ======  ==========================
1901  ``ETHTOOL_A_RSS_HEADER``             nested  reply header
1902  ``ETHTOOL_A_RSS_CONTEXT``            u32     context number
1903  ``ETHTOOL_A_RSS_HFUNC``              u32     RSS hash func
1904  ``ETHTOOL_A_RSS_INDIR``              binary  Indir table bytes
1905  ``ETHTOOL_A_RSS_HKEY``               binary  Hash key bytes
1906  ``ETHTOOL_A_RSS_INPUT_XFRM``         u32     RSS input data transformation
1907=====================================  ======  ==========================
1908
1909ETHTOOL_A_RSS_HFUNC attribute is bitmap indicating the hash function
1910being used. Current supported options are toeplitz, xor or crc32.
1911ETHTOOL_A_RSS_INDIR attribute returns RSS indirection table where each byte
1912indicates queue number.
1913ETHTOOL_A_RSS_INPUT_XFRM attribute is a bitmap indicating the type of
1914transformation applied to the input protocol fields before given to the RSS
1915hfunc. Current supported option is symmetric-xor.
1916
1917PLCA_GET_CFG
1918============
1919
1920Gets the IEEE 802.3cg-2019 Clause 148 Physical Layer Collision Avoidance
1921(PLCA) Reconciliation Sublayer (RS) attributes.
1922
1923Request contents:
1924
1925  =====================================  ======  ==========================
1926  ``ETHTOOL_A_PLCA_HEADER``              nested  request header
1927  =====================================  ======  ==========================
1928
1929Kernel response contents:
1930
1931  ======================================  ======  =============================
1932  ``ETHTOOL_A_PLCA_HEADER``               nested  reply header
1933  ``ETHTOOL_A_PLCA_VERSION``              u16     Supported PLCA management
1934                                                  interface standard/version
1935  ``ETHTOOL_A_PLCA_ENABLED``              u8      PLCA Admin State
1936  ``ETHTOOL_A_PLCA_NODE_ID``              u32     PLCA unique local node ID
1937  ``ETHTOOL_A_PLCA_NODE_CNT``             u32     Number of PLCA nodes on the
1938                                                  network, including the
1939                                                  coordinator
1940  ``ETHTOOL_A_PLCA_TO_TMR``               u32     Transmit Opportunity Timer
1941                                                  value in bit-times (BT)
1942  ``ETHTOOL_A_PLCA_BURST_CNT``            u32     Number of additional packets
1943                                                  the node is allowed to send
1944                                                  within a single TO
1945  ``ETHTOOL_A_PLCA_BURST_TMR``            u32     Time to wait for the MAC to
1946                                                  transmit a new frame before
1947                                                  terminating the burst
1948  ======================================  ======  =============================
1949
1950When set, the optional ``ETHTOOL_A_PLCA_VERSION`` attribute indicates which
1951standard and version the PLCA management interface complies to. When not set,
1952the interface is vendor-specific and (possibly) supplied by the driver.
1953The OPEN Alliance SIG specifies a standard register map for 10BASE-T1S PHYs
1954embedding the PLCA Reconciliation Sublayer. See "10BASE-T1S PLCA Management
1955Registers" at https://www.opensig.org/about/specifications/.
1956
1957When set, the optional ``ETHTOOL_A_PLCA_ENABLED`` attribute indicates the
1958administrative state of the PLCA RS. When not set, the node operates in "plain"
1959CSMA/CD mode. This option is corresponding to ``IEEE 802.3cg-2019`` 30.16.1.1.1
1960aPLCAAdminState / 30.16.1.2.1 acPLCAAdminControl.
1961
1962When set, the optional ``ETHTOOL_A_PLCA_NODE_ID`` attribute indicates the
1963configured local node ID of the PHY. This ID determines which transmit
1964opportunity (TO) is reserved for the node to transmit into. This option is
1965corresponding to ``IEEE 802.3cg-2019`` 30.16.1.1.4 aPLCALocalNodeID. The valid
1966range for this attribute is [0 .. 255] where 255 means "not configured".
1967
1968When set, the optional ``ETHTOOL_A_PLCA_NODE_CNT`` attribute indicates the
1969configured maximum number of PLCA nodes on the mixing-segment. This number
1970determines the total number of transmit opportunities generated during a
1971PLCA cycle. This attribute is relevant only for the PLCA coordinator, which is
1972the node with aPLCALocalNodeID set to 0. Follower nodes ignore this setting.
1973This option is corresponding to ``IEEE 802.3cg-2019`` 30.16.1.1.3
1974aPLCANodeCount. The valid range for this attribute is [1 .. 255].
1975
1976When set, the optional ``ETHTOOL_A_PLCA_TO_TMR`` attribute indicates the
1977configured value of the transmit opportunity timer in bit-times. This value
1978must be set equal across all nodes sharing the medium for PLCA to work
1979correctly. This option is corresponding to ``IEEE 802.3cg-2019`` 30.16.1.1.5
1980aPLCATransmitOpportunityTimer. The valid range for this attribute is
1981[0 .. 255].
1982
1983When set, the optional ``ETHTOOL_A_PLCA_BURST_CNT`` attribute indicates the
1984configured number of extra packets that the node is allowed to send during a
1985single transmit opportunity. By default, this attribute is 0, meaning that
1986the node can only send a single frame per TO. When greater than 0, the PLCA RS
1987keeps the TO after any transmission, waiting for the MAC to send a new frame
1988for up to aPLCABurstTimer BTs. This can only happen a number of times per PLCA
1989cycle up to the value of this parameter. After that, the burst is over and the
1990normal counting of TOs resumes. This option is corresponding to
1991``IEEE 802.3cg-2019`` 30.16.1.1.6 aPLCAMaxBurstCount. The valid range for this
1992attribute is [0 .. 255].
1993
1994When set, the optional ``ETHTOOL_A_PLCA_BURST_TMR`` attribute indicates how
1995many bit-times the PLCA RS waits for the MAC to initiate a new transmission
1996when aPLCAMaxBurstCount is greater than 0. If the MAC fails to send a new
1997frame within this time, the burst ends and the counting of TOs resumes.
1998Otherwise, the new frame is sent as part of the current burst. This option
1999is corresponding to ``IEEE 802.3cg-2019`` 30.16.1.1.7 aPLCABurstTimer. The
2000valid range for this attribute is [0 .. 255]. Although, the value should be
2001set greater than the Inter-Frame-Gap (IFG) time of the MAC (plus some margin)
2002for PLCA burst mode to work as intended.
2003
2004PLCA_SET_CFG
2005============
2006
2007Sets PLCA RS parameters.
2008
2009Request contents:
2010
2011  ======================================  ======  =============================
2012  ``ETHTOOL_A_PLCA_HEADER``               nested  request header
2013  ``ETHTOOL_A_PLCA_ENABLED``              u8      PLCA Admin State
2014  ``ETHTOOL_A_PLCA_NODE_ID``              u8      PLCA unique local node ID
2015  ``ETHTOOL_A_PLCA_NODE_CNT``             u8      Number of PLCA nodes on the
2016                                                  network, including the
2017                                                  coordinator
2018  ``ETHTOOL_A_PLCA_TO_TMR``               u8      Transmit Opportunity Timer
2019                                                  value in bit-times (BT)
2020  ``ETHTOOL_A_PLCA_BURST_CNT``            u8      Number of additional packets
2021                                                  the node is allowed to send
2022                                                  within a single TO
2023  ``ETHTOOL_A_PLCA_BURST_TMR``            u8      Time to wait for the MAC to
2024                                                  transmit a new frame before
2025                                                  terminating the burst
2026  ======================================  ======  =============================
2027
2028For a description of each attribute, see ``PLCA_GET_CFG``.
2029
2030PLCA_GET_STATUS
2031===============
2032
2033Gets PLCA RS status information.
2034
2035Request contents:
2036
2037  =====================================  ======  ==========================
2038  ``ETHTOOL_A_PLCA_HEADER``              nested  request header
2039  =====================================  ======  ==========================
2040
2041Kernel response contents:
2042
2043  ======================================  ======  =============================
2044  ``ETHTOOL_A_PLCA_HEADER``               nested  reply header
2045  ``ETHTOOL_A_PLCA_STATUS``               u8      PLCA RS operational status
2046  ======================================  ======  =============================
2047
2048When set, the ``ETHTOOL_A_PLCA_STATUS`` attribute indicates whether the node is
2049detecting the presence of the BEACON on the network. This flag is
2050corresponding to ``IEEE 802.3cg-2019`` 30.16.1.1.2 aPLCAStatus.
2051
2052MM_GET
2053======
2054
2055Retrieve 802.3 MAC Merge parameters.
2056
2057Request contents:
2058
2059  ====================================  ======  ==========================
2060  ``ETHTOOL_A_MM_HEADER``               nested  request header
2061  ====================================  ======  ==========================
2062
2063Kernel response contents:
2064
2065  =================================  ======  ===================================
2066  ``ETHTOOL_A_MM_HEADER``            nested  request header
2067  ``ETHTOOL_A_MM_PMAC_ENABLED``      bool    set if RX of preemptible and SMD-V
2068                                             frames is enabled
2069  ``ETHTOOL_A_MM_TX_ENABLED``        bool    set if TX of preemptible frames is
2070                                             administratively enabled (might be
2071                                             inactive if verification failed)
2072  ``ETHTOOL_A_MM_TX_ACTIVE``         bool    set if TX of preemptible frames is
2073                                             operationally enabled
2074  ``ETHTOOL_A_MM_TX_MIN_FRAG_SIZE``  u32     minimum size of transmitted
2075                                             non-final fragments, in octets
2076  ``ETHTOOL_A_MM_RX_MIN_FRAG_SIZE``  u32     minimum size of received non-final
2077                                             fragments, in octets
2078  ``ETHTOOL_A_MM_VERIFY_ENABLED``    bool    set if TX of SMD-V frames is
2079                                             administratively enabled
2080  ``ETHTOOL_A_MM_VERIFY_STATUS``     u8      state of the verification function
2081  ``ETHTOOL_A_MM_VERIFY_TIME``       u32     delay between verification attempts
2082  ``ETHTOOL_A_MM_MAX_VERIFY_TIME```  u32     maximum verification interval
2083                                             supported by device
2084  ``ETHTOOL_A_MM_STATS``             nested  IEEE 802.3-2018 subclause 30.14.1
2085                                             oMACMergeEntity statistics counters
2086  =================================  ======  ===================================
2087
2088The attributes are populated by the device driver through the following
2089structure:
2090
2091.. kernel-doc:: include/linux/ethtool.h
2092    :identifiers: ethtool_mm_state
2093
2094The ``ETHTOOL_A_MM_VERIFY_STATUS`` will report one of the values from
2095
2096.. kernel-doc:: include/uapi/linux/ethtool.h
2097    :identifiers: ethtool_mm_verify_status
2098
2099If ``ETHTOOL_A_MM_VERIFY_ENABLED`` was passed as false in the ``MM_SET``
2100command, ``ETHTOOL_A_MM_VERIFY_STATUS`` will report either
2101``ETHTOOL_MM_VERIFY_STATUS_INITIAL`` or ``ETHTOOL_MM_VERIFY_STATUS_DISABLED``,
2102otherwise it should report one of the other states.
2103
2104It is recommended that drivers start with the pMAC disabled, and enable it upon
2105user space request. It is also recommended that user space does not depend upon
2106the default values from ``ETHTOOL_MSG_MM_GET`` requests.
2107
2108``ETHTOOL_A_MM_STATS`` are reported if ``ETHTOOL_FLAG_STATS`` was set in
2109``ETHTOOL_A_HEADER_FLAGS``. The attribute will be empty if driver did not
2110report any statistics. Drivers fill in the statistics in the following
2111structure:
2112
2113.. kernel-doc:: include/linux/ethtool.h
2114    :identifiers: ethtool_mm_stats
2115
2116MM_SET
2117======
2118
2119Modifies the configuration of the 802.3 MAC Merge layer.
2120
2121Request contents:
2122
2123  =================================  ======  ==========================
2124  ``ETHTOOL_A_MM_VERIFY_TIME``       u32     see MM_GET description
2125  ``ETHTOOL_A_MM_VERIFY_ENABLED``    bool    see MM_GET description
2126  ``ETHTOOL_A_MM_TX_ENABLED``        bool    see MM_GET description
2127  ``ETHTOOL_A_MM_PMAC_ENABLED``      bool    see MM_GET description
2128  ``ETHTOOL_A_MM_TX_MIN_FRAG_SIZE``  u32     see MM_GET description
2129  =================================  ======  ==========================
2130
2131The attributes are propagated to the driver through the following structure:
2132
2133.. kernel-doc:: include/linux/ethtool.h
2134    :identifiers: ethtool_mm_cfg
2135
2136MODULE_FW_FLASH_ACT
2137===================
2138
2139Flashes transceiver module firmware.
2140
2141Request contents:
2142
2143  =======================================  ======  ===========================
2144  ``ETHTOOL_A_MODULE_FW_FLASH_HEADER``     nested  request header
2145  ``ETHTOOL_A_MODULE_FW_FLASH_FILE_NAME``  string  firmware image file name
2146  ``ETHTOOL_A_MODULE_FW_FLASH_PASSWORD``   u32     transceiver module password
2147  =======================================  ======  ===========================
2148
2149The firmware update process consists of three logical steps:
2150
21511. Downloading a firmware image to the transceiver module and validating it.
21522. Running the firmware image.
21533. Committing the firmware image so that it is run upon reset.
2154
2155When flash command is given, those three steps are taken in that order.
2156
2157This message merely schedules the update process and returns immediately
2158without blocking. The process then runs asynchronously.
2159Since it can take several minutes to complete, during the update process
2160notifications are emitted from the kernel to user space updating it about
2161the status and progress.
2162
2163The ``ETHTOOL_A_MODULE_FW_FLASH_FILE_NAME`` attribute encodes the firmware
2164image file name. The firmware image is downloaded to the transceiver module,
2165validated, run and committed.
2166
2167The optional ``ETHTOOL_A_MODULE_FW_FLASH_PASSWORD`` attribute encodes a password
2168that might be required as part of the transceiver module firmware update
2169process.
2170
2171The firmware update process can take several minutes to complete. Therefore,
2172during the update process notifications are emitted from the kernel to user
2173space updating it about the status and progress.
2174
2175
2176
2177Notification contents:
2178
2179 +---------------------------------------------------+--------+----------------+
2180 | ``ETHTOOL_A_MODULE_FW_FLASH_HEADER``              | nested | reply header   |
2181 +---------------------------------------------------+--------+----------------+
2182 | ``ETHTOOL_A_MODULE_FW_FLASH_STATUS``              | u32    | status         |
2183 +---------------------------------------------------+--------+----------------+
2184 | ``ETHTOOL_A_MODULE_FW_FLASH_STATUS_MSG``          | string | status message |
2185 +---------------------------------------------------+--------+----------------+
2186 | ``ETHTOOL_A_MODULE_FW_FLASH_DONE``                | uint   | progress       |
2187 +---------------------------------------------------+--------+----------------+
2188 | ``ETHTOOL_A_MODULE_FW_FLASH_TOTAL``               | uint   | total          |
2189 +---------------------------------------------------+--------+----------------+
2190
2191The ``ETHTOOL_A_MODULE_FW_FLASH_STATUS`` attribute encodes the current status
2192of the firmware update process. Possible values are:
2193
2194.. kernel-doc:: include/uapi/linux/ethtool.h
2195    :identifiers: ethtool_module_fw_flash_status
2196
2197The ``ETHTOOL_A_MODULE_FW_FLASH_STATUS_MSG`` attribute encodes a status message
2198string.
2199
2200The ``ETHTOOL_A_MODULE_FW_FLASH_DONE`` and ``ETHTOOL_A_MODULE_FW_FLASH_TOTAL``
2201attributes encode the completed and total amount of work, respectively.
2202
2203PHY_GET
2204=======
2205
2206Retrieve information about a given Ethernet PHY sitting on the link. The DO
2207operation returns all available information about dev->phydev. User can also
2208specify a PHY_INDEX, in which case the DO request returns information about that
2209specific PHY.
2210
2211As there can be more than one PHY, the DUMP operation can be used to list the PHYs
2212present on a given interface, by passing an interface index or name in
2213the dump request.
2214
2215For more information, refer to :ref:`phy_link_topology`
2216
2217Request contents:
2218
2219  ====================================  ======  ==========================
2220  ``ETHTOOL_A_PHY_HEADER``              nested  request header
2221  ====================================  ======  ==========================
2222
2223Kernel response contents:
2224
2225  ===================================== ======  ===============================
2226  ``ETHTOOL_A_PHY_HEADER``              nested  request header
2227  ``ETHTOOL_A_PHY_INDEX``               u32     the phy's unique index, that can
2228                                                be used for phy-specific
2229                                                requests
2230  ``ETHTOOL_A_PHY_DRVNAME``             string  the phy driver name
2231  ``ETHTOOL_A_PHY_NAME``                string  the phy device name
2232  ``ETHTOOL_A_PHY_UPSTREAM_TYPE``       u32     the type of device this phy is
2233                                                connected to
2234  ``ETHTOOL_A_PHY_UPSTREAM_INDEX``      u32     the PHY index of the upstream
2235                                                PHY
2236  ``ETHTOOL_A_PHY_UPSTREAM_SFP_NAME``   string  if this PHY is connected to
2237                                                its parent PHY through an SFP
2238                                                bus, the name of this sfp bus
2239  ``ETHTOOL_A_PHY_DOWNSTREAM_SFP_NAME`` string  if the phy controls an sfp bus,
2240                                                the name of the sfp bus
2241  ===================================== ======  ===============================
2242
2243When ``ETHTOOL_A_PHY_UPSTREAM_TYPE`` is PHY_UPSTREAM_PHY, the PHY's parent is
2244another PHY.
2245
2246Request translation
2247===================
2248
2249The following table maps ioctl commands to netlink commands providing their
2250functionality. Entries with "n/a" in right column are commands which do not
2251have their netlink replacement yet. Entries which "n/a" in the left column
2252are netlink only.
2253
2254  =================================== =====================================
2255  ioctl command                       netlink command
2256  =================================== =====================================
2257  ``ETHTOOL_GSET``                    ``ETHTOOL_MSG_LINKINFO_GET``
2258                                      ``ETHTOOL_MSG_LINKMODES_GET``
2259  ``ETHTOOL_SSET``                    ``ETHTOOL_MSG_LINKINFO_SET``
2260                                      ``ETHTOOL_MSG_LINKMODES_SET``
2261  ``ETHTOOL_GDRVINFO``                n/a
2262  ``ETHTOOL_GREGS``                   n/a
2263  ``ETHTOOL_GWOL``                    ``ETHTOOL_MSG_WOL_GET``
2264  ``ETHTOOL_SWOL``                    ``ETHTOOL_MSG_WOL_SET``
2265  ``ETHTOOL_GMSGLVL``                 ``ETHTOOL_MSG_DEBUG_GET``
2266  ``ETHTOOL_SMSGLVL``                 ``ETHTOOL_MSG_DEBUG_SET``
2267  ``ETHTOOL_NWAY_RST``                n/a
2268  ``ETHTOOL_GLINK``                   ``ETHTOOL_MSG_LINKSTATE_GET``
2269  ``ETHTOOL_GEEPROM``                 n/a
2270  ``ETHTOOL_SEEPROM``                 n/a
2271  ``ETHTOOL_GCOALESCE``               ``ETHTOOL_MSG_COALESCE_GET``
2272  ``ETHTOOL_SCOALESCE``               ``ETHTOOL_MSG_COALESCE_SET``
2273  ``ETHTOOL_GRINGPARAM``              ``ETHTOOL_MSG_RINGS_GET``
2274  ``ETHTOOL_SRINGPARAM``              ``ETHTOOL_MSG_RINGS_SET``
2275  ``ETHTOOL_GPAUSEPARAM``             ``ETHTOOL_MSG_PAUSE_GET``
2276  ``ETHTOOL_SPAUSEPARAM``             ``ETHTOOL_MSG_PAUSE_SET``
2277  ``ETHTOOL_GRXCSUM``                 ``ETHTOOL_MSG_FEATURES_GET``
2278  ``ETHTOOL_SRXCSUM``                 ``ETHTOOL_MSG_FEATURES_SET``
2279  ``ETHTOOL_GTXCSUM``                 ``ETHTOOL_MSG_FEATURES_GET``
2280  ``ETHTOOL_STXCSUM``                 ``ETHTOOL_MSG_FEATURES_SET``
2281  ``ETHTOOL_GSG``                     ``ETHTOOL_MSG_FEATURES_GET``
2282  ``ETHTOOL_SSG``                     ``ETHTOOL_MSG_FEATURES_SET``
2283  ``ETHTOOL_TEST``                    n/a
2284  ``ETHTOOL_GSTRINGS``                ``ETHTOOL_MSG_STRSET_GET``
2285  ``ETHTOOL_PHYS_ID``                 n/a
2286  ``ETHTOOL_GSTATS``                  n/a
2287  ``ETHTOOL_GTSO``                    ``ETHTOOL_MSG_FEATURES_GET``
2288  ``ETHTOOL_STSO``                    ``ETHTOOL_MSG_FEATURES_SET``
2289  ``ETHTOOL_GPERMADDR``               rtnetlink ``RTM_GETLINK``
2290  ``ETHTOOL_GUFO``                    ``ETHTOOL_MSG_FEATURES_GET``
2291  ``ETHTOOL_SUFO``                    ``ETHTOOL_MSG_FEATURES_SET``
2292  ``ETHTOOL_GGSO``                    ``ETHTOOL_MSG_FEATURES_GET``
2293  ``ETHTOOL_SGSO``                    ``ETHTOOL_MSG_FEATURES_SET``
2294  ``ETHTOOL_GFLAGS``                  ``ETHTOOL_MSG_FEATURES_GET``
2295  ``ETHTOOL_SFLAGS``                  ``ETHTOOL_MSG_FEATURES_SET``
2296  ``ETHTOOL_GPFLAGS``                 ``ETHTOOL_MSG_PRIVFLAGS_GET``
2297  ``ETHTOOL_SPFLAGS``                 ``ETHTOOL_MSG_PRIVFLAGS_SET``
2298  ``ETHTOOL_GRXFH``                   n/a
2299  ``ETHTOOL_SRXFH``                   n/a
2300  ``ETHTOOL_GGRO``                    ``ETHTOOL_MSG_FEATURES_GET``
2301  ``ETHTOOL_SGRO``                    ``ETHTOOL_MSG_FEATURES_SET``
2302  ``ETHTOOL_GRXRINGS``                n/a
2303  ``ETHTOOL_GRXCLSRLCNT``             n/a
2304  ``ETHTOOL_GRXCLSRULE``              n/a
2305  ``ETHTOOL_GRXCLSRLALL``             n/a
2306  ``ETHTOOL_SRXCLSRLDEL``             n/a
2307  ``ETHTOOL_SRXCLSRLINS``             n/a
2308  ``ETHTOOL_FLASHDEV``                n/a
2309  ``ETHTOOL_RESET``                   n/a
2310  ``ETHTOOL_SRXNTUPLE``               n/a
2311  ``ETHTOOL_GRXNTUPLE``               n/a
2312  ``ETHTOOL_GSSET_INFO``              ``ETHTOOL_MSG_STRSET_GET``
2313  ``ETHTOOL_GRXFHINDIR``              n/a
2314  ``ETHTOOL_SRXFHINDIR``              n/a
2315  ``ETHTOOL_GFEATURES``               ``ETHTOOL_MSG_FEATURES_GET``
2316  ``ETHTOOL_SFEATURES``               ``ETHTOOL_MSG_FEATURES_SET``
2317  ``ETHTOOL_GCHANNELS``               ``ETHTOOL_MSG_CHANNELS_GET``
2318  ``ETHTOOL_SCHANNELS``               ``ETHTOOL_MSG_CHANNELS_SET``
2319  ``ETHTOOL_SET_DUMP``                n/a
2320  ``ETHTOOL_GET_DUMP_FLAG``           n/a
2321  ``ETHTOOL_GET_DUMP_DATA``           n/a
2322  ``ETHTOOL_GET_TS_INFO``             ``ETHTOOL_MSG_TSINFO_GET``
2323  ``ETHTOOL_GMODULEINFO``             ``ETHTOOL_MSG_MODULE_EEPROM_GET``
2324  ``ETHTOOL_GMODULEEEPROM``           ``ETHTOOL_MSG_MODULE_EEPROM_GET``
2325  ``ETHTOOL_GEEE``                    ``ETHTOOL_MSG_EEE_GET``
2326  ``ETHTOOL_SEEE``                    ``ETHTOOL_MSG_EEE_SET``
2327  ``ETHTOOL_GRSSH``                   ``ETHTOOL_MSG_RSS_GET``
2328  ``ETHTOOL_SRSSH``                   n/a
2329  ``ETHTOOL_GTUNABLE``                n/a
2330  ``ETHTOOL_STUNABLE``                n/a
2331  ``ETHTOOL_GPHYSTATS``               n/a
2332  ``ETHTOOL_PERQUEUE``                n/a
2333  ``ETHTOOL_GLINKSETTINGS``           ``ETHTOOL_MSG_LINKINFO_GET``
2334                                      ``ETHTOOL_MSG_LINKMODES_GET``
2335  ``ETHTOOL_SLINKSETTINGS``           ``ETHTOOL_MSG_LINKINFO_SET``
2336                                      ``ETHTOOL_MSG_LINKMODES_SET``
2337  ``ETHTOOL_PHY_GTUNABLE``            n/a
2338  ``ETHTOOL_PHY_STUNABLE``            n/a
2339  ``ETHTOOL_GFECPARAM``               ``ETHTOOL_MSG_FEC_GET``
2340  ``ETHTOOL_SFECPARAM``               ``ETHTOOL_MSG_FEC_SET``
2341  n/a                                 ``ETHTOOL_MSG_CABLE_TEST_ACT``
2342  n/a                                 ``ETHTOOL_MSG_CABLE_TEST_TDR_ACT``
2343  n/a                                 ``ETHTOOL_MSG_TUNNEL_INFO_GET``
2344  n/a                                 ``ETHTOOL_MSG_PHC_VCLOCKS_GET``
2345  n/a                                 ``ETHTOOL_MSG_MODULE_GET``
2346  n/a                                 ``ETHTOOL_MSG_MODULE_SET``
2347  n/a                                 ``ETHTOOL_MSG_PLCA_GET_CFG``
2348  n/a                                 ``ETHTOOL_MSG_PLCA_SET_CFG``
2349  n/a                                 ``ETHTOOL_MSG_PLCA_GET_STATUS``
2350  n/a                                 ``ETHTOOL_MSG_MM_GET``
2351  n/a                                 ``ETHTOOL_MSG_MM_SET``
2352  n/a                                 ``ETHTOOL_MSG_MODULE_FW_FLASH_ACT``
2353  n/a                                 ``ETHTOOL_MSG_PHY_GET``
2354  =================================== =====================================