xref: /openbmc/linux/Documentation/networking/ethtool-netlink.rst (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
12b4a8990SMichal Kubecek=============================
22b4a8990SMichal KubecekNetlink interface for ethtool
32b4a8990SMichal Kubecek=============================
42b4a8990SMichal Kubecek
52b4a8990SMichal Kubecek
62b4a8990SMichal KubecekBasic information
72b4a8990SMichal Kubecek=================
82b4a8990SMichal Kubecek
92b4a8990SMichal KubecekNetlink interface for ethtool uses generic netlink family ``ethtool``
102b4a8990SMichal Kubecek(userspace application should use macros ``ETHTOOL_GENL_NAME`` and
112b4a8990SMichal Kubecek``ETHTOOL_GENL_VERSION`` defined in ``<linux/ethtool_netlink.h>`` uapi
122b4a8990SMichal Kubecekheader). This family does not use a specific header, all information in
132b4a8990SMichal Kubecekrequests and replies is passed using netlink attributes.
142b4a8990SMichal Kubecek
152b4a8990SMichal KubecekThe ethtool netlink interface uses extended ACK for error and warning
162b4a8990SMichal Kubecekreporting, userspace application developers are encouraged to make these
172b4a8990SMichal Kubecekmessages available to user in a suitable way.
182b4a8990SMichal Kubecek
192b4a8990SMichal KubecekRequests can be divided into three categories: "get" (retrieving information),
202b4a8990SMichal Kubecek"set" (setting parameters) and "action" (invoking an action).
212b4a8990SMichal Kubecek
222b4a8990SMichal KubecekAll "set" and "action" type requests require admin privileges
232b4a8990SMichal Kubecek(``CAP_NET_ADMIN`` in the namespace). Most "get" type requests are allowed for
242b4a8990SMichal Kubecekanyone but there are exceptions (where the response contains sensitive
252b4a8990SMichal Kubecekinformation). In some cases, the request as such is allowed for anyone but
262b4a8990SMichal Kubecekunprivileged users have attributes with sensitive information (e.g.
272b4a8990SMichal Kubecekwake-on-lan password) omitted.
282b4a8990SMichal Kubecek
292b4a8990SMichal Kubecek
302b4a8990SMichal KubecekConventions
312b4a8990SMichal Kubecek===========
322b4a8990SMichal Kubecek
332b4a8990SMichal KubecekAttributes which represent a boolean value usually use NLA_U8 type so that we
342b4a8990SMichal Kubecekcan distinguish three states: "on", "off" and "not present" (meaning the
352b4a8990SMichal Kubecekinformation is not available in "get" requests or value is not to be changed
362b4a8990SMichal Kubecekin "set" requests). For these attributes, the "true" value should be passed as
372b4a8990SMichal Kubeceknumber 1 but any non-zero value should be understood as "true" by recipient.
382b4a8990SMichal KubecekIn the tables below, "bool" denotes NLA_U8 attributes interpreted in this way.
392b4a8990SMichal Kubecek
402b4a8990SMichal KubecekIn the message structure descriptions below, if an attribute name is suffixed
412b4a8990SMichal Kubecekwith "+", parent nest can contain multiple attributes of the same type. This
422b4a8990SMichal Kubecekimplements an array of entries.
432b4a8990SMichal Kubecek
44353407d9SIdo SchimmelAttributes that need to be filled-in by device drivers and that are dumped to
45353407d9SIdo Schimmeluser space based on whether they are valid or not should not use zero as a
46353407d9SIdo Schimmelvalid value. This avoids the need to explicitly signal the validity of the
47353407d9SIdo Schimmelattribute in the device driver API.
48353407d9SIdo Schimmel
492b4a8990SMichal Kubecek
502b4a8990SMichal KubecekRequest header
512b4a8990SMichal Kubecek==============
522b4a8990SMichal Kubecek
532b4a8990SMichal KubecekEach request or reply message contains a nested attribute with common header.
542b4a8990SMichal KubecekStructure of this header is
552b4a8990SMichal Kubecek
562b4a8990SMichal Kubecek  ==============================  ======  =============================
572b4a8990SMichal Kubecek  ``ETHTOOL_A_HEADER_DEV_INDEX``  u32     device ifindex
582b4a8990SMichal Kubecek  ``ETHTOOL_A_HEADER_DEV_NAME``   string  device name
592b4a8990SMichal Kubecek  ``ETHTOOL_A_HEADER_FLAGS``      u32     flags common for all requests
602b4a8990SMichal Kubecek  ==============================  ======  =============================
612b4a8990SMichal Kubecek
622b4a8990SMichal Kubecek``ETHTOOL_A_HEADER_DEV_INDEX`` and ``ETHTOOL_A_HEADER_DEV_NAME`` identify the
632b4a8990SMichal Kubecekdevice message relates to. One of them is sufficient in requests, if both are
642b4a8990SMichal Kubecekused, they must identify the same device. Some requests, e.g. global string
652b4a8990SMichal Kubeceksets, do not require device identification. Most ``GET`` requests also allow
662b4a8990SMichal Kubecekdump requests without device identification to query the same information for
672b4a8990SMichal Kubecekall devices providing it (each device in a separate message).
682b4a8990SMichal Kubecek
692b4a8990SMichal Kubecek``ETHTOOL_A_HEADER_FLAGS`` is a bitmap of request flags common for all request
702b4a8990SMichal Kubecektypes. The interpretation of these flags is the same for all request types but
712b4a8990SMichal Kubecekthe flags may not apply to requests. Recognized flags are:
722b4a8990SMichal Kubecek
732b4a8990SMichal Kubecek  =================================  ===================================
742b4a8990SMichal Kubecek  ``ETHTOOL_FLAG_COMPACT_BITSETS``   use compact format bitsets in reply
752b4a8990SMichal Kubecek  ``ETHTOOL_FLAG_OMIT_REPLY``        omit optional reply (_SET and _ACT)
769a27a330SJakub Kicinski  ``ETHTOOL_FLAG_STATS``             include optional device statistics
772b4a8990SMichal Kubecek  =================================  ===================================
782b4a8990SMichal Kubecek
792b4a8990SMichal KubecekNew request flags should follow the general idea that if the flag is not set,
802b4a8990SMichal Kubecekthe behaviour is backward compatible, i.e. requests from old clients not aware
812b4a8990SMichal Kubecekof the flag should be interpreted the way the client expects. A client must
822b4a8990SMichal Kubeceknot set flags it does not understand.
832b4a8990SMichal Kubecek
842b4a8990SMichal Kubecek
8510b518d4SMichal KubecekBit sets
8610b518d4SMichal Kubecek========
8710b518d4SMichal Kubecek
8810b518d4SMichal KubecekFor short bitmaps of (reasonably) fixed length, standard ``NLA_BITFIELD32``
8910b518d4SMichal Kubecektype is used. For arbitrary length bitmaps, ethtool netlink uses a nested
9010b518d4SMichal Kubecekattribute with contents of one of two forms: compact (two binary bitmaps
9110b518d4SMichal Kubecekrepresenting bit values and mask of affected bits) and bit-by-bit (list of
9210b518d4SMichal Kubecekbits identified by either index or name).
9310b518d4SMichal Kubecek
9410b518d4SMichal KubecekVerbose (bit-by-bit) bitsets allow sending symbolic names for bits together
9510b518d4SMichal Kubecekwith their values which saves a round trip (when the bitset is passed in a
9610b518d4SMichal Kubecekrequest) or at least a second request (when the bitset is in a reply). This is
9710b518d4SMichal Kubecekuseful for one shot applications like traditional ethtool command. On the
9810b518d4SMichal Kubecekother hand, long running applications like ethtool monitor (displaying
9910b518d4SMichal Kubeceknotifications) or network management daemons may prefer fetching the names
10010b518d4SMichal Kubecekonly once and using compact form to save message size. Notifications from
10110b518d4SMichal Kubecekethtool netlink interface always use compact form for bitsets.
10210b518d4SMichal Kubecek
10310b518d4SMichal KubecekA bitset can represent either a value/mask pair (``ETHTOOL_A_BITSET_NOMASK``
10410b518d4SMichal Kubeceknot set) or a single bitmap (``ETHTOOL_A_BITSET_NOMASK`` set). In requests
10510b518d4SMichal Kubecekmodifying a bitmap, the former changes the bit set in mask to values set in
10610b518d4SMichal Kubecekvalue and preserves the rest; the latter sets the bits set in the bitmap and
10710b518d4SMichal Kubecekclears the rest.
10810b518d4SMichal Kubecek
109a266ef69SRandy DunlapCompact form: nested (bitset) attribute contents:
11010b518d4SMichal Kubecek
11110b518d4SMichal Kubecek  ============================  ======  ============================
11210b518d4SMichal Kubecek  ``ETHTOOL_A_BITSET_NOMASK``   flag    no mask, only a list
11310b518d4SMichal Kubecek  ``ETHTOOL_A_BITSET_SIZE``     u32     number of significant bits
11410b518d4SMichal Kubecek  ``ETHTOOL_A_BITSET_VALUE``    binary  bitmap of bit values
11510b518d4SMichal Kubecek  ``ETHTOOL_A_BITSET_MASK``     binary  bitmap of valid bits
11610b518d4SMichal Kubecek  ============================  ======  ============================
11710b518d4SMichal Kubecek
11810b518d4SMichal KubecekValue and mask must have length at least ``ETHTOOL_A_BITSET_SIZE`` bits
11910b518d4SMichal Kubecekrounded up to a multiple of 32 bits. They consist of 32-bit words in host byte
12010b518d4SMichal Kubecekorder, words ordered from least significant to most significant (i.e. the same
12110b518d4SMichal Kubecekway as bitmaps are passed with ioctl interface).
12210b518d4SMichal Kubecek
12310b518d4SMichal KubecekFor compact form, ``ETHTOOL_A_BITSET_SIZE`` and ``ETHTOOL_A_BITSET_VALUE`` are
12410b518d4SMichal Kubecekmandatory. ``ETHTOOL_A_BITSET_MASK`` attribute is mandatory if
12510b518d4SMichal Kubecek``ETHTOOL_A_BITSET_NOMASK`` is not set (bitset represents a value/mask pair);
12610b518d4SMichal Kubecekif ``ETHTOOL_A_BITSET_NOMASK`` is not set, ``ETHTOOL_A_BITSET_MASK`` is not
12710b518d4SMichal Kubecekallowed (bitset represents a single bitmap.
12810b518d4SMichal Kubecek
12910b518d4SMichal KubecekKernel bit set length may differ from userspace length if older application is
13010b518d4SMichal Kubecekused on newer kernel or vice versa. If userspace bitmap is longer, an error is
13110b518d4SMichal Kubecekissued only if the request actually tries to set values of some bits not
13210b518d4SMichal Kubecekrecognized by kernel.
13310b518d4SMichal Kubecek
13410b518d4SMichal KubecekBit-by-bit form: nested (bitset) attribute contents:
13510b518d4SMichal Kubecek
13610b518d4SMichal Kubecek +------------------------------------+--------+-----------------------------+
13710b518d4SMichal Kubecek | ``ETHTOOL_A_BITSET_NOMASK``        | flag   | no mask, only a list        |
13810b518d4SMichal Kubecek +------------------------------------+--------+-----------------------------+
13910b518d4SMichal Kubecek | ``ETHTOOL_A_BITSET_SIZE``          | u32    | number of significant bits  |
14010b518d4SMichal Kubecek +------------------------------------+--------+-----------------------------+
14110b518d4SMichal Kubecek | ``ETHTOOL_A_BITSET_BITS``          | nested | array of bits               |
14210b518d4SMichal Kubecek +-+----------------------------------+--------+-----------------------------+
14310b518d4SMichal Kubecek | | ``ETHTOOL_A_BITSET_BITS_BIT+``   | nested | one bit                     |
14410b518d4SMichal Kubecek +-+-+--------------------------------+--------+-----------------------------+
14510b518d4SMichal Kubecek | | | ``ETHTOOL_A_BITSET_BIT_INDEX`` | u32    | bit index (0 for LSB)       |
14610b518d4SMichal Kubecek +-+-+--------------------------------+--------+-----------------------------+
14710b518d4SMichal Kubecek | | | ``ETHTOOL_A_BITSET_BIT_NAME``  | string | bit name                    |
14810b518d4SMichal Kubecek +-+-+--------------------------------+--------+-----------------------------+
14910b518d4SMichal Kubecek | | | ``ETHTOOL_A_BITSET_BIT_VALUE`` | flag   | present if bit is set       |
15010b518d4SMichal Kubecek +-+-+--------------------------------+--------+-----------------------------+
15110b518d4SMichal Kubecek
15210b518d4SMichal KubecekBit size is optional for bit-by-bit form. ``ETHTOOL_A_BITSET_BITS`` nest can
15310b518d4SMichal Kubecekonly contain ``ETHTOOL_A_BITSET_BITS_BIT`` attributes but there can be an
15410b518d4SMichal Kubecekarbitrary number of them.  A bit may be identified by its index or by its
15510b518d4SMichal Kubecekname. When used in requests, listed bits are set to 0 or 1 according to
15610b518d4SMichal Kubecek``ETHTOOL_A_BITSET_BIT_VALUE``, the rest is preserved. A request fails if
15710b518d4SMichal Kubecekindex exceeds kernel bit length or if name is not recognized.
15810b518d4SMichal Kubecek
15910b518d4SMichal KubecekWhen ``ETHTOOL_A_BITSET_NOMASK`` flag is present, bitset is interpreted as
16010b518d4SMichal Kubeceka simple bitmap. ``ETHTOOL_A_BITSET_BIT_VALUE`` attributes are not used in
16110b518d4SMichal Kubeceksuch case. Such bitset represents a bitmap with listed bits set and the rest
16210b518d4SMichal Kubecekzero.
16310b518d4SMichal Kubecek
16410b518d4SMichal KubecekIn requests, application can use either form. Form used by kernel in reply is
16510b518d4SMichal Kubecekdetermined by ``ETHTOOL_FLAG_COMPACT_BITSETS`` flag in flags field of request
16610b518d4SMichal Kubecekheader. Semantics of value and mask depends on the attribute.
16710b518d4SMichal Kubecek
16810b518d4SMichal Kubecek
1692b4a8990SMichal KubecekList of message types
1702b4a8990SMichal Kubecek=====================
1712b4a8990SMichal Kubecek
1722b4a8990SMichal KubecekAll constants identifying message types use ``ETHTOOL_CMD_`` prefix and suffix
1732b4a8990SMichal Kubecekaccording to message purpose:
1742b4a8990SMichal Kubecek
1752b4a8990SMichal Kubecek  ==============    ======================================
1762b4a8990SMichal Kubecek  ``_GET``          userspace request to retrieve data
1772b4a8990SMichal Kubecek  ``_SET``          userspace request to set data
1782b4a8990SMichal Kubecek  ``_ACT``          userspace request to perform an action
1792b4a8990SMichal Kubecek  ``_GET_REPLY``    kernel reply to a ``GET`` request
1802b4a8990SMichal Kubecek  ``_SET_REPLY``    kernel reply to a ``SET`` request
1812b4a8990SMichal Kubecek  ``_ACT_REPLY``    kernel reply to an ``ACT`` request
1822b4a8990SMichal Kubecek  ``_NTF``          kernel notification
1832b4a8990SMichal Kubecek  ==============    ======================================
1842b4a8990SMichal Kubecek
18571921690SMichal KubecekUserspace to kernel:
18671921690SMichal Kubecek
187353407d9SIdo Schimmel  ===================================== =================================
18871921690SMichal Kubecek  ``ETHTOOL_MSG_STRSET_GET``            get string set
189459e0b81SMichal Kubecek  ``ETHTOOL_MSG_LINKINFO_GET``          get link settings
190a53f3d41SMichal Kubecek  ``ETHTOOL_MSG_LINKINFO_SET``          set link settings
191f625aa9bSMichal Kubecek  ``ETHTOOL_MSG_LINKMODES_GET``         get link modes info
192bfbcfe20SMichal Kubecek  ``ETHTOOL_MSG_LINKMODES_SET``         set link modes info
1933d2b847fSMichal Kubecek  ``ETHTOOL_MSG_LINKSTATE_GET``         get link state
1946a94b8ccSMichal Kubecek  ``ETHTOOL_MSG_DEBUG_GET``             get debugging settings
195e54d04e3SMichal Kubecek  ``ETHTOOL_MSG_DEBUG_SET``             set debugging settings
19651ea22b0SMichal Kubecek  ``ETHTOOL_MSG_WOL_GET``               get wake-on-lan settings
1978d425b19SMichal Kubecek  ``ETHTOOL_MSG_WOL_SET``               set wake-on-lan settings
1980524399dSMichal Kubecek  ``ETHTOOL_MSG_FEATURES_GET``          get device features
1990980bfcdSMichal Kubecek  ``ETHTOOL_MSG_FEATURES_SET``          set device features
200e16c3386SMichal Kubecek  ``ETHTOOL_MSG_PRIVFLAGS_GET``         get private flags
201f265d799SMichal Kubecek  ``ETHTOOL_MSG_PRIVFLAGS_SET``         set private flags
202e4a1717bSMichal Kubecek  ``ETHTOOL_MSG_RINGS_GET``             get ring sizes
2032fc2929eSMichal Kubecek  ``ETHTOOL_MSG_RINGS_SET``             set ring sizes
2040c84979cSMichal Kubecek  ``ETHTOOL_MSG_CHANNELS_GET``          get channel counts
205e19c591eSMichal Kubecek  ``ETHTOOL_MSG_CHANNELS_SET``          set channel counts
20621727545SMichal Kubecek  ``ETHTOOL_MSG_COALESCE_GET``          get coalescing parameters
2079881418cSMichal Kubecek  ``ETHTOOL_MSG_COALESCE_SET``          set coalescing parameters
2087f59fb32SMichal Kubecek  ``ETHTOOL_MSG_PAUSE_GET``             get pause parameters
2093ab87993SMichal Kubecek  ``ETHTOOL_MSG_PAUSE_SET``             set pause parameters
210b7eeefe7SMichal Kubecek  ``ETHTOOL_MSG_EEE_GET``               get EEE settings
211fd77be7bSMichal Kubecek  ``ETHTOOL_MSG_EEE_SET``               set EEE settings
2125b071c59SMichal Kubecek  ``ETHTOOL_MSG_TSINFO_GET``		get timestamping info
21311ca3c42SAndrew Lunn  ``ETHTOOL_MSG_CABLE_TEST_ACT``        action start cable test
214a331172bSAndrew Lunn  ``ETHTOOL_MSG_CABLE_TEST_TDR_ACT``    action start raw TDR cable test
21519a83d36SMichal Kubecek  ``ETHTOOL_MSG_TUNNEL_INFO_GET``       get tunnel offload info
2161e5d1f69SJakub Kicinski  ``ETHTOOL_MSG_FEC_GET``               get FEC settings
2171e5d1f69SJakub Kicinski  ``ETHTOOL_MSG_FEC_SET``               set FEC settings
218e9377a91SJakub Kicinski  ``ETHTOOL_MSG_MODULE_EEPROM_GET``     read SFP module EEPROM
219ddc78b36SJakub Kicinski  ``ETHTOOL_MSG_STATS_GET``             get standard statistics
220c156174aSYangbo Lu  ``ETHTOOL_MSG_PHC_VCLOCKS_GET``       get PHC virtual clocks info
221353407d9SIdo Schimmel  ``ETHTOOL_MSG_MODULE_SET``            set transceiver module parameters
222353407d9SIdo Schimmel  ``ETHTOOL_MSG_MODULE_GET``            get transceiver module parameters
22318ff0bcdSOleksij Rempel  ``ETHTOOL_MSG_PSE_SET``               set PSE parameters
22418ff0bcdSOleksij Rempel  ``ETHTOOL_MSG_PSE_GET``               get PSE parameters
2257112a046SSudheer Mogilappagari  ``ETHTOOL_MSG_RSS_GET``               get RSS settings
22637000004SVladimir Oltean  ``ETHTOOL_MSG_MM_GET``                get MAC merge layer state
22737000004SVladimir Oltean  ``ETHTOOL_MSG_MM_SET``                set MAC merge layer parameters
228353407d9SIdo Schimmel  ===================================== =================================
22971921690SMichal Kubecek
23071921690SMichal KubecekKernel to userspace:
23171921690SMichal Kubecek
232e9377a91SJakub Kicinski  ======================================== =================================
23371921690SMichal Kubecek  ``ETHTOOL_MSG_STRSET_GET_REPLY``         string set contents
234459e0b81SMichal Kubecek  ``ETHTOOL_MSG_LINKINFO_GET_REPLY``       link settings
23573286734SMichal Kubecek  ``ETHTOOL_MSG_LINKINFO_NTF``             link settings notification
236f625aa9bSMichal Kubecek  ``ETHTOOL_MSG_LINKMODES_GET_REPLY``      link modes info
2371b1b1847SMichal Kubecek  ``ETHTOOL_MSG_LINKMODES_NTF``            link modes notification
2383d2b847fSMichal Kubecek  ``ETHTOOL_MSG_LINKSTATE_GET_REPLY``      link state info
2396a94b8ccSMichal Kubecek  ``ETHTOOL_MSG_DEBUG_GET_REPLY``          debugging settings
2400bda7af3SMichal Kubecek  ``ETHTOOL_MSG_DEBUG_NTF``                debugging settings notification
24151ea22b0SMichal Kubecek  ``ETHTOOL_MSG_WOL_GET_REPLY``            wake-on-lan settings
24267bffa79SMichal Kubecek  ``ETHTOOL_MSG_WOL_NTF``                  wake-on-lan settings notification
2430524399dSMichal Kubecek  ``ETHTOOL_MSG_FEATURES_GET_REPLY``       device features
2440980bfcdSMichal Kubecek  ``ETHTOOL_MSG_FEATURES_SET_REPLY``       optional reply to FEATURES_SET
2459c6451efSMichal Kubecek  ``ETHTOOL_MSG_FEATURES_NTF``             netdev features notification
246e16c3386SMichal Kubecek  ``ETHTOOL_MSG_PRIVFLAGS_GET_REPLY``      private flags
247f265d799SMichal Kubecek  ``ETHTOOL_MSG_PRIVFLAGS_NTF``            private flags
248e4a1717bSMichal Kubecek  ``ETHTOOL_MSG_RINGS_GET_REPLY``          ring sizes
249bc9d1c99SMichal Kubecek  ``ETHTOOL_MSG_RINGS_NTF``                ring sizes
2500c84979cSMichal Kubecek  ``ETHTOOL_MSG_CHANNELS_GET_REPLY``       channel counts
251546379b9SMichal Kubecek  ``ETHTOOL_MSG_CHANNELS_NTF``             channel counts
25221727545SMichal Kubecek  ``ETHTOOL_MSG_COALESCE_GET_REPLY``       coalescing parameters
2530cf3eac8SMichal Kubecek  ``ETHTOOL_MSG_COALESCE_NTF``             coalescing parameters
2547f59fb32SMichal Kubecek  ``ETHTOOL_MSG_PAUSE_GET_REPLY``          pause parameters
255bf37faa3SMichal Kubecek  ``ETHTOOL_MSG_PAUSE_NTF``                pause parameters
256b7eeefe7SMichal Kubecek  ``ETHTOOL_MSG_EEE_GET_REPLY``            EEE settings
2576c5bc8feSMichal Kubecek  ``ETHTOOL_MSG_EEE_NTF``                  EEE settings
2585b071c59SMichal Kubecek  ``ETHTOOL_MSG_TSINFO_GET_REPLY``         timestamping info
259b28efb93SAndrew Lunn  ``ETHTOOL_MSG_CABLE_TEST_NTF``           Cable test results
260a331172bSAndrew Lunn  ``ETHTOOL_MSG_CABLE_TEST_TDR_NTF``       Cable test TDR results
26119a83d36SMichal Kubecek  ``ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY``    tunnel offload info
2621e5d1f69SJakub Kicinski  ``ETHTOOL_MSG_FEC_GET_REPLY``            FEC settings
2631e5d1f69SJakub Kicinski  ``ETHTOOL_MSG_FEC_NTF``                  FEC settings
264e9377a91SJakub Kicinski  ``ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY``  read SFP module EEPROM
265ddc78b36SJakub Kicinski  ``ETHTOOL_MSG_STATS_GET_REPLY``          standard statistics
266c156174aSYangbo Lu  ``ETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY``    PHC virtual clocks info
267353407d9SIdo Schimmel  ``ETHTOOL_MSG_MODULE_GET_REPLY``         transceiver module parameters
26818ff0bcdSOleksij Rempel  ``ETHTOOL_MSG_PSE_GET_REPLY``            PSE parameters
2697112a046SSudheer Mogilappagari  ``ETHTOOL_MSG_RSS_GET_REPLY``            RSS settings
27037000004SVladimir Oltean  ``ETHTOOL_MSG_MM_GET_REPLY``             MAC merge layer status
271e9377a91SJakub Kicinski  ======================================== =================================
27271921690SMichal Kubecek
2732b4a8990SMichal Kubecek``GET`` requests are sent by userspace applications to retrieve device
2742b4a8990SMichal Kubecekinformation. They usually do not contain any message specific attributes.
2752b4a8990SMichal KubecekKernel replies with corresponding "GET_REPLY" message. For most types, ``GET``
2762b4a8990SMichal Kubecekrequest with ``NLM_F_DUMP`` and no device identification can be used to query
2772b4a8990SMichal Kubecekthe information for all devices supporting the request.
2782b4a8990SMichal Kubecek
2792b4a8990SMichal KubecekIf the data can be also modified, corresponding ``SET`` message with the same
2802b4a8990SMichal Kubeceklayout as corresponding ``GET_REPLY`` is used to request changes. Only
2812b4a8990SMichal Kubecekattributes where a change is requested are included in such request (also, not
2822b4a8990SMichal Kubecekall attributes may be changed). Replies to most ``SET`` request consist only
2832b4a8990SMichal Kubecekof error code and extack; if kernel provides additional data, it is sent in
2842b4a8990SMichal Kubecekthe form of corresponding ``SET_REPLY`` message which can be suppressed by
2852b4a8990SMichal Kubeceksetting ``ETHTOOL_FLAG_OMIT_REPLY`` flag in request header.
2862b4a8990SMichal Kubecek
2872b4a8990SMichal KubecekData modification also triggers sending a ``NTF`` message with a notification.
2882b4a8990SMichal KubecekThese usually bear only a subset of attributes which was affected by the
2892b4a8990SMichal Kubecekchange. The same notification is issued if the data is modified using other
2902b4a8990SMichal Kubecekmeans (mostly ioctl ethtool interface). Unlike notifications from ethtool
2912b4a8990SMichal Kubeceknetlink code which are only sent if something actually changed, notifications
2922b4a8990SMichal Kubecektriggered by ioctl interface may be sent even if the request did not actually
2932b4a8990SMichal Kubecekchange any data.
2942b4a8990SMichal Kubecek
2952b4a8990SMichal Kubecek``ACT`` messages request kernel (driver) to perform a specific action. If some
2962b4a8990SMichal Kubecekinformation is reported by kernel (which can be suppressed by setting
2972b4a8990SMichal Kubecek``ETHTOOL_FLAG_OMIT_REPLY`` flag in request header), the reply takes form of
2982b4a8990SMichal Kubecekan ``ACT_REPLY`` message. Performing an action also triggers a notification
2992b4a8990SMichal Kubecek(``NTF`` message).
3002b4a8990SMichal Kubecek
3012b4a8990SMichal KubecekLater sections describe the format and semantics of these messages.
3022b4a8990SMichal Kubecek
3032b4a8990SMichal Kubecek
30471921690SMichal KubecekSTRSET_GET
30571921690SMichal Kubecek==========
30671921690SMichal Kubecek
30771921690SMichal KubecekRequests contents of a string set as provided by ioctl commands
30871921690SMichal Kubecek``ETHTOOL_GSSET_INFO`` and ``ETHTOOL_GSTRINGS.`` String sets are not user
30971921690SMichal Kubecekwriteable so that the corresponding ``STRSET_SET`` message is only used in
31071921690SMichal Kubecekkernel replies. There are two types of string sets: global (independent of
31171921690SMichal Kubeceka device, e.g. device feature names) and device specific (e.g. device private
31271921690SMichal Kubecekflags).
31371921690SMichal Kubecek
31471921690SMichal KubecekRequest contents:
31571921690SMichal Kubecek
31671921690SMichal Kubecek +---------------------------------------+--------+------------------------+
31771921690SMichal Kubecek | ``ETHTOOL_A_STRSET_HEADER``           | nested | request header         |
31871921690SMichal Kubecek +---------------------------------------+--------+------------------------+
31971921690SMichal Kubecek | ``ETHTOOL_A_STRSET_STRINGSETS``       | nested | string set to request  |
32071921690SMichal Kubecek +-+-------------------------------------+--------+------------------------+
32171921690SMichal Kubecek | | ``ETHTOOL_A_STRINGSETS_STRINGSET+`` | nested | one string set         |
32271921690SMichal Kubecek +-+-+-----------------------------------+--------+------------------------+
32371921690SMichal Kubecek | | | ``ETHTOOL_A_STRINGSET_ID``        | u32    | set id                 |
32471921690SMichal Kubecek +-+-+-----------------------------------+--------+------------------------+
32571921690SMichal Kubecek
32671921690SMichal KubecekKernel response contents:
32771921690SMichal Kubecek
32871921690SMichal Kubecek +---------------------------------------+--------+-----------------------+
32971921690SMichal Kubecek | ``ETHTOOL_A_STRSET_HEADER``           | nested | reply header          |
33071921690SMichal Kubecek +---------------------------------------+--------+-----------------------+
33171921690SMichal Kubecek | ``ETHTOOL_A_STRSET_STRINGSETS``       | nested | array of string sets  |
33271921690SMichal Kubecek +-+-------------------------------------+--------+-----------------------+
33371921690SMichal Kubecek | | ``ETHTOOL_A_STRINGSETS_STRINGSET+`` | nested | one string set        |
33471921690SMichal Kubecek +-+-+-----------------------------------+--------+-----------------------+
33571921690SMichal Kubecek | | | ``ETHTOOL_A_STRINGSET_ID``        | u32    | set id                |
33671921690SMichal Kubecek +-+-+-----------------------------------+--------+-----------------------+
33771921690SMichal Kubecek | | | ``ETHTOOL_A_STRINGSET_COUNT``     | u32    | number of strings     |
33871921690SMichal Kubecek +-+-+-----------------------------------+--------+-----------------------+
33971921690SMichal Kubecek | | | ``ETHTOOL_A_STRINGSET_STRINGS``   | nested | array of strings      |
34071921690SMichal Kubecek +-+-+-+---------------------------------+--------+-----------------------+
34171921690SMichal Kubecek | | | | ``ETHTOOL_A_STRINGS_STRING+``   | nested | one string            |
34271921690SMichal Kubecek +-+-+-+-+-------------------------------+--------+-----------------------+
34371921690SMichal Kubecek | | | | | ``ETHTOOL_A_STRING_INDEX``    | u32    | string index          |
34471921690SMichal Kubecek +-+-+-+-+-------------------------------+--------+-----------------------+
34571921690SMichal Kubecek | | | | | ``ETHTOOL_A_STRING_VALUE``    | string | string value          |
34671921690SMichal Kubecek +-+-+-+-+-------------------------------+--------+-----------------------+
34771921690SMichal Kubecek | ``ETHTOOL_A_STRSET_COUNTS_ONLY``      | flag   | return only counts    |
34871921690SMichal Kubecek +---------------------------------------+--------+-----------------------+
34971921690SMichal Kubecek
35071921690SMichal KubecekDevice identification in request header is optional. Depending on its presence
35171921690SMichal Kubeceka and ``NLM_F_DUMP`` flag, there are three type of ``STRSET_GET`` requests:
35271921690SMichal Kubecek
35371921690SMichal Kubecek - no ``NLM_F_DUMP,`` no device: get "global" stringsets
35471921690SMichal Kubecek - no ``NLM_F_DUMP``, with device: get string sets related to the device
35571921690SMichal Kubecek - ``NLM_F_DUMP``, no device: get device related string sets for all devices
35671921690SMichal Kubecek
35771921690SMichal KubecekIf there is no ``ETHTOOL_A_STRSET_STRINGSETS`` array, all string sets of
35871921690SMichal Kubecekrequested type are returned, otherwise only those specified in the request.
35971921690SMichal KubecekFlag ``ETHTOOL_A_STRSET_COUNTS_ONLY`` tells kernel to only return string
36071921690SMichal Kubecekcounts of the sets, not the actual strings.
36171921690SMichal Kubecek
36271921690SMichal Kubecek
363459e0b81SMichal KubecekLINKINFO_GET
364459e0b81SMichal Kubecek============
365459e0b81SMichal Kubecek
366459e0b81SMichal KubecekRequests link settings as provided by ``ETHTOOL_GLINKSETTINGS`` except for
367459e0b81SMichal Kubeceklink modes and autonegotiation related information. The request does not use
368459e0b81SMichal Kubecekany attributes.
369459e0b81SMichal Kubecek
370459e0b81SMichal KubecekRequest contents:
371459e0b81SMichal Kubecek
372459e0b81SMichal Kubecek  ====================================  ======  ==========================
373459e0b81SMichal Kubecek  ``ETHTOOL_A_LINKINFO_HEADER``         nested  request header
374459e0b81SMichal Kubecek  ====================================  ======  ==========================
375459e0b81SMichal Kubecek
376459e0b81SMichal KubecekKernel response contents:
377459e0b81SMichal Kubecek
378459e0b81SMichal Kubecek  ====================================  ======  ==========================
379459e0b81SMichal Kubecek  ``ETHTOOL_A_LINKINFO_HEADER``         nested  reply header
380459e0b81SMichal Kubecek  ``ETHTOOL_A_LINKINFO_PORT``           u8      physical port
381459e0b81SMichal Kubecek  ``ETHTOOL_A_LINKINFO_PHYADDR``        u8      phy MDIO address
382459e0b81SMichal Kubecek  ``ETHTOOL_A_LINKINFO_TP_MDIX``        u8      MDI(-X) status
383459e0b81SMichal Kubecek  ``ETHTOOL_A_LINKINFO_TP_MDIX_CTRL``   u8      MDI(-X) control
384459e0b81SMichal Kubecek  ``ETHTOOL_A_LINKINFO_TRANSCEIVER``    u8      transceiver
385459e0b81SMichal Kubecek  ====================================  ======  ==========================
386459e0b81SMichal Kubecek
387459e0b81SMichal KubecekAttributes and their values have the same meaning as matching members of the
388459e0b81SMichal Kubecekcorresponding ioctl structures.
389459e0b81SMichal Kubecek
390459e0b81SMichal Kubecek``LINKINFO_GET`` allows dump requests (kernel returns reply message for all
391459e0b81SMichal Kubecekdevices supporting the request).
392459e0b81SMichal Kubecek
393459e0b81SMichal Kubecek
394a53f3d41SMichal KubecekLINKINFO_SET
395a53f3d41SMichal Kubecek============
396a53f3d41SMichal Kubecek
397a53f3d41SMichal Kubecek``LINKINFO_SET`` request allows setting some of the attributes reported by
398a53f3d41SMichal Kubecek``LINKINFO_GET``.
399a53f3d41SMichal Kubecek
400a53f3d41SMichal KubecekRequest contents:
401a53f3d41SMichal Kubecek
402a53f3d41SMichal Kubecek  ====================================  ======  ==========================
403a53f3d41SMichal Kubecek  ``ETHTOOL_A_LINKINFO_HEADER``         nested  request header
404a53f3d41SMichal Kubecek  ``ETHTOOL_A_LINKINFO_PORT``           u8      physical port
405a53f3d41SMichal Kubecek  ``ETHTOOL_A_LINKINFO_PHYADDR``        u8      phy MDIO address
406a53f3d41SMichal Kubecek  ``ETHTOOL_A_LINKINFO_TP_MDIX_CTRL``   u8      MDI(-X) control
407a53f3d41SMichal Kubecek  ====================================  ======  ==========================
408a53f3d41SMichal Kubecek
409a53f3d41SMichal KubecekMDI(-X) status and transceiver cannot be set, request with the corresponding
410a53f3d41SMichal Kubecekattributes is rejected.
411a53f3d41SMichal Kubecek
412a53f3d41SMichal Kubecek
413f625aa9bSMichal KubecekLINKMODES_GET
414f625aa9bSMichal Kubecek=============
415f625aa9bSMichal Kubecek
416f625aa9bSMichal KubecekRequests link modes (supported, advertised and peer advertised) and related
417f625aa9bSMichal Kubecekinformation (autonegotiation status, link speed and duplex) as provided by
418f625aa9bSMichal Kubecek``ETHTOOL_GLINKSETTINGS``. The request does not use any attributes.
419f625aa9bSMichal Kubecek
420f625aa9bSMichal KubecekRequest contents:
421f625aa9bSMichal Kubecek
422f625aa9bSMichal Kubecek  ====================================  ======  ==========================
423f625aa9bSMichal Kubecek  ``ETHTOOL_A_LINKMODES_HEADER``        nested  request header
424f625aa9bSMichal Kubecek  ====================================  ======  ==========================
425f625aa9bSMichal Kubecek
426f625aa9bSMichal KubecekKernel response contents:
427f625aa9bSMichal Kubecek
428bdbdac76SOleksij Rempel  ==========================================  ======  ==========================
429f625aa9bSMichal Kubecek  ``ETHTOOL_A_LINKMODES_HEADER``              nested  reply header
430f625aa9bSMichal Kubecek  ``ETHTOOL_A_LINKMODES_AUTONEG``             u8      autonegotiation status
431f625aa9bSMichal Kubecek  ``ETHTOOL_A_LINKMODES_OURS``                bitset  advertised link modes
432f625aa9bSMichal Kubecek  ``ETHTOOL_A_LINKMODES_PEER``                bitset  partner link modes
433f625aa9bSMichal Kubecek  ``ETHTOOL_A_LINKMODES_SPEED``               u32     link speed (Mb/s)
434f625aa9bSMichal Kubecek  ``ETHTOOL_A_LINKMODES_DUPLEX``              u8      duplex mode
435bdbdac76SOleksij Rempel  ``ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG``    u8      Master/slave port mode
436bdbdac76SOleksij Rempel  ``ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE``  u8      Master/slave port state
4370c3e10cbSSean Anderson  ``ETHTOOL_A_LINKMODES_RATE_MATCHING``       u8      PHY rate matching
438bdbdac76SOleksij Rempel  ==========================================  ======  ==========================
439f625aa9bSMichal Kubecek
440f625aa9bSMichal KubecekFor ``ETHTOOL_A_LINKMODES_OURS``, value represents advertised modes and mask
441f625aa9bSMichal Kubecekrepresents supported modes. ``ETHTOOL_A_LINKMODES_PEER`` in the reply is a bit
442f625aa9bSMichal Kubeceklist.
443f625aa9bSMichal Kubecek
444f625aa9bSMichal Kubecek``LINKMODES_GET`` allows dump requests (kernel returns reply messages for all
445f625aa9bSMichal Kubecekdevices supporting the request).
446f625aa9bSMichal Kubecek
447f625aa9bSMichal Kubecek
448bfbcfe20SMichal KubecekLINKMODES_SET
449bfbcfe20SMichal Kubecek=============
450bfbcfe20SMichal Kubecek
451bfbcfe20SMichal KubecekRequest contents:
452bfbcfe20SMichal Kubecek
453bdbdac76SOleksij Rempel  ==========================================  ======  ==========================
454bfbcfe20SMichal Kubecek  ``ETHTOOL_A_LINKMODES_HEADER``              nested  request header
455bfbcfe20SMichal Kubecek  ``ETHTOOL_A_LINKMODES_AUTONEG``             u8      autonegotiation status
456bfbcfe20SMichal Kubecek  ``ETHTOOL_A_LINKMODES_OURS``                bitset  advertised link modes
457bfbcfe20SMichal Kubecek  ``ETHTOOL_A_LINKMODES_PEER``                bitset  partner link modes
458bfbcfe20SMichal Kubecek  ``ETHTOOL_A_LINKMODES_SPEED``               u32     link speed (Mb/s)
459bfbcfe20SMichal Kubecek  ``ETHTOOL_A_LINKMODES_DUPLEX``              u8      duplex mode
460bdbdac76SOleksij Rempel  ``ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG``    u8      Master/slave port mode
4610c3e10cbSSean Anderson  ``ETHTOOL_A_LINKMODES_RATE_MATCHING``       u8      PHY rate matching
462012ce4ddSDanielle Ratson  ``ETHTOOL_A_LINKMODES_LANES``               u32     lanes
463bdbdac76SOleksij Rempel  ==========================================  ======  ==========================
464bfbcfe20SMichal Kubecek
465bfbcfe20SMichal Kubecek``ETHTOOL_A_LINKMODES_OURS`` bit set allows setting advertised link modes. If
466bfbcfe20SMichal Kubecekautonegotiation is on (either set now or kept from before), advertised modes
467bfbcfe20SMichal Kubecekare not changed (no ``ETHTOOL_A_LINKMODES_OURS`` attribute) and at least one
468012ce4ddSDanielle Ratsonof speed, duplex and lanes is specified, kernel adjusts advertised modes to all
469012ce4ddSDanielle Ratsonsupported modes matching speed, duplex, lanes or all (whatever is specified).
470012ce4ddSDanielle RatsonThis autoselection is done on ethtool side with ioctl interface, netlink
471012ce4ddSDanielle Ratsoninterface is supposed to allow requesting changes without knowing what exactly
472012ce4ddSDanielle Ratsonkernel supports.
473bfbcfe20SMichal Kubecek
474bfbcfe20SMichal Kubecek
4753d2b847fSMichal KubecekLINKSTATE_GET
4763d2b847fSMichal Kubecek=============
4773d2b847fSMichal Kubecek
478e120c801SAmit CohenRequests link state information. Link up/down flag (as provided by
479e120c801SAmit Cohen``ETHTOOL_GLINK`` ioctl command) is provided. Optionally, extended state might
480e120c801SAmit Cohenbe provided as well. In general, extended state describes reasons for why a port
481e120c801SAmit Cohenis down, or why it operates in some non-obvious mode. This request does not have
482e120c801SAmit Cohenany attributes.
4833d2b847fSMichal Kubecek
4843d2b847fSMichal KubecekRequest contents:
4853d2b847fSMichal Kubecek
4863d2b847fSMichal Kubecek  ====================================  ======  ==========================
4873d2b847fSMichal Kubecek  ``ETHTOOL_A_LINKSTATE_HEADER``        nested  request header
4883d2b847fSMichal Kubecek  ====================================  ======  ==========================
4893d2b847fSMichal Kubecek
4903d2b847fSMichal KubecekKernel response contents:
4913d2b847fSMichal Kubecek
49280660219SOleksij Rempel  ====================================  ======  ============================
4933d2b847fSMichal Kubecek  ``ETHTOOL_A_LINKSTATE_HEADER``        nested  reply header
4943d2b847fSMichal Kubecek  ``ETHTOOL_A_LINKSTATE_LINK``          bool    link state (up/down)
49580660219SOleksij Rempel  ``ETHTOOL_A_LINKSTATE_SQI``           u32     Current Signal Quality Index
49680660219SOleksij Rempel  ``ETHTOOL_A_LINKSTATE_SQI_MAX``       u32     Max support SQI value
497e120c801SAmit Cohen  ``ETHTOOL_A_LINKSTATE_EXT_STATE``     u8      link extended state
498e120c801SAmit Cohen  ``ETHTOOL_A_LINKSTATE_EXT_SUBSTATE``  u8      link extended substate
4999a0f830fSJakub Kicinski  ``ETHTOOL_A_LINKSTATE_EXT_DOWN_CNT``  u32     count of link down events
50080660219SOleksij Rempel  ====================================  ======  ============================
5013d2b847fSMichal Kubecek
5023d2b847fSMichal KubecekFor most NIC drivers, the value of ``ETHTOOL_A_LINKSTATE_LINK`` returns
5033d2b847fSMichal Kubecekcarrier flag provided by ``netif_carrier_ok()`` but there are drivers which
5043d2b847fSMichal Kubecekdefine their own handler.
5053d2b847fSMichal Kubecek
506e120c801SAmit Cohen``ETHTOOL_A_LINKSTATE_EXT_STATE`` and ``ETHTOOL_A_LINKSTATE_EXT_SUBSTATE`` are
507e120c801SAmit Cohenoptional values. ethtool core can provide either both
508e120c801SAmit Cohen``ETHTOOL_A_LINKSTATE_EXT_STATE`` and ``ETHTOOL_A_LINKSTATE_EXT_SUBSTATE``,
509e120c801SAmit Cohenor only ``ETHTOOL_A_LINKSTATE_EXT_STATE``, or none of them.
510e120c801SAmit Cohen
5113d2b847fSMichal Kubecek``LINKSTATE_GET`` allows dump requests (kernel returns reply messages for all
5123d2b847fSMichal Kubecekdevices supporting the request).
5133d2b847fSMichal Kubecek
5143d2b847fSMichal Kubecek
515e120c801SAmit CohenLink extended states:
516e120c801SAmit Cohen
517e120c801SAmit Cohen  ================================================      ============================================
518e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_STATE_AUTONEG``                    States relating to the autonegotiation or
519e120c801SAmit Cohen                                                        issues therein
520e120c801SAmit Cohen
521e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE``      Failure during link training
522e120c801SAmit Cohen
523e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH``      Logical mismatch in physical coding sublayer
524e120c801SAmit Cohen                                                        or forward error correction sublayer
525e120c801SAmit Cohen
526e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY``       Signal integrity issues
527e120c801SAmit Cohen
528e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_STATE_NO_CABLE``                   No cable connected
529e120c801SAmit Cohen
530e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE``                Failure is related to cable,
531e120c801SAmit Cohen                                                        e.g., unsupported cable
532e120c801SAmit Cohen
533e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_STATE_EEPROM_ISSUE``               Failure is related to EEPROM, e.g., failure
534e120c801SAmit Cohen                                                        during reading or parsing the data
535e120c801SAmit Cohen
536e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE``        Failure during calibration algorithm
537e120c801SAmit Cohen
538e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED``      The hardware is not able to provide the
539e120c801SAmit Cohen                                                        power required from cable or module
540e120c801SAmit Cohen
541e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_STATE_OVERHEAT``                   The module is overheated
5423dfb5112SIdo Schimmel
5433dfb5112SIdo Schimmel  ``ETHTOOL_LINK_EXT_STATE_MODULE``                     Transceiver module issue
5441a4d6816SRandy Dunlap  ================================================      ============================================
545e120c801SAmit Cohen
546e120c801SAmit CohenLink extended substates:
547e120c801SAmit Cohen
548e120c801SAmit Cohen  Autoneg substates:
549e120c801SAmit Cohen
5501a4d6816SRandy Dunlap  ===============================================================   ================================
551e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED``              Peer side is down
552e120c801SAmit Cohen
553e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_AN_ACK_NOT_RECEIVED``                 Ack not received from peer side
554e120c801SAmit Cohen
555e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_AN_NEXT_PAGE_EXCHANGE_FAILED``        Next page exchange failed
556e120c801SAmit Cohen
557e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED_FORCE_MODE``   Peer side is down during force
558e120c801SAmit Cohen                                                                    mode or there is no agreement of
559e120c801SAmit Cohen                                                                    speed
560e120c801SAmit Cohen
561e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_AN_FEC_MISMATCH_DURING_OVERRIDE``     Forward error correction modes
562e120c801SAmit Cohen                                                                    in both sides are mismatched
563e120c801SAmit Cohen
564e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_HCD``                           No Highest Common Denominator
5651a4d6816SRandy Dunlap  ===============================================================   ================================
566e120c801SAmit Cohen
567e120c801SAmit Cohen  Link training substates:
568e120c801SAmit Cohen
5691a4d6816SRandy Dunlap  ===========================================================================   ====================
570e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_FRAME_LOCK_NOT_ACQUIRED``                    Frames were not
571e120c801SAmit Cohen                                                                                 recognized, the
572e120c801SAmit Cohen                                                                                 lock failed
573e120c801SAmit Cohen
574e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_INHIBIT_TIMEOUT``                       The lock did not
575e120c801SAmit Cohen                                                                                 occur before
576e120c801SAmit Cohen                                                                                 timeout
577e120c801SAmit Cohen
578e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_PARTNER_DID_NOT_SET_RECEIVER_READY``    Peer side did not
579e120c801SAmit Cohen                                                                                 send ready signal
580e120c801SAmit Cohen                                                                                 after training
581e120c801SAmit Cohen                                                                                 process
582e120c801SAmit Cohen
583e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT``                                  Remote side is not
584e120c801SAmit Cohen                                                                                 ready yet
5851a4d6816SRandy Dunlap  ===========================================================================   ====================
586e120c801SAmit Cohen
587e120c801SAmit Cohen  Link logical mismatch substates:
588e120c801SAmit Cohen
5891a4d6816SRandy Dunlap  ================================================================   ===============================
590e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_BLOCK_LOCK``   Physical coding sublayer was
591e120c801SAmit Cohen                                                                     not locked in first phase -
592e120c801SAmit Cohen                                                                     block lock
593e120c801SAmit Cohen
594e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_AM_LOCK``      Physical coding sublayer was
595e120c801SAmit Cohen                                                                     not locked in second phase -
596e120c801SAmit Cohen                                                                     alignment markers lock
597e120c801SAmit Cohen
598e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_GET_ALIGN_STATUS``     Physical coding sublayer did
599e120c801SAmit Cohen                                                                     not get align status
600e120c801SAmit Cohen
601e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_FC_FEC_IS_NOT_LOCKED``             FC forward error correction is
602e120c801SAmit Cohen                                                                     not locked
603e120c801SAmit Cohen
604e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_RS_FEC_IS_NOT_LOCKED``             RS forward error correction is
605e120c801SAmit Cohen                                                                     not locked
6061a4d6816SRandy Dunlap  ================================================================   ===============================
607e120c801SAmit Cohen
608e120c801SAmit Cohen  Bad signal integrity substates:
609e120c801SAmit Cohen
610e120c801SAmit Cohen  =================================================================    =============================
611e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS``    Large number of physical
612e120c801SAmit Cohen                                                                       errors
613e120c801SAmit Cohen
614e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE``                   The system attempted to
615e120c801SAmit Cohen                                                                       operate the cable at a rate
616e120c801SAmit Cohen                                                                       that is not formally
617e120c801SAmit Cohen                                                                       supported, which led to
618e120c801SAmit Cohen                                                                       signal integrity issues
619958ab281SGuangbin Huang
620958ab281SGuangbin Huang  ``ETHTOOL_LINK_EXT_SUBSTATE_BSI_SERDES_REFERENCE_CLOCK_LOST``        The external clock signal for
621958ab281SGuangbin Huang                                                                       SerDes is too weak or
622958ab281SGuangbin Huang                                                                       unavailable.
623958ab281SGuangbin Huang
624958ab281SGuangbin Huang  ``ETHTOOL_LINK_EXT_SUBSTATE_BSI_SERDES_ALOS``                        The received signal for
625958ab281SGuangbin Huang                                                                       SerDes is too weak because
626958ab281SGuangbin Huang                                                                       analog loss of signal.
627e120c801SAmit Cohen  =================================================================    =============================
628e120c801SAmit Cohen
629e120c801SAmit Cohen  Cable issue substates:
630e120c801SAmit Cohen
6311a4d6816SRandy Dunlap  ===================================================   ============================================
632e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_CI_UNSUPPORTED_CABLE``    Unsupported cable
633e120c801SAmit Cohen
634e120c801SAmit Cohen  ``ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE``   Cable test failure
6351a4d6816SRandy Dunlap  ===================================================   ============================================
636e120c801SAmit Cohen
6373dfb5112SIdo Schimmel  Transceiver module issue substates:
6383dfb5112SIdo Schimmel
6393dfb5112SIdo Schimmel  ===================================================   ============================================
6403dfb5112SIdo Schimmel  ``ETHTOOL_LINK_EXT_SUBSTATE_MODULE_CMIS_NOT_READY``   The CMIS Module State Machine did not reach
6413dfb5112SIdo Schimmel                                                        the ModuleReady state. For example, if the
6423dfb5112SIdo Schimmel                                                        module is stuck at ModuleFault state
6433dfb5112SIdo Schimmel  ===================================================   ============================================
6443dfb5112SIdo Schimmel
6456a94b8ccSMichal KubecekDEBUG_GET
6466a94b8ccSMichal Kubecek=========
6476a94b8ccSMichal Kubecek
6486a94b8ccSMichal KubecekRequests debugging settings of a device. At the moment, only message mask is
6496a94b8ccSMichal Kubecekprovided.
6506a94b8ccSMichal Kubecek
6516a94b8ccSMichal KubecekRequest contents:
6526a94b8ccSMichal Kubecek
6536a94b8ccSMichal Kubecek  ====================================  ======  ==========================
6546a94b8ccSMichal Kubecek  ``ETHTOOL_A_DEBUG_HEADER``            nested  request header
6556a94b8ccSMichal Kubecek  ====================================  ======  ==========================
6566a94b8ccSMichal Kubecek
6576a94b8ccSMichal KubecekKernel response contents:
6586a94b8ccSMichal Kubecek
6596a94b8ccSMichal Kubecek  ====================================  ======  ==========================
6606a94b8ccSMichal Kubecek  ``ETHTOOL_A_DEBUG_HEADER``            nested  reply header
6616a94b8ccSMichal Kubecek  ``ETHTOOL_A_DEBUG_MSGMASK``           bitset  message mask
6626a94b8ccSMichal Kubecek  ====================================  ======  ==========================
6636a94b8ccSMichal Kubecek
6646a94b8ccSMichal KubecekThe message mask (``ETHTOOL_A_DEBUG_MSGMASK``) is equal to message level as
6656a94b8ccSMichal Kubecekprovided by ``ETHTOOL_GMSGLVL`` and set by ``ETHTOOL_SMSGLVL`` in ioctl
6666a94b8ccSMichal Kubecekinterface. While it is called message level there for historical reasons, most
6676a94b8ccSMichal Kubecekdrivers and almost all newer drivers use it as a mask of enabled message
6686a94b8ccSMichal Kubecekclasses (represented by ``NETIF_MSG_*`` constants); therefore netlink
6696a94b8ccSMichal Kubecekinterface follows its actual use in practice.
6706a94b8ccSMichal Kubecek
6716a94b8ccSMichal Kubecek``DEBUG_GET`` allows dump requests (kernel returns reply messages for all
6726a94b8ccSMichal Kubecekdevices supporting the request).
6736a94b8ccSMichal Kubecek
6746a94b8ccSMichal Kubecek
675e54d04e3SMichal KubecekDEBUG_SET
676e54d04e3SMichal Kubecek=========
677e54d04e3SMichal Kubecek
678e54d04e3SMichal KubecekSet or update debugging settings of a device. At the moment, only message mask
679e54d04e3SMichal Kubecekis supported.
680e54d04e3SMichal Kubecek
681e54d04e3SMichal KubecekRequest contents:
682e54d04e3SMichal Kubecek
683e54d04e3SMichal Kubecek  ====================================  ======  ==========================
684e54d04e3SMichal Kubecek  ``ETHTOOL_A_DEBUG_HEADER``            nested  request header
685e54d04e3SMichal Kubecek  ``ETHTOOL_A_DEBUG_MSGMASK``           bitset  message mask
686e54d04e3SMichal Kubecek  ====================================  ======  ==========================
687e54d04e3SMichal Kubecek
688e54d04e3SMichal Kubecek``ETHTOOL_A_DEBUG_MSGMASK`` bit set allows setting or modifying mask of
689e54d04e3SMichal Kubecekenabled debugging message types for the device.
690e54d04e3SMichal Kubecek
691e54d04e3SMichal Kubecek
69251ea22b0SMichal KubecekWOL_GET
69351ea22b0SMichal Kubecek=======
69451ea22b0SMichal Kubecek
69551ea22b0SMichal KubecekQuery device wake-on-lan settings. Unlike most "GET" type requests,
69651ea22b0SMichal Kubecek``ETHTOOL_MSG_WOL_GET`` requires (netns) ``CAP_NET_ADMIN`` privileges as it
69751ea22b0SMichal Kubecek(potentially) provides SecureOn(tm) password which is confidential.
69851ea22b0SMichal Kubecek
69951ea22b0SMichal KubecekRequest contents:
70051ea22b0SMichal Kubecek
70151ea22b0SMichal Kubecek  ====================================  ======  ==========================
70251ea22b0SMichal Kubecek  ``ETHTOOL_A_WOL_HEADER``              nested  request header
70351ea22b0SMichal Kubecek  ====================================  ======  ==========================
70451ea22b0SMichal Kubecek
70551ea22b0SMichal KubecekKernel response contents:
70651ea22b0SMichal Kubecek
70751ea22b0SMichal Kubecek  ====================================  ======  ==========================
70851ea22b0SMichal Kubecek  ``ETHTOOL_A_WOL_HEADER``              nested  reply header
70951ea22b0SMichal Kubecek  ``ETHTOOL_A_WOL_MODES``               bitset  mask of enabled WoL modes
71051ea22b0SMichal Kubecek  ``ETHTOOL_A_WOL_SOPASS``              binary  SecureOn(tm) password
71151ea22b0SMichal Kubecek  ====================================  ======  ==========================
71251ea22b0SMichal Kubecek
71351ea22b0SMichal KubecekIn reply, ``ETHTOOL_A_WOL_MODES`` mask consists of modes supported by the
71451ea22b0SMichal Kubecekdevice, value of modes which are enabled. ``ETHTOOL_A_WOL_SOPASS`` is only
71551ea22b0SMichal Kubecekincluded in reply if ``WAKE_MAGICSECURE`` mode is supported.
71651ea22b0SMichal Kubecek
71751ea22b0SMichal Kubecek
7188d425b19SMichal KubecekWOL_SET
7198d425b19SMichal Kubecek=======
7208d425b19SMichal Kubecek
7218d425b19SMichal KubecekSet or update wake-on-lan settings.
7228d425b19SMichal Kubecek
7238d425b19SMichal KubecekRequest contents:
7248d425b19SMichal Kubecek
7258d425b19SMichal Kubecek  ====================================  ======  ==========================
7268d425b19SMichal Kubecek  ``ETHTOOL_A_WOL_HEADER``              nested  request header
7278d425b19SMichal Kubecek  ``ETHTOOL_A_WOL_MODES``               bitset  enabled WoL modes
7288d425b19SMichal Kubecek  ``ETHTOOL_A_WOL_SOPASS``              binary  SecureOn(tm) password
7298d425b19SMichal Kubecek  ====================================  ======  ==========================
7308d425b19SMichal Kubecek
7318d425b19SMichal Kubecek``ETHTOOL_A_WOL_SOPASS`` is only allowed for devices supporting
7328d425b19SMichal Kubecek``WAKE_MAGICSECURE`` mode.
7338d425b19SMichal Kubecek
7348d425b19SMichal Kubecek
7350524399dSMichal KubecekFEATURES_GET
7360524399dSMichal Kubecek============
7370524399dSMichal Kubecek
7380524399dSMichal KubecekGets netdev features like ``ETHTOOL_GFEATURES`` ioctl request.
7390524399dSMichal Kubecek
7400524399dSMichal KubecekRequest contents:
7410524399dSMichal Kubecek
7420524399dSMichal Kubecek  ====================================  ======  ==========================
7430524399dSMichal Kubecek  ``ETHTOOL_A_FEATURES_HEADER``         nested  request header
7440524399dSMichal Kubecek  ====================================  ======  ==========================
7450524399dSMichal Kubecek
7460524399dSMichal KubecekKernel response contents:
7470524399dSMichal Kubecek
7480524399dSMichal Kubecek  ====================================  ======  ==========================
7490524399dSMichal Kubecek  ``ETHTOOL_A_FEATURES_HEADER``         nested  reply header
7500524399dSMichal Kubecek  ``ETHTOOL_A_FEATURES_HW``             bitset  dev->hw_features
7510524399dSMichal Kubecek  ``ETHTOOL_A_FEATURES_WANTED``         bitset  dev->wanted_features
7520524399dSMichal Kubecek  ``ETHTOOL_A_FEATURES_ACTIVE``         bitset  dev->features
7530524399dSMichal Kubecek  ``ETHTOOL_A_FEATURES_NOCHANGE``       bitset  NETIF_F_NEVER_CHANGE
7540524399dSMichal Kubecek  ====================================  ======  ==========================
7550524399dSMichal Kubecek
7560524399dSMichal KubecekBitmaps in kernel response have the same meaning as bitmaps used in ioctl
7570524399dSMichal Kubecekinterference but attribute names are different (they are based on
7580524399dSMichal Kubecekcorresponding members of struct net_device). Legacy "flags" are not provided,
7590524399dSMichal Kubecekif userspace needs them (most likely only ethtool for backward compatibility),
7600524399dSMichal Kubecekit can calculate their values from related feature bits itself.
7610524399dSMichal KubecekETHA_FEATURES_HW uses mask consisting of all features recognized by kernel (to
7620524399dSMichal Kubecekprovide all names when using verbose bitmap format), the other three use no
7630524399dSMichal Kubecekmask (simple bit lists).
7640524399dSMichal Kubecek
7650524399dSMichal Kubecek
7660980bfcdSMichal KubecekFEATURES_SET
7670980bfcdSMichal Kubecek============
7680980bfcdSMichal Kubecek
7690980bfcdSMichal KubecekRequest to set netdev features like ``ETHTOOL_SFEATURES`` ioctl request.
7700980bfcdSMichal Kubecek
7710980bfcdSMichal KubecekRequest contents:
7720980bfcdSMichal Kubecek
7730980bfcdSMichal Kubecek  ====================================  ======  ==========================
7740980bfcdSMichal Kubecek  ``ETHTOOL_A_FEATURES_HEADER``         nested  request header
7750980bfcdSMichal Kubecek  ``ETHTOOL_A_FEATURES_WANTED``         bitset  requested features
7760980bfcdSMichal Kubecek  ====================================  ======  ==========================
7770980bfcdSMichal Kubecek
7780980bfcdSMichal KubecekKernel response contents:
7790980bfcdSMichal Kubecek
7800980bfcdSMichal Kubecek  ====================================  ======  ==========================
7810980bfcdSMichal Kubecek  ``ETHTOOL_A_FEATURES_HEADER``         nested  reply header
7820980bfcdSMichal Kubecek  ``ETHTOOL_A_FEATURES_WANTED``         bitset  diff wanted vs. result
7830980bfcdSMichal Kubecek  ``ETHTOOL_A_FEATURES_ACTIVE``         bitset  diff old vs. new active
7840980bfcdSMichal Kubecek  ====================================  ======  ==========================
7850980bfcdSMichal Kubecek
786a266ef69SRandy DunlapRequest contains only one bitset which can be either value/mask pair (request
7870980bfcdSMichal Kubecekto change specific feature bits and leave the rest) or only a value (request
7880980bfcdSMichal Kubecekto set all features to specified set).
7890980bfcdSMichal Kubecek
7900980bfcdSMichal KubecekAs request is subject to netdev_change_features() sanity checks, optional
7910980bfcdSMichal Kubecekkernel reply (can be suppressed by ``ETHTOOL_FLAG_OMIT_REPLY`` flag in request
7920980bfcdSMichal Kubecekheader) informs client about the actual result. ``ETHTOOL_A_FEATURES_WANTED``
7930980bfcdSMichal Kubecekreports the difference between client request and actual result: mask consists
7940980bfcdSMichal Kubecekof bits which differ between requested features and result (dev->features
7950980bfcdSMichal Kubecekafter the operation), value consists of values of these bits in the request
7960980bfcdSMichal Kubecek(i.e. negated values from resulting features). ``ETHTOOL_A_FEATURES_ACTIVE``
7970980bfcdSMichal Kubecekreports the difference between old and new dev->features: mask consists of
7980980bfcdSMichal Kubecekbits which have changed, values are their values in new dev->features (after
7990980bfcdSMichal Kubecekthe operation).
8000980bfcdSMichal Kubecek
8019c6451efSMichal Kubecek``ETHTOOL_MSG_FEATURES_NTF`` notification is sent not only if device features
8029c6451efSMichal Kubecekare modified using ``ETHTOOL_MSG_FEATURES_SET`` request or on of ethtool ioctl
8039c6451efSMichal Kubecekrequest but also each time features are modified with netdev_update_features()
8049c6451efSMichal Kubecekor netdev_change_features().
8059c6451efSMichal Kubecek
8060980bfcdSMichal Kubecek
807e16c3386SMichal KubecekPRIVFLAGS_GET
808e16c3386SMichal Kubecek=============
809e16c3386SMichal Kubecek
810e16c3386SMichal KubecekGets private flags like ``ETHTOOL_GPFLAGS`` ioctl request.
811e16c3386SMichal Kubecek
812e16c3386SMichal KubecekRequest contents:
813e16c3386SMichal Kubecek
814e16c3386SMichal Kubecek  ====================================  ======  ==========================
815e16c3386SMichal Kubecek  ``ETHTOOL_A_PRIVFLAGS_HEADER``        nested  request header
816e16c3386SMichal Kubecek  ====================================  ======  ==========================
817e16c3386SMichal Kubecek
818e16c3386SMichal KubecekKernel response contents:
819e16c3386SMichal Kubecek
820e16c3386SMichal Kubecek  ====================================  ======  ==========================
821e16c3386SMichal Kubecek  ``ETHTOOL_A_PRIVFLAGS_HEADER``        nested  reply header
822e16c3386SMichal Kubecek  ``ETHTOOL_A_PRIVFLAGS_FLAGS``         bitset  private flags
823e16c3386SMichal Kubecek  ====================================  ======  ==========================
824e16c3386SMichal Kubecek
825e16c3386SMichal Kubecek``ETHTOOL_A_PRIVFLAGS_FLAGS`` is a bitset with values of device private flags.
826e16c3386SMichal KubecekThese flags are defined by driver, their number and names (and also meaning)
827e16c3386SMichal Kubecekare device dependent. For compact bitset format, names can be retrieved as
828e16c3386SMichal Kubecek``ETH_SS_PRIV_FLAGS`` string set. If verbose bitset format is requested,
829e16c3386SMichal Kubecekresponse uses all private flags supported by the device as mask so that client
830e16c3386SMichal Kubecekgets the full information without having to fetch the string set with names.
831e16c3386SMichal Kubecek
832e16c3386SMichal Kubecek
833f265d799SMichal KubecekPRIVFLAGS_SET
834f265d799SMichal Kubecek=============
835f265d799SMichal Kubecek
836f265d799SMichal KubecekSets or modifies values of device private flags like ``ETHTOOL_SPFLAGS``
837f265d799SMichal Kubecekioctl request.
838f265d799SMichal Kubecek
839f265d799SMichal KubecekRequest contents:
840f265d799SMichal Kubecek
841f265d799SMichal Kubecek  ====================================  ======  ==========================
842f265d799SMichal Kubecek  ``ETHTOOL_A_PRIVFLAGS_HEADER``        nested  request header
843f265d799SMichal Kubecek  ``ETHTOOL_A_PRIVFLAGS_FLAGS``         bitset  private flags
844f265d799SMichal Kubecek  ====================================  ======  ==========================
845f265d799SMichal Kubecek
846f265d799SMichal Kubecek``ETHTOOL_A_PRIVFLAGS_FLAGS`` can either set the whole set of private flags or
847f265d799SMichal Kubecekmodify only values of some of them.
848f265d799SMichal Kubecek
849f265d799SMichal Kubecek
850e4a1717bSMichal KubecekRINGS_GET
851e4a1717bSMichal Kubecek=========
852e4a1717bSMichal Kubecek
853e4a1717bSMichal KubecekGets ring sizes like ``ETHTOOL_GRINGPARAM`` ioctl request.
854e4a1717bSMichal Kubecek
855e4a1717bSMichal KubecekRequest contents:
856e4a1717bSMichal Kubecek
857e4a1717bSMichal Kubecek  ====================================  ======  ==========================
858e4a1717bSMichal Kubecek  ``ETHTOOL_A_RINGS_HEADER``            nested  request header
859e4a1717bSMichal Kubecek  ====================================  ======  ==========================
860e4a1717bSMichal Kubecek
861e4a1717bSMichal KubecekKernel response contents:
862e4a1717bSMichal Kubecek
863233eb4e7SShay Agroskin  =======================================   ======  ===========================
864e4a1717bSMichal Kubecek  ``ETHTOOL_A_RINGS_HEADER``                nested  reply header
865e4a1717bSMichal Kubecek  ``ETHTOOL_A_RINGS_RX_MAX``                u32     max size of RX ring
866e4a1717bSMichal Kubecek  ``ETHTOOL_A_RINGS_RX_MINI_MAX``           u32     max size of RX mini ring
867e4a1717bSMichal Kubecek  ``ETHTOOL_A_RINGS_RX_JUMBO_MAX``          u32     max size of RX jumbo ring
868e4a1717bSMichal Kubecek  ``ETHTOOL_A_RINGS_TX_MAX``                u32     max size of TX ring
869e4a1717bSMichal Kubecek  ``ETHTOOL_A_RINGS_RX``                    u32     size of RX ring
870e4a1717bSMichal Kubecek  ``ETHTOOL_A_RINGS_RX_MINI``               u32     size of RX mini ring
871e4a1717bSMichal Kubecek  ``ETHTOOL_A_RINGS_RX_JUMBO``              u32     size of RX jumbo ring
872e4a1717bSMichal Kubecek  ``ETHTOOL_A_RINGS_TX``                    u32     size of TX ring
8730b70c256SHao Chen  ``ETHTOOL_A_RINGS_RX_BUF_LEN``            u32     size of buffers on the ring
8749690ae60SJakub Kicinski  ``ETHTOOL_A_RINGS_TCP_DATA_SPLIT``        u8      TCP header / data split
8751241e329SSubbaraya Sundeep  ``ETHTOOL_A_RINGS_CQE_SIZE``              u32     Size of TX/RX CQE
8764dc84c06SJie Wang  ``ETHTOOL_A_RINGS_TX_PUSH``               u8      flag of TX Push mode
8775b4e9a7aSShannon Nelson  ``ETHTOOL_A_RINGS_RX_PUSH``               u8      flag of RX Push mode
878233eb4e7SShay Agroskin  ``ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN``       u32     size of TX push buffer
879233eb4e7SShay Agroskin  ``ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN_MAX``   u32     max size of TX push buffer
880233eb4e7SShay Agroskin  =======================================   ======  ===========================
881e4a1717bSMichal Kubecek
8829690ae60SJakub Kicinski``ETHTOOL_A_RINGS_TCP_DATA_SPLIT`` indicates whether the device is usable with
8839690ae60SJakub Kicinskipage-flipping TCP zero-copy receive (``getsockopt(TCP_ZEROCOPY_RECEIVE)``).
8849690ae60SJakub KicinskiIf enabled the device is configured to place frame headers and data into
8859690ae60SJakub Kicinskiseparate buffers. The device configuration must make it possible to receive
8869690ae60SJakub Kicinskifull memory pages of data, for example because MTU is high enough or through
8879690ae60SJakub KicinskiHW-GRO.
8889690ae60SJakub Kicinski
8895b4e9a7aSShannon Nelson``ETHTOOL_A_RINGS_[RX|TX]_PUSH`` flag is used to enable descriptor fast
8905b4e9a7aSShannon Nelsonpath to send or receive packets. In ordinary path, driver fills descriptors in DRAM and
8914dc84c06SJie Wangnotifies NIC hardware. In fast path, driver pushes descriptors to the device
8924dc84c06SJie Wangthrough MMIO writes, thus reducing the latency. However, enabling this feature
8934dc84c06SJie Wangmay increase the CPU cost. Drivers may enforce additional per-packet
8944dc84c06SJie Wangeligibility checks (e.g. on packet size).
895e4a1717bSMichal Kubecek
896233eb4e7SShay Agroskin``ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN`` specifies the maximum number of bytes of a
897233eb4e7SShay Agroskintransmitted packet a driver can push directly to the underlying device
898233eb4e7SShay Agroskin('push' mode). Pushing some of the payload bytes to the device has the
899233eb4e7SShay Agroskinadvantages of reducing latency for small packets by avoiding DMA mapping (same
900233eb4e7SShay Agroskinas ``ETHTOOL_A_RINGS_TX_PUSH`` parameter) as well as allowing the underlying
901233eb4e7SShay Agroskindevice to process packet headers ahead of fetching its payload.
902233eb4e7SShay AgroskinThis can help the device to make fast actions based on the packet's headers.
903233eb4e7SShay AgroskinThis is similar to the "tx-copybreak" parameter, which copies the packet to a
904233eb4e7SShay Agroskinpreallocated DMA memory area instead of mapping new memory. However,
905233eb4e7SShay Agroskintx-push-buff parameter copies the packet directly to the device to allow the
906233eb4e7SShay Agroskindevice to take faster actions on the packet.
907233eb4e7SShay Agroskin
9082fc2929eSMichal KubecekRINGS_SET
9092fc2929eSMichal Kubecek=========
9102fc2929eSMichal Kubecek
9112fc2929eSMichal KubecekSets ring sizes like ``ETHTOOL_SRINGPARAM`` ioctl request.
9122fc2929eSMichal Kubecek
9132fc2929eSMichal KubecekRequest contents:
9142fc2929eSMichal Kubecek
9150b70c256SHao Chen  ====================================  ======  ===========================
9162fc2929eSMichal Kubecek  ``ETHTOOL_A_RINGS_HEADER``            nested  reply header
9172fc2929eSMichal Kubecek  ``ETHTOOL_A_RINGS_RX``                u32     size of RX ring
9182fc2929eSMichal Kubecek  ``ETHTOOL_A_RINGS_RX_MINI``           u32     size of RX mini ring
9192fc2929eSMichal Kubecek  ``ETHTOOL_A_RINGS_RX_JUMBO``          u32     size of RX jumbo ring
9202fc2929eSMichal Kubecek  ``ETHTOOL_A_RINGS_TX``                u32     size of TX ring
9210b70c256SHao Chen  ``ETHTOOL_A_RINGS_RX_BUF_LEN``        u32     size of buffers on the ring
9221241e329SSubbaraya Sundeep  ``ETHTOOL_A_RINGS_CQE_SIZE``          u32     Size of TX/RX CQE
9234dc84c06SJie Wang  ``ETHTOOL_A_RINGS_TX_PUSH``           u8      flag of TX Push mode
9245b4e9a7aSShannon Nelson  ``ETHTOOL_A_RINGS_RX_PUSH``           u8      flag of RX Push mode
925233eb4e7SShay Agroskin  ``ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN``   u32     size of TX push buffer
9260b70c256SHao Chen  ====================================  ======  ===========================
9272fc2929eSMichal Kubecek
9282fc2929eSMichal KubecekKernel checks that requested ring sizes do not exceed limits reported by
9292fc2929eSMichal Kubecekdriver. Driver may impose additional constraints and may not suspport all
9302fc2929eSMichal Kubecekattributes.
9312fc2929eSMichal Kubecek
9322fc2929eSMichal Kubecek
9331241e329SSubbaraya Sundeep``ETHTOOL_A_RINGS_CQE_SIZE`` specifies the completion queue event size.
9341241e329SSubbaraya SundeepCompletion queue events(CQE) are the events posted by NIC to indicate the
9351241e329SSubbaraya Sundeepcompletion status of a packet when the packet is sent(like send success or
9361241e329SSubbaraya Sundeeperror) or received(like pointers to packet fragments). The CQE size parameter
9371241e329SSubbaraya Sundeepenables to modify the CQE size other than default size if NIC supports it.
9381241e329SSubbaraya SundeepA bigger CQE can have more receive buffer pointers inturn NIC can transfer
9391241e329SSubbaraya Sundeepa bigger frame from wire. Based on the NIC hardware, the overall completion
9401241e329SSubbaraya Sundeepqueue size can be adjusted in the driver if CQE size is modified.
9411241e329SSubbaraya Sundeep
9420c84979cSMichal KubecekCHANNELS_GET
9430c84979cSMichal Kubecek============
9440c84979cSMichal Kubecek
9450c84979cSMichal KubecekGets channel counts like ``ETHTOOL_GCHANNELS`` ioctl request.
9460c84979cSMichal Kubecek
9470c84979cSMichal KubecekRequest contents:
9480c84979cSMichal Kubecek
9490c84979cSMichal Kubecek  ====================================  ======  ==========================
9500c84979cSMichal Kubecek  ``ETHTOOL_A_CHANNELS_HEADER``         nested  request header
9510c84979cSMichal Kubecek  ====================================  ======  ==========================
9520c84979cSMichal Kubecek
9530c84979cSMichal KubecekKernel response contents:
9540c84979cSMichal Kubecek
9550c84979cSMichal Kubecek  =====================================  ======  ==========================
9560c84979cSMichal Kubecek  ``ETHTOOL_A_CHANNELS_HEADER``          nested  reply header
9570c84979cSMichal Kubecek  ``ETHTOOL_A_CHANNELS_RX_MAX``          u32     max receive channels
9580c84979cSMichal Kubecek  ``ETHTOOL_A_CHANNELS_TX_MAX``          u32     max transmit channels
9590c84979cSMichal Kubecek  ``ETHTOOL_A_CHANNELS_OTHER_MAX``       u32     max other channels
9600c84979cSMichal Kubecek  ``ETHTOOL_A_CHANNELS_COMBINED_MAX``    u32     max combined channels
9610c84979cSMichal Kubecek  ``ETHTOOL_A_CHANNELS_RX_COUNT``        u32     receive channel count
9620c84979cSMichal Kubecek  ``ETHTOOL_A_CHANNELS_TX_COUNT``        u32     transmit channel count
9630c84979cSMichal Kubecek  ``ETHTOOL_A_CHANNELS_OTHER_COUNT``     u32     other channel count
9640c84979cSMichal Kubecek  ``ETHTOOL_A_CHANNELS_COMBINED_COUNT``  u32     combined channel count
9650c84979cSMichal Kubecek  =====================================  ======  ==========================
9660c84979cSMichal Kubecek
9670c84979cSMichal Kubecek
968e19c591eSMichal KubecekCHANNELS_SET
969e19c591eSMichal Kubecek============
970e19c591eSMichal Kubecek
971e19c591eSMichal KubecekSets channel counts like ``ETHTOOL_SCHANNELS`` ioctl request.
972e19c591eSMichal Kubecek
973e19c591eSMichal KubecekRequest contents:
974e19c591eSMichal Kubecek
975e19c591eSMichal Kubecek  =====================================  ======  ==========================
976e19c591eSMichal Kubecek  ``ETHTOOL_A_CHANNELS_HEADER``          nested  request header
977e19c591eSMichal Kubecek  ``ETHTOOL_A_CHANNELS_RX_COUNT``        u32     receive channel count
978e19c591eSMichal Kubecek  ``ETHTOOL_A_CHANNELS_TX_COUNT``        u32     transmit channel count
979e19c591eSMichal Kubecek  ``ETHTOOL_A_CHANNELS_OTHER_COUNT``     u32     other channel count
980e19c591eSMichal Kubecek  ``ETHTOOL_A_CHANNELS_COMBINED_COUNT``  u32     combined channel count
981e19c591eSMichal Kubecek  =====================================  ======  ==========================
982e19c591eSMichal Kubecek
983e19c591eSMichal KubecekKernel checks that requested channel counts do not exceed limits reported by
984e19c591eSMichal Kubecekdriver. Driver may impose additional constraints and may not suspport all
985e19c591eSMichal Kubecekattributes.
986e19c591eSMichal Kubecek
987e19c591eSMichal Kubecek
98821727545SMichal KubecekCOALESCE_GET
98921727545SMichal Kubecek============
99021727545SMichal Kubecek
99121727545SMichal KubecekGets coalescing parameters like ``ETHTOOL_GCOALESCE`` ioctl request.
99221727545SMichal Kubecek
99321727545SMichal KubecekRequest contents:
99421727545SMichal Kubecek
99521727545SMichal Kubecek  ====================================  ======  ==========================
99621727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_HEADER``         nested  request header
99721727545SMichal Kubecek  ====================================  ======  ==========================
99821727545SMichal Kubecek
99921727545SMichal KubecekKernel response contents:
100021727545SMichal Kubecek
100121727545SMichal Kubecek  ===========================================  ======  =======================
100221727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_HEADER``                nested  reply header
100321727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_USECS``              u32     delay (us), normal Rx
100421727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES``         u32     max packets, normal Rx
100521727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_USECS_IRQ``          u32     delay (us), Rx in IRQ
100621727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ``     u32     max packets, Rx in IRQ
100721727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_USECS``              u32     delay (us), normal Tx
100821727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES``         u32     max packets, normal Tx
100921727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_USECS_IRQ``          u32     delay (us), Tx in IRQ
101021727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ``     u32     IRQ packets, Tx in IRQ
101121727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_STATS_BLOCK_USECS``     u32     delay of stats update
101221727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX``       bool    adaptive Rx coalesce
101321727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX``       bool    adaptive Tx coalesce
101421727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_PKT_RATE_LOW``          u32     threshold for low rate
101521727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_USECS_LOW``          u32     delay (us), low Rx
101621727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW``     u32     max packets, low Rx
101721727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_USECS_LOW``          u32     delay (us), low Tx
101821727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW``     u32     max packets, low Tx
101921727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_PKT_RATE_HIGH``         u32     threshold for high rate
102021727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_USECS_HIGH``         u32     delay (us), high Rx
102121727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH``    u32     max packets, high Rx
102221727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_USECS_HIGH``         u32     delay (us), high Tx
102321727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH``    u32     max packets, high Tx
102421727545SMichal Kubecek  ``ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL``  u32     rate sampling interval
1025029ee6b1SYufeng Mo  ``ETHTOOL_A_COALESCE_USE_CQE_TX``            bool    timer reset mode, Tx
1026029ee6b1SYufeng Mo  ``ETHTOOL_A_COALESCE_USE_CQE_RX``            bool    timer reset mode, Rx
102731de2842SDaniele Palmas  ``ETHTOOL_A_COALESCE_TX_AGGR_MAX_BYTES``     u32     max aggr size, Tx
102831de2842SDaniele Palmas  ``ETHTOOL_A_COALESCE_TX_AGGR_MAX_FRAMES``    u32     max aggr packets, Tx
102931de2842SDaniele Palmas  ``ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS``    u32     time (us), aggr, Tx
103021727545SMichal Kubecek  ===========================================  ======  =======================
103121727545SMichal Kubecek
103221727545SMichal KubecekAttributes are only included in reply if their value is not zero or the
103321727545SMichal Kubecekcorresponding bit in ``ethtool_ops::supported_coalesce_params`` is set (i.e.
103421727545SMichal Kubecekthey are declared as supported by driver).
103521727545SMichal Kubecek
1036029ee6b1SYufeng MoTimer reset mode (``ETHTOOL_A_COALESCE_USE_CQE_TX`` and
1037029ee6b1SYufeng Mo``ETHTOOL_A_COALESCE_USE_CQE_RX``) controls the interaction between packet
1038029ee6b1SYufeng Moarrival and the various time based delay parameters. By default timers are
1039029ee6b1SYufeng Moexpected to limit the max delay between any packet arrival/departure and a
1040029ee6b1SYufeng Mocorresponding interrupt. In this mode timer should be started by packet
1041029ee6b1SYufeng Moarrival (sometimes delivery of previous interrupt) and reset when interrupt
1042029ee6b1SYufeng Mois delivered.
1043029ee6b1SYufeng MoSetting the appropriate attribute to 1 will enable ``CQE`` mode, where
1044029ee6b1SYufeng Moeach packet event resets the timer. In this mode timer is used to force
1045029ee6b1SYufeng Mothe interrupt if queue goes idle, while busy queues depend on the packet
1046029ee6b1SYufeng Molimit to trigger interrupts.
104721727545SMichal Kubecek
104831de2842SDaniele PalmasTx aggregation consists of copying frames into a contiguous buffer so that they
104931de2842SDaniele Palmascan be submitted as a single IO operation. ``ETHTOOL_A_COALESCE_TX_AGGR_MAX_BYTES``
105031de2842SDaniele Palmasdescribes the maximum size in bytes for the submitted buffer.
105131de2842SDaniele Palmas``ETHTOOL_A_COALESCE_TX_AGGR_MAX_FRAMES`` describes the maximum number of frames
105231de2842SDaniele Palmasthat can be aggregated into a single buffer.
105331de2842SDaniele Palmas``ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS`` describes the amount of time in usecs,
105431de2842SDaniele Palmascounted since the first packet arrival in an aggregated block, after which the
105531de2842SDaniele Palmasblock should be sent.
105631de2842SDaniele PalmasThis feature is mainly of interest for specific USB devices which does not cope
105731de2842SDaniele Palmaswell with frequent small-sized URBs transmissions.
105831de2842SDaniele Palmas
10599881418cSMichal KubecekCOALESCE_SET
10609881418cSMichal Kubecek============
10619881418cSMichal Kubecek
10629881418cSMichal KubecekSets coalescing parameters like ``ETHTOOL_SCOALESCE`` ioctl request.
10639881418cSMichal Kubecek
10649881418cSMichal KubecekRequest contents:
10659881418cSMichal Kubecek
10669881418cSMichal Kubecek  ===========================================  ======  =======================
10679881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_HEADER``                nested  request header
10689881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_USECS``              u32     delay (us), normal Rx
10699881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES``         u32     max packets, normal Rx
10709881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_USECS_IRQ``          u32     delay (us), Rx in IRQ
10719881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ``     u32     max packets, Rx in IRQ
10729881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_USECS``              u32     delay (us), normal Tx
10739881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES``         u32     max packets, normal Tx
10749881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_USECS_IRQ``          u32     delay (us), Tx in IRQ
10759881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ``     u32     IRQ packets, Tx in IRQ
10769881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_STATS_BLOCK_USECS``     u32     delay of stats update
10779881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX``       bool    adaptive Rx coalesce
10789881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX``       bool    adaptive Tx coalesce
10799881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_PKT_RATE_LOW``          u32     threshold for low rate
10809881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_USECS_LOW``          u32     delay (us), low Rx
10819881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW``     u32     max packets, low Rx
10829881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_USECS_LOW``          u32     delay (us), low Tx
10839881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW``     u32     max packets, low Tx
10849881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_PKT_RATE_HIGH``         u32     threshold for high rate
10859881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_USECS_HIGH``         u32     delay (us), high Rx
10869881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH``    u32     max packets, high Rx
10879881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_USECS_HIGH``         u32     delay (us), high Tx
10889881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH``    u32     max packets, high Tx
10899881418cSMichal Kubecek  ``ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL``  u32     rate sampling interval
1090029ee6b1SYufeng Mo  ``ETHTOOL_A_COALESCE_USE_CQE_TX``            bool    timer reset mode, Tx
1091029ee6b1SYufeng Mo  ``ETHTOOL_A_COALESCE_USE_CQE_RX``            bool    timer reset mode, Rx
109231de2842SDaniele Palmas  ``ETHTOOL_A_COALESCE_TX_AGGR_MAX_BYTES``     u32     max aggr size, Tx
109331de2842SDaniele Palmas  ``ETHTOOL_A_COALESCE_TX_AGGR_MAX_FRAMES``    u32     max aggr packets, Tx
109431de2842SDaniele Palmas  ``ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS``    u32     time (us), aggr, Tx
10959881418cSMichal Kubecek  ===========================================  ======  =======================
10969881418cSMichal Kubecek
10979881418cSMichal KubecekRequest is rejected if it attributes declared as unsupported by driver (i.e.
10989881418cSMichal Kubeceksuch that the corresponding bit in ``ethtool_ops::supported_coalesce_params``
10999881418cSMichal Kubecekis not set), regardless of their values. Driver may impose additional
11009881418cSMichal Kubecekconstraints on coalescing parameters and their values.
11019881418cSMichal Kubecek
1102*00d0f31aSJakub KicinskiCompared to requests issued via the ``ioctl()`` netlink version of this request
1103*00d0f31aSJakub Kicinskiwill try harder to make sure that values specified by the user have been applied
1104*00d0f31aSJakub Kicinskiand may call the driver twice.
1105*00d0f31aSJakub Kicinski
11069881418cSMichal Kubecek
11077f59fb32SMichal KubecekPAUSE_GET
11085219d601SJakub Kicinski=========
11097f59fb32SMichal Kubecek
11105219d601SJakub KicinskiGets pause frame settings like ``ETHTOOL_GPAUSEPARAM`` ioctl request.
11117f59fb32SMichal Kubecek
11127f59fb32SMichal KubecekRequest contents:
11137f59fb32SMichal Kubecek
11147f59fb32SMichal Kubecek  =====================================  ======  ==========================
11157f59fb32SMichal Kubecek  ``ETHTOOL_A_PAUSE_HEADER``             nested  request header
1116c319df10SVladimir Oltean  ``ETHTOOL_A_PAUSE_STATS_SRC``          u32     source of statistics
11177f59fb32SMichal Kubecek  =====================================  ======  ==========================
11187f59fb32SMichal Kubecek
1119c319df10SVladimir Oltean``ETHTOOL_A_PAUSE_STATS_SRC`` is optional. It takes values from:
1120c319df10SVladimir Oltean
1121c319df10SVladimir Oltean.. kernel-doc:: include/uapi/linux/ethtool.h
1122c319df10SVladimir Oltean    :identifiers: ethtool_mac_stats_src
1123c319df10SVladimir Oltean
1124c319df10SVladimir OlteanIf absent from the request, stats will be provided with
1125c319df10SVladimir Olteanan ``ETHTOOL_A_PAUSE_STATS_SRC`` attribute in the response equal to
1126c319df10SVladimir Oltean``ETHTOOL_MAC_STATS_SRC_AGGREGATE``.
1127c319df10SVladimir Oltean
11287f59fb32SMichal KubecekKernel response contents:
11297f59fb32SMichal Kubecek
11307f59fb32SMichal Kubecek  =====================================  ======  ==========================
11317f59fb32SMichal Kubecek  ``ETHTOOL_A_PAUSE_HEADER``             nested  request header
11327f59fb32SMichal Kubecek  ``ETHTOOL_A_PAUSE_AUTONEG``            bool    pause autonegotiation
11337f59fb32SMichal Kubecek  ``ETHTOOL_A_PAUSE_RX``                 bool    receive pause frames
11347f59fb32SMichal Kubecek  ``ETHTOOL_A_PAUSE_TX``                 bool    transmit pause frames
11359a27a330SJakub Kicinski  ``ETHTOOL_A_PAUSE_STATS``              nested  pause statistics
11367f59fb32SMichal Kubecek  =====================================  ======  ==========================
11377f59fb32SMichal Kubecek
11389a27a330SJakub Kicinski``ETHTOOL_A_PAUSE_STATS`` are reported if ``ETHTOOL_FLAG_STATS`` was set
11399a27a330SJakub Kicinskiin ``ETHTOOL_A_HEADER_FLAGS``.
11409a27a330SJakub KicinskiIt will be empty if driver did not report any statistics. Drivers fill in
11419a27a330SJakub Kicinskithe statistics in the following structure:
11429a27a330SJakub Kicinski
11439a27a330SJakub Kicinski.. kernel-doc:: include/linux/ethtool.h
11449a27a330SJakub Kicinski    :identifiers: ethtool_pause_stats
11459a27a330SJakub Kicinski
11469a27a330SJakub KicinskiEach member has a corresponding attribute defined.
11477f59fb32SMichal Kubecek
11487f59fb32SMichal KubecekPAUSE_SET
11495219d601SJakub Kicinski=========
11507f59fb32SMichal Kubecek
11517f59fb32SMichal KubecekSets pause parameters like ``ETHTOOL_GPAUSEPARAM`` ioctl request.
11527f59fb32SMichal Kubecek
11537f59fb32SMichal KubecekRequest contents:
11547f59fb32SMichal Kubecek
11557f59fb32SMichal Kubecek  =====================================  ======  ==========================
11567f59fb32SMichal Kubecek  ``ETHTOOL_A_PAUSE_HEADER``             nested  request header
11577f59fb32SMichal Kubecek  ``ETHTOOL_A_PAUSE_AUTONEG``            bool    pause autonegotiation
11587f59fb32SMichal Kubecek  ``ETHTOOL_A_PAUSE_RX``                 bool    receive pause frames
11597f59fb32SMichal Kubecek  ``ETHTOOL_A_PAUSE_TX``                 bool    transmit pause frames
11607f59fb32SMichal Kubecek  =====================================  ======  ==========================
11617f59fb32SMichal Kubecek
11627f59fb32SMichal Kubecek
1163b7eeefe7SMichal KubecekEEE_GET
1164b7eeefe7SMichal Kubecek=======
1165b7eeefe7SMichal Kubecek
11665219d601SJakub KicinskiGets Energy Efficient Ethernet settings like ``ETHTOOL_GEEE`` ioctl request.
1167b7eeefe7SMichal Kubecek
1168b7eeefe7SMichal KubecekRequest contents:
1169b7eeefe7SMichal Kubecek
1170b7eeefe7SMichal Kubecek  =====================================  ======  ==========================
1171b7eeefe7SMichal Kubecek  ``ETHTOOL_A_EEE_HEADER``               nested  request header
1172b7eeefe7SMichal Kubecek  =====================================  ======  ==========================
1173b7eeefe7SMichal Kubecek
1174b7eeefe7SMichal KubecekKernel response contents:
1175b7eeefe7SMichal Kubecek
1176b7eeefe7SMichal Kubecek  =====================================  ======  ==========================
1177b7eeefe7SMichal Kubecek  ``ETHTOOL_A_EEE_HEADER``               nested  request header
1178b7eeefe7SMichal Kubecek  ``ETHTOOL_A_EEE_MODES_OURS``           bool    supported/advertised modes
1179b7eeefe7SMichal Kubecek  ``ETHTOOL_A_EEE_MODES_PEER``           bool    peer advertised link modes
1180b7eeefe7SMichal Kubecek  ``ETHTOOL_A_EEE_ACTIVE``               bool    EEE is actively used
1181b7eeefe7SMichal Kubecek  ``ETHTOOL_A_EEE_ENABLED``              bool    EEE is enabled
1182b7eeefe7SMichal Kubecek  ``ETHTOOL_A_EEE_TX_LPI_ENABLED``       bool    Tx lpi enabled
1183b7eeefe7SMichal Kubecek  ``ETHTOOL_A_EEE_TX_LPI_TIMER``         u32     Tx lpi timeout (in us)
1184b7eeefe7SMichal Kubecek  =====================================  ======  ==========================
1185b7eeefe7SMichal Kubecek
1186b7eeefe7SMichal KubecekIn ``ETHTOOL_A_EEE_MODES_OURS``, mask consists of link modes for which EEE is
1187b7eeefe7SMichal Kubecekenabled, value of link modes for which EEE is advertised. Link modes for which
1188b7eeefe7SMichal Kubecekpeer advertises EEE are listed in ``ETHTOOL_A_EEE_MODES_PEER`` (no mask). The
1189b7eeefe7SMichal Kubeceknetlink interface allows reporting EEE status for all link modes but only
1190b7eeefe7SMichal Kubecekfirst 32 are provided by the ``ethtool_ops`` callback.
1191b7eeefe7SMichal Kubecek
1192b7eeefe7SMichal Kubecek
1193fd77be7bSMichal KubecekEEE_SET
1194fd77be7bSMichal Kubecek=======
1195fd77be7bSMichal Kubecek
11965219d601SJakub KicinskiSets Energy Efficient Ethernet parameters like ``ETHTOOL_SEEE`` ioctl request.
1197fd77be7bSMichal Kubecek
1198fd77be7bSMichal KubecekRequest contents:
1199fd77be7bSMichal Kubecek
1200fd77be7bSMichal Kubecek  =====================================  ======  ==========================
1201fd77be7bSMichal Kubecek  ``ETHTOOL_A_EEE_HEADER``               nested  request header
1202fd77be7bSMichal Kubecek  ``ETHTOOL_A_EEE_MODES_OURS``           bool    advertised modes
1203fd77be7bSMichal Kubecek  ``ETHTOOL_A_EEE_ENABLED``              bool    EEE is enabled
1204fd77be7bSMichal Kubecek  ``ETHTOOL_A_EEE_TX_LPI_ENABLED``       bool    Tx lpi enabled
1205fd77be7bSMichal Kubecek  ``ETHTOOL_A_EEE_TX_LPI_TIMER``         u32     Tx lpi timeout (in us)
1206fd77be7bSMichal Kubecek  =====================================  ======  ==========================
1207fd77be7bSMichal Kubecek
1208fd77be7bSMichal Kubecek``ETHTOOL_A_EEE_MODES_OURS`` is used to either list link modes to advertise
1209fd77be7bSMichal KubecekEEE for (if there is no mask) or specify changes to the list (if there is
1210fd77be7bSMichal Kubeceka mask). The netlink interface allows reporting EEE status for all link modes
1211fd77be7bSMichal Kubecekbut only first 32 can be set at the moment as that is what the ``ethtool_ops``
1212fd77be7bSMichal Kubecekcallback supports.
1213fd77be7bSMichal Kubecek
1214fd77be7bSMichal Kubecek
12155b071c59SMichal KubecekTSINFO_GET
12165b071c59SMichal Kubecek==========
12175b071c59SMichal Kubecek
12185b071c59SMichal KubecekGets timestamping information like ``ETHTOOL_GET_TS_INFO`` ioctl request.
12195b071c59SMichal Kubecek
12205b071c59SMichal KubecekRequest contents:
12215b071c59SMichal Kubecek
12225b071c59SMichal Kubecek  =====================================  ======  ==========================
12235b071c59SMichal Kubecek  ``ETHTOOL_A_TSINFO_HEADER``            nested  request header
12245b071c59SMichal Kubecek  =====================================  ======  ==========================
12255b071c59SMichal Kubecek
12265b071c59SMichal KubecekKernel response contents:
12275b071c59SMichal Kubecek
12285b071c59SMichal Kubecek  =====================================  ======  ==========================
12295b071c59SMichal Kubecek  ``ETHTOOL_A_TSINFO_HEADER``            nested  request header
12305b071c59SMichal Kubecek  ``ETHTOOL_A_TSINFO_TIMESTAMPING``      bitset  SO_TIMESTAMPING flags
12315b071c59SMichal Kubecek  ``ETHTOOL_A_TSINFO_TX_TYPES``          bitset  supported Tx types
12325b071c59SMichal Kubecek  ``ETHTOOL_A_TSINFO_RX_FILTERS``        bitset  supported Rx filters
12335b071c59SMichal Kubecek  ``ETHTOOL_A_TSINFO_PHC_INDEX``         u32     PTP hw clock index
12345b071c59SMichal Kubecek  =====================================  ======  ==========================
12355b071c59SMichal Kubecek
12365b071c59SMichal Kubecek``ETHTOOL_A_TSINFO_PHC_INDEX`` is absent if there is no associated PHC (there
12375b071c59SMichal Kubecekis no special value for this case). The bitset attributes are omitted if they
12385b071c59SMichal Kubecekwould be empty (no bit set).
12395b071c59SMichal Kubecek
124011ca3c42SAndrew LunnCABLE_TEST
124111ca3c42SAndrew Lunn==========
124211ca3c42SAndrew Lunn
124311ca3c42SAndrew LunnStart a cable test.
124411ca3c42SAndrew Lunn
124511ca3c42SAndrew LunnRequest contents:
124611ca3c42SAndrew Lunn
124711ca3c42SAndrew Lunn  ====================================  ======  ==========================
124811ca3c42SAndrew Lunn  ``ETHTOOL_A_CABLE_TEST_HEADER``       nested  request header
124911ca3c42SAndrew Lunn  ====================================  ======  ==========================
125011ca3c42SAndrew Lunn
1251b28efb93SAndrew LunnNotification contents:
1252b28efb93SAndrew Lunn
1253b28efb93SAndrew LunnAn Ethernet cable typically contains 1, 2 or 4 pairs. The length of
1254b28efb93SAndrew Lunnthe pair can only be measured when there is a fault in the pair and
1255b28efb93SAndrew Lunnhence a reflection. Information about the fault may not be available,
1256b28efb93SAndrew Lunndepending on the specific hardware. Hence the contents of the notify
1257b28efb93SAndrew Lunnmessage are mostly optional. The attributes can be repeated an
1258b28efb93SAndrew Lunnarbitrary number of times, in an arbitrary order, for an arbitrary
1259b28efb93SAndrew Lunnnumber of pairs.
1260b28efb93SAndrew Lunn
1261b28efb93SAndrew LunnThe example shows the notification sent when the test is completed for
1262b28efb93SAndrew Lunna T2 cable, i.e. two pairs. One pair is OK and hence has no length
1263b28efb93SAndrew Lunninformation. The second pair has a fault and does have length
1264b28efb93SAndrew Lunninformation.
1265b28efb93SAndrew Lunn
1266b28efb93SAndrew Lunn +---------------------------------------------+--------+---------------------+
1267b28efb93SAndrew Lunn | ``ETHTOOL_A_CABLE_TEST_HEADER``             | nested | reply header        |
1268b28efb93SAndrew Lunn +---------------------------------------------+--------+---------------------+
1269b28efb93SAndrew Lunn | ``ETHTOOL_A_CABLE_TEST_STATUS``             | u8     | completed           |
1270b28efb93SAndrew Lunn +---------------------------------------------+--------+---------------------+
1271b28efb93SAndrew Lunn | ``ETHTOOL_A_CABLE_TEST_NTF_NEST``           | nested | all the results     |
1272b28efb93SAndrew Lunn +-+-------------------------------------------+--------+---------------------+
1273b28efb93SAndrew Lunn | | ``ETHTOOL_A_CABLE_NEST_RESULT``           | nested | cable test result   |
1274b28efb93SAndrew Lunn +-+-+-----------------------------------------+--------+---------------------+
1275b28efb93SAndrew Lunn | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR``        | u8     | pair number         |
1276b28efb93SAndrew Lunn +-+-+-----------------------------------------+--------+---------------------+
1277b28efb93SAndrew Lunn | | | ``ETHTOOL_A_CABLE_RESULTS_CODE``        | u8     | result code         |
1278b28efb93SAndrew Lunn +-+-+-----------------------------------------+--------+---------------------+
1279b28efb93SAndrew Lunn | | ``ETHTOOL_A_CABLE_NEST_RESULT``           | nested | cable test results  |
1280b28efb93SAndrew Lunn +-+-+-----------------------------------------+--------+---------------------+
1281b28efb93SAndrew Lunn | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR``        | u8     | pair number         |
1282b28efb93SAndrew Lunn +-+-+-----------------------------------------+--------+---------------------+
1283b28efb93SAndrew Lunn | | | ``ETHTOOL_A_CABLE_RESULTS_CODE``        | u8     | result code         |
1284b28efb93SAndrew Lunn +-+-+-----------------------------------------+--------+---------------------+
1285b28efb93SAndrew Lunn | | ``ETHTOOL_A_CABLE_NEST_FAULT_LENGTH``     | nested | cable length        |
1286b28efb93SAndrew Lunn +-+-+-----------------------------------------+--------+---------------------+
1287b28efb93SAndrew Lunn | | | ``ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR``   | u8     | pair number         |
1288b28efb93SAndrew Lunn +-+-+-----------------------------------------+--------+---------------------+
1289b28efb93SAndrew Lunn | | | ``ETHTOOL_A_CABLE_FAULT_LENGTH_CM``     | u32    | length in cm        |
1290b28efb93SAndrew Lunn +-+-+-----------------------------------------+--------+---------------------+
12915b071c59SMichal Kubecek
1292a331172bSAndrew LunnCABLE_TEST TDR
1293a331172bSAndrew Lunn==============
1294a331172bSAndrew Lunn
1295a331172bSAndrew LunnStart a cable test and report raw TDR data
1296a331172bSAndrew Lunn
1297a331172bSAndrew LunnRequest contents:
1298a331172bSAndrew Lunn
1299f2bc8ad3SAndrew Lunn +--------------------------------------------+--------+-----------------------+
1300f2bc8ad3SAndrew Lunn | ``ETHTOOL_A_CABLE_TEST_TDR_HEADER``        | nested | reply header          |
1301f2bc8ad3SAndrew Lunn +--------------------------------------------+--------+-----------------------+
1302f2bc8ad3SAndrew Lunn | ``ETHTOOL_A_CABLE_TEST_TDR_CFG``           | nested | test configuration    |
1303f2bc8ad3SAndrew Lunn +-+------------------------------------------+--------+-----------------------+
1304f2bc8ad3SAndrew Lunn | | ``ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE``  | u32    | first data distance   |
1305f2bc8ad3SAndrew Lunn +-+-+----------------------------------------+--------+-----------------------+
1306f2bc8ad3SAndrew Lunn | | ``ETHTOOL_A_CABLE_STEP_LAST_DISTANCE``   | u32    | last data distance    |
1307f2bc8ad3SAndrew Lunn +-+-+----------------------------------------+--------+-----------------------+
1308f2bc8ad3SAndrew Lunn | | ``ETHTOOL_A_CABLE_STEP_STEP_DISTANCE``   | u32    | distance of each step |
1309f2bc8ad3SAndrew Lunn +-+-+----------------------------------------+--------+-----------------------+
1310f2bc8ad3SAndrew Lunn | | ``ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR``    | u8     | pair to test          |
1311f2bc8ad3SAndrew Lunn +-+-+----------------------------------------+--------+-----------------------+
1312f2bc8ad3SAndrew Lunn
1313f2bc8ad3SAndrew LunnThe ETHTOOL_A_CABLE_TEST_TDR_CFG is optional, as well as all members
1314f2bc8ad3SAndrew Lunnof the nest. All distances are expressed in centimeters. The PHY takes
1315f2bc8ad3SAndrew Lunnthe distances as a guide, and rounds to the nearest distance it
1316f2bc8ad3SAndrew Lunnactually supports. If a pair is passed, only that one pair will be
1317f2bc8ad3SAndrew Lunntested. Otherwise all pairs are tested.
1318a331172bSAndrew Lunn
1319a331172bSAndrew LunnNotification contents:
1320a331172bSAndrew Lunn
1321a331172bSAndrew LunnRaw TDR data is gathered by sending a pulse down the cable and
1322a331172bSAndrew Lunnrecording the amplitude of the reflected pulse for a given distance.
1323a331172bSAndrew Lunn
1324a331172bSAndrew LunnIt can take a number of seconds to collect TDR data, especial if the
1325a331172bSAndrew Lunnfull 100 meters is probed at 1 meter intervals. When the test is
1326a331172bSAndrew Lunnstarted a notification will be sent containing just
1327a331172bSAndrew LunnETHTOOL_A_CABLE_TEST_TDR_STATUS with the value
1328a331172bSAndrew LunnETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED.
1329a331172bSAndrew Lunn
1330a331172bSAndrew LunnWhen the test has completed a second notification will be sent
1331a331172bSAndrew Lunncontaining ETHTOOL_A_CABLE_TEST_TDR_STATUS with the value
1332a331172bSAndrew LunnETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED and the TDR data.
1333a331172bSAndrew Lunn
1334a331172bSAndrew LunnThe message may optionally contain the amplitude of the pulse send
1335a331172bSAndrew Lunndown the cable. This is measured in mV. A reflection should not be
1336a331172bSAndrew Lunnbigger than transmitted pulse.
1337a331172bSAndrew Lunn
1338a331172bSAndrew LunnBefore the raw TDR data should be an ETHTOOL_A_CABLE_TDR_NEST_STEP
1339a331172bSAndrew Lunnnest containing information about the distance along the cable for the
1340a331172bSAndrew Lunnfirst reading, the last reading, and the step between each
1341a331172bSAndrew Lunnreading. Distances are measured in centimeters. These should be the
1342a331172bSAndrew Lunnexact values the PHY used. These may be different to what the user
1343a331172bSAndrew Lunnrequested, if the native measurement resolution is greater than 1 cm.
1344a331172bSAndrew Lunn
1345a331172bSAndrew LunnFor each step along the cable, a ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE is
1346a331172bSAndrew Lunnused to report the amplitude of the reflection for a given pair.
1347a331172bSAndrew Lunn
1348a331172bSAndrew Lunn +---------------------------------------------+--------+----------------------+
1349a331172bSAndrew Lunn | ``ETHTOOL_A_CABLE_TEST_TDR_HEADER``         | nested | reply header         |
1350a331172bSAndrew Lunn +---------------------------------------------+--------+----------------------+
1351a331172bSAndrew Lunn | ``ETHTOOL_A_CABLE_TEST_TDR_STATUS``         | u8     | completed            |
1352a331172bSAndrew Lunn +---------------------------------------------+--------+----------------------+
1353a331172bSAndrew Lunn | ``ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST``       | nested | all the results      |
1354a331172bSAndrew Lunn +-+-------------------------------------------+--------+----------------------+
1355a331172bSAndrew Lunn | | ``ETHTOOL_A_CABLE_TDR_NEST_PULSE``        | nested | TX Pulse amplitude   |
1356a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1357a331172bSAndrew Lunn | | | ``ETHTOOL_A_CABLE_PULSE_mV``            | s16    | Pulse amplitude      |
1358a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1359a331172bSAndrew Lunn | | ``ETHTOOL_A_CABLE_NEST_STEP``             | nested | TDR step info        |
1360a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1361a331172bSAndrew Lunn | | | ``ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE`` | u32    | First data distance  |
1362a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1363a331172bSAndrew Lunn | | | ``ETHTOOL_A_CABLE_STEP_LAST_DISTANCE``  | u32    | Last data distance   |
1364a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1365a331172bSAndrew Lunn | | | ``ETHTOOL_A_CABLE_STEP_STEP_DISTANCE``  | u32    | distance of each step|
1366a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1367a331172bSAndrew Lunn | | ``ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE``    | nested | Reflection amplitude |
1368a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1369a331172bSAndrew Lunn | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR``        | u8     | pair number          |
1370a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1371a331172bSAndrew Lunn | | | ``ETHTOOL_A_CABLE_AMPLITUDE_mV``        | s16    | Reflection amplitude |
1372a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1373a331172bSAndrew Lunn | | ``ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE``    | nested | Reflection amplitude |
1374a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1375a331172bSAndrew Lunn | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR``        | u8     | pair number          |
1376a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1377a331172bSAndrew Lunn | | | ``ETHTOOL_A_CABLE_AMPLITUDE_mV``        | s16    | Reflection amplitude |
1378a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1379a331172bSAndrew Lunn | | ``ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE``    | nested | Reflection amplitude |
1380a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1381a331172bSAndrew Lunn | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR``        | u8     | pair number          |
1382a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1383a331172bSAndrew Lunn | | | ``ETHTOOL_A_CABLE_AMPLITUDE_mV``        | s16    | Reflection amplitude |
1384a331172bSAndrew Lunn +-+-+-----------------------------------------+--------+----------------------+
1385a331172bSAndrew Lunn
1386c7d759ebSJakub KicinskiTUNNEL_INFO
1387c7d759ebSJakub Kicinski===========
1388c7d759ebSJakub Kicinski
1389c7d759ebSJakub KicinskiGets information about the tunnel state NIC is aware of.
1390c7d759ebSJakub Kicinski
1391c7d759ebSJakub KicinskiRequest contents:
1392c7d759ebSJakub Kicinski
1393c7d759ebSJakub Kicinski  =====================================  ======  ==========================
1394c7d759ebSJakub Kicinski  ``ETHTOOL_A_TUNNEL_INFO_HEADER``       nested  request header
1395c7d759ebSJakub Kicinski  =====================================  ======  ==========================
1396c7d759ebSJakub Kicinski
1397c7d759ebSJakub KicinskiKernel response contents:
1398c7d759ebSJakub Kicinski
1399c7d759ebSJakub Kicinski +---------------------------------------------+--------+---------------------+
1400c7d759ebSJakub Kicinski | ``ETHTOOL_A_TUNNEL_INFO_HEADER``            | nested | reply header        |
1401c7d759ebSJakub Kicinski +---------------------------------------------+--------+---------------------+
1402c7d759ebSJakub Kicinski | ``ETHTOOL_A_TUNNEL_INFO_UDP_PORTS``         | nested | all UDP port tables |
1403c7d759ebSJakub Kicinski +-+-------------------------------------------+--------+---------------------+
1404c7d759ebSJakub Kicinski | | ``ETHTOOL_A_TUNNEL_UDP_TABLE``            | nested | one UDP port table  |
1405c7d759ebSJakub Kicinski +-+-+-----------------------------------------+--------+---------------------+
1406c7d759ebSJakub Kicinski | | | ``ETHTOOL_A_TUNNEL_UDP_TABLE_SIZE``     | u32    | max size of the     |
1407c7d759ebSJakub Kicinski | | |                                         |        | table               |
1408c7d759ebSJakub Kicinski +-+-+-----------------------------------------+--------+---------------------+
1409c7d759ebSJakub Kicinski | | | ``ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES``    | bitset | tunnel types which  |
1410c7d759ebSJakub Kicinski | | |                                         |        | table can hold      |
1411c7d759ebSJakub Kicinski +-+-+-----------------------------------------+--------+---------------------+
1412c7d759ebSJakub Kicinski | | | ``ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY``    | nested | offloaded UDP port  |
1413c7d759ebSJakub Kicinski +-+-+-+---------------------------------------+--------+---------------------+
1414c7d759ebSJakub Kicinski | | | | ``ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT``   | be16   | UDP port            |
1415c7d759ebSJakub Kicinski +-+-+-+---------------------------------------+--------+---------------------+
1416c7d759ebSJakub Kicinski | | | | ``ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE``   | u32    | tunnel type         |
1417c7d759ebSJakub Kicinski +-+-+-+---------------------------------------+--------+---------------------+
1418c7d759ebSJakub Kicinski
1419966e5059SJakub KicinskiFor UDP tunnel table empty ``ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES`` indicates that
1420966e5059SJakub Kicinskithe table contains static entries, hard-coded by the NIC.
1421966e5059SJakub Kicinski
14221e5d1f69SJakub KicinskiFEC_GET
14231e5d1f69SJakub Kicinski=======
14241e5d1f69SJakub Kicinski
14251e5d1f69SJakub KicinskiGets FEC configuration and state like ``ETHTOOL_GFECPARAM`` ioctl request.
14261e5d1f69SJakub Kicinski
14271e5d1f69SJakub KicinskiRequest contents:
14281e5d1f69SJakub Kicinski
14291e5d1f69SJakub Kicinski  =====================================  ======  ==========================
14301e5d1f69SJakub Kicinski  ``ETHTOOL_A_FEC_HEADER``               nested  request header
14311e5d1f69SJakub Kicinski  =====================================  ======  ==========================
14321e5d1f69SJakub Kicinski
14331e5d1f69SJakub KicinskiKernel response contents:
14341e5d1f69SJakub Kicinski
14351e5d1f69SJakub Kicinski  =====================================  ======  ==========================
14361e5d1f69SJakub Kicinski  ``ETHTOOL_A_FEC_HEADER``               nested  request header
14371e5d1f69SJakub Kicinski  ``ETHTOOL_A_FEC_MODES``                bitset  configured modes
14381e5d1f69SJakub Kicinski  ``ETHTOOL_A_FEC_AUTO``                 bool    FEC mode auto selection
14391e5d1f69SJakub Kicinski  ``ETHTOOL_A_FEC_ACTIVE``               u32     index of active FEC mode
1440be85dbfeSJakub Kicinski  ``ETHTOOL_A_FEC_STATS``                nested  FEC statistics
14411e5d1f69SJakub Kicinski  =====================================  ======  ==========================
14421e5d1f69SJakub Kicinski
14431e5d1f69SJakub Kicinski``ETHTOOL_A_FEC_ACTIVE`` is the bit index of the FEC link mode currently
14441e5d1f69SJakub Kicinskiactive on the interface. This attribute may not be present if device does
14451e5d1f69SJakub Kicinskinot support FEC.
14461e5d1f69SJakub Kicinski
14471e5d1f69SJakub Kicinski``ETHTOOL_A_FEC_MODES`` and ``ETHTOOL_A_FEC_AUTO`` are only meaningful when
14481e5d1f69SJakub Kicinskiautonegotiation is disabled. If ``ETHTOOL_A_FEC_AUTO`` is non-zero driver will
14491e5d1f69SJakub Kicinskiselect the FEC mode automatically based on the parameters of the SFP module.
14501e5d1f69SJakub KicinskiThis is equivalent to the ``ETHTOOL_FEC_AUTO`` bit of the ioctl interface.
14511e5d1f69SJakub Kicinski``ETHTOOL_A_FEC_MODES`` carry the current FEC configuration using link mode
14521e5d1f69SJakub Kicinskibits (rather than old ``ETHTOOL_FEC_*`` bits).
14531e5d1f69SJakub Kicinski
1454be85dbfeSJakub Kicinski``ETHTOOL_A_FEC_STATS`` are reported if ``ETHTOOL_FLAG_STATS`` was set in
1455be85dbfeSJakub Kicinski``ETHTOOL_A_HEADER_FLAGS``.
1456be85dbfeSJakub KicinskiEach attribute carries an array of 64bit statistics. First entry in the array
1457be85dbfeSJakub Kicinskicontains the total number of events on the port, while the following entries
1458be85dbfeSJakub Kicinskiare counters corresponding to lanes/PCS instances. The number of entries in
1459be85dbfeSJakub Kicinskithe array will be:
1460be85dbfeSJakub Kicinski
1461be85dbfeSJakub Kicinski+--------------+---------------------------------------------+
1462be85dbfeSJakub Kicinski| `0`          | device does not support FEC statistics      |
1463be85dbfeSJakub Kicinski+--------------+---------------------------------------------+
1464be85dbfeSJakub Kicinski| `1`          | device does not support per-lane break down |
1465be85dbfeSJakub Kicinski+--------------+---------------------------------------------+
1466be85dbfeSJakub Kicinski| `1 + #lanes` | device has full support for FEC stats       |
1467be85dbfeSJakub Kicinski+--------------+---------------------------------------------+
1468be85dbfeSJakub Kicinski
1469be85dbfeSJakub KicinskiDrivers fill in the statistics in the following structure:
1470be85dbfeSJakub Kicinski
1471be85dbfeSJakub Kicinski.. kernel-doc:: include/linux/ethtool.h
1472be85dbfeSJakub Kicinski    :identifiers: ethtool_fec_stats
1473be85dbfeSJakub Kicinski
14741e5d1f69SJakub KicinskiFEC_SET
14751e5d1f69SJakub Kicinski=======
14761e5d1f69SJakub Kicinski
14771e5d1f69SJakub KicinskiSets FEC parameters like ``ETHTOOL_SFECPARAM`` ioctl request.
14781e5d1f69SJakub Kicinski
14791e5d1f69SJakub KicinskiRequest contents:
14801e5d1f69SJakub Kicinski
14811e5d1f69SJakub Kicinski  =====================================  ======  ==========================
14821e5d1f69SJakub Kicinski  ``ETHTOOL_A_FEC_HEADER``               nested  request header
14831e5d1f69SJakub Kicinski  ``ETHTOOL_A_FEC_MODES``                bitset  configured modes
14841e5d1f69SJakub Kicinski  ``ETHTOOL_A_FEC_AUTO``                 bool    FEC mode auto selection
14851e5d1f69SJakub Kicinski  =====================================  ======  ==========================
14861e5d1f69SJakub Kicinski
14871e5d1f69SJakub Kicinski``FEC_SET`` is only meaningful when autonegotiation is disabled. Otherwise
14881e5d1f69SJakub KicinskiFEC mode is selected as part of autonegotiation.
14891e5d1f69SJakub Kicinski
14901e5d1f69SJakub Kicinski``ETHTOOL_A_FEC_MODES`` selects which FEC mode should be used. It's recommended
14911e5d1f69SJakub Kicinskito set only one bit, if multiple bits are set driver may choose between them
14921e5d1f69SJakub Kicinskiin an implementation specific way.
14931e5d1f69SJakub Kicinski
14941e5d1f69SJakub Kicinski``ETHTOOL_A_FEC_AUTO`` requests the driver to choose FEC mode based on SFP
14951e5d1f69SJakub Kicinskimodule parameters. This does not mean autonegotiation.
14961e5d1f69SJakub Kicinski
149778c57f22SIdo SchimmelMODULE_EEPROM_GET
149878c57f22SIdo Schimmel=================
1499c781ff12SVladyslav Tarasiuk
1500c781ff12SVladyslav TarasiukFetch module EEPROM data dump.
1501c781ff12SVladyslav TarasiukThis interface is designed to allow dumps of at most 1/2 page at once. This
1502c781ff12SVladyslav Tarasiukmeans only dumps of 128 (or less) bytes are allowed, without crossing half page
1503c781ff12SVladyslav Tarasiukboundary located at offset 128. For pages other than 0 only high 128 bytes are
1504c781ff12SVladyslav Tarasiukaccessible.
1505c781ff12SVladyslav Tarasiuk
1506c781ff12SVladyslav TarasiukRequest contents:
1507c781ff12SVladyslav Tarasiuk
1508c781ff12SVladyslav Tarasiuk  =======================================  ======  ==========================
1509c781ff12SVladyslav Tarasiuk  ``ETHTOOL_A_MODULE_EEPROM_HEADER``       nested  request header
1510c781ff12SVladyslav Tarasiuk  ``ETHTOOL_A_MODULE_EEPROM_OFFSET``       u32     offset within a page
1511c781ff12SVladyslav Tarasiuk  ``ETHTOOL_A_MODULE_EEPROM_LENGTH``       u32     amount of bytes to read
1512c781ff12SVladyslav Tarasiuk  ``ETHTOOL_A_MODULE_EEPROM_PAGE``         u8      page number
1513c781ff12SVladyslav Tarasiuk  ``ETHTOOL_A_MODULE_EEPROM_BANK``         u8      bank number
1514c781ff12SVladyslav Tarasiuk  ``ETHTOOL_A_MODULE_EEPROM_I2C_ADDRESS``  u8      page I2C address
1515c781ff12SVladyslav Tarasiuk  =======================================  ======  ==========================
1516c781ff12SVladyslav Tarasiuk
151737a025e8SIdo SchimmelIf ``ETHTOOL_A_MODULE_EEPROM_BANK`` is not specified, bank 0 is assumed.
151837a025e8SIdo Schimmel
1519c781ff12SVladyslav TarasiukKernel response contents:
1520c781ff12SVladyslav Tarasiuk
1521c781ff12SVladyslav Tarasiuk +---------------------------------------------+--------+---------------------+
1522c781ff12SVladyslav Tarasiuk | ``ETHTOOL_A_MODULE_EEPROM_HEADER``          | nested | reply header        |
1523c781ff12SVladyslav Tarasiuk +---------------------------------------------+--------+---------------------+
1524913d026fSIdo Schimmel | ``ETHTOOL_A_MODULE_EEPROM_DATA``            | binary | array of bytes from |
1525c781ff12SVladyslav Tarasiuk |                                             |        | module EEPROM       |
1526c781ff12SVladyslav Tarasiuk +---------------------------------------------+--------+---------------------+
1527c781ff12SVladyslav Tarasiuk
1528c781ff12SVladyslav Tarasiuk``ETHTOOL_A_MODULE_EEPROM_DATA`` has an attribute length equal to the amount of
1529c781ff12SVladyslav Tarasiukbytes driver actually read.
1530c781ff12SVladyslav Tarasiuk
1531ddc78b36SJakub KicinskiSTATS_GET
1532ddc78b36SJakub Kicinski=========
1533ddc78b36SJakub Kicinski
1534ddc78b36SJakub KicinskiGet standard statistics for the interface. Note that this is not
1535ddc78b36SJakub Kicinskia re-implementation of ``ETHTOOL_GSTATS`` which exposed driver-defined
1536ddc78b36SJakub Kicinskistats.
1537ddc78b36SJakub Kicinski
1538ddc78b36SJakub KicinskiRequest contents:
1539ddc78b36SJakub Kicinski
1540ddc78b36SJakub Kicinski  =======================================  ======  ==========================
1541ddc78b36SJakub Kicinski  ``ETHTOOL_A_STATS_HEADER``               nested  request header
1542c319df10SVladimir Oltean  ``ETHTOOL_A_STATS_SRC``                  u32     source of statistics
1543ddc78b36SJakub Kicinski  ``ETHTOOL_A_STATS_GROUPS``               bitset  requested groups of stats
1544ddc78b36SJakub Kicinski  =======================================  ======  ==========================
1545ddc78b36SJakub Kicinski
1546ddc78b36SJakub KicinskiKernel response contents:
1547ddc78b36SJakub Kicinski
1548ddc78b36SJakub Kicinski +-----------------------------------+--------+--------------------------------+
1549ddc78b36SJakub Kicinski | ``ETHTOOL_A_STATS_HEADER``        | nested | reply header                   |
1550ddc78b36SJakub Kicinski +-----------------------------------+--------+--------------------------------+
1551c319df10SVladimir Oltean | ``ETHTOOL_A_STATS_SRC``           | u32    | source of statistics           |
1552c319df10SVladimir Oltean +-----------------------------------+--------+--------------------------------+
1553ddc78b36SJakub Kicinski | ``ETHTOOL_A_STATS_GRP``           | nested | one or more group of stats     |
1554ddc78b36SJakub Kicinski +-+---------------------------------+--------+--------------------------------+
1555ddc78b36SJakub Kicinski | | ``ETHTOOL_A_STATS_GRP_ID``      | u32    | group ID - ``ETHTOOL_STATS_*`` |
1556ddc78b36SJakub Kicinski +-+---------------------------------+--------+--------------------------------+
1557ddc78b36SJakub Kicinski | | ``ETHTOOL_A_STATS_GRP_SS_ID``   | u32    | string set ID for names        |
1558ddc78b36SJakub Kicinski +-+---------------------------------+--------+--------------------------------+
1559ddc78b36SJakub Kicinski | | ``ETHTOOL_A_STATS_GRP_STAT``    | nested | nest containing a statistic    |
1560ddc78b36SJakub Kicinski +-+---------------------------------+--------+--------------------------------+
1561ddc78b36SJakub Kicinski | | ``ETHTOOL_A_STATS_GRP_HIST_RX`` | nested | histogram statistic (Rx)       |
1562ddc78b36SJakub Kicinski +-+---------------------------------+--------+--------------------------------+
1563ddc78b36SJakub Kicinski | | ``ETHTOOL_A_STATS_GRP_HIST_TX`` | nested | histogram statistic (Tx)       |
1564ddc78b36SJakub Kicinski +-+---------------------------------+--------+--------------------------------+
1565ddc78b36SJakub Kicinski
1566ddc78b36SJakub KicinskiUsers specify which groups of statistics they are requesting via
1567ddc78b36SJakub Kicinskithe ``ETHTOOL_A_STATS_GROUPS`` bitset. Currently defined values are:
1568ddc78b36SJakub Kicinski
1569ddc78b36SJakub Kicinski ====================== ======== ===============================================
1570ddc78b36SJakub Kicinski ETHTOOL_STATS_ETH_MAC  eth-mac  Basic IEEE 802.3 MAC statistics (30.3.1.1.*)
1571ddc78b36SJakub Kicinski ETHTOOL_STATS_ETH_PHY  eth-phy  Basic IEEE 802.3 PHY statistics (30.3.2.1.*)
1572ddc78b36SJakub Kicinski ETHTOOL_STATS_ETH_CTRL eth-ctrl Basic IEEE 802.3 MAC Ctrl statistics (30.3.3.*)
1573ddc78b36SJakub Kicinski ETHTOOL_STATS_RMON     rmon     RMON (RFC 2819) statistics
1574ddc78b36SJakub Kicinski ====================== ======== ===============================================
1575ddc78b36SJakub Kicinski
1576ddc78b36SJakub KicinskiEach group should have a corresponding ``ETHTOOL_A_STATS_GRP`` in the reply.
1577ddc78b36SJakub Kicinski``ETHTOOL_A_STATS_GRP_ID`` identifies which group's statistics nest contains.
1578ddc78b36SJakub Kicinski``ETHTOOL_A_STATS_GRP_SS_ID`` identifies the string set ID for the names of
1579ddc78b36SJakub Kicinskithe statistics in the group, if available.
1580ddc78b36SJakub Kicinski
1581ddc78b36SJakub KicinskiStatistics are added to the ``ETHTOOL_A_STATS_GRP`` nest under
1582ddc78b36SJakub Kicinski``ETHTOOL_A_STATS_GRP_STAT``. ``ETHTOOL_A_STATS_GRP_STAT`` should contain
1583ddc78b36SJakub Kicinskisingle 8 byte (u64) attribute inside - the type of that attribute is
1584ddc78b36SJakub Kicinskithe statistic ID and the value is the value of the statistic.
1585ddc78b36SJakub KicinskiEach group has its own interpretation of statistic IDs.
1586ddc78b36SJakub KicinskiAttribute IDs correspond to strings from the string set identified
1587ddc78b36SJakub Kicinskiby ``ETHTOOL_A_STATS_GRP_SS_ID``. Complex statistics (such as RMON histogram
1588ddc78b36SJakub Kicinskientries) are also listed inside ``ETHTOOL_A_STATS_GRP`` and do not have
1589ddc78b36SJakub Kicinskia string defined in the string set.
1590ddc78b36SJakub Kicinski
1591ddc78b36SJakub KicinskiRMON "histogram" counters count number of packets within given size range.
1592ddc78b36SJakub KicinskiBecause RFC does not specify the ranges beyond the standard 1518 MTU devices
1593ddc78b36SJakub Kicinskidiffer in definition of buckets. For this reason the definition of packet ranges
1594ddc78b36SJakub Kicinskiis left to each driver.
1595ddc78b36SJakub Kicinski
1596ddc78b36SJakub Kicinski``ETHTOOL_A_STATS_GRP_HIST_RX`` and ``ETHTOOL_A_STATS_GRP_HIST_TX`` nests
1597ddc78b36SJakub Kicinskicontain the following attributes:
1598ddc78b36SJakub Kicinski
1599ddc78b36SJakub Kicinski ================================= ====== ===================================
1600ddc78b36SJakub Kicinski ETHTOOL_A_STATS_RMON_HIST_BKT_LOW u32    low bound of the packet size bucket
1601ddc78b36SJakub Kicinski ETHTOOL_A_STATS_RMON_HIST_BKT_HI  u32    high bound of the bucket
1602ddc78b36SJakub Kicinski ETHTOOL_A_STATS_RMON_HIST_VAL     u64    packet counter
1603ddc78b36SJakub Kicinski ================================= ====== ===================================
1604ddc78b36SJakub Kicinski
1605ddc78b36SJakub KicinskiLow and high bounds are inclusive, for example:
1606ddc78b36SJakub Kicinski
1607ddc78b36SJakub Kicinski ============================= ==== ====
1608ddc78b36SJakub Kicinski RFC statistic                 low  high
1609ddc78b36SJakub Kicinski ============================= ==== ====
1610ddc78b36SJakub Kicinski etherStatsPkts64Octets          0    64
1611ddc78b36SJakub Kicinski etherStatsPkts512to1023Octets 512  1023
1612ddc78b36SJakub Kicinski ============================= ==== ====
1613ddc78b36SJakub Kicinski
1614c319df10SVladimir Oltean``ETHTOOL_A_STATS_SRC`` is optional. Similar to ``PAUSE_GET``, it takes values
1615c319df10SVladimir Olteanfrom ``enum ethtool_mac_stats_src``. If absent from the request, stats will be
1616c319df10SVladimir Olteanprovided with an ``ETHTOOL_A_STATS_SRC`` attribute in the response equal to
1617c319df10SVladimir Oltean``ETHTOOL_MAC_STATS_SRC_AGGREGATE``.
1618c319df10SVladimir Oltean
1619c156174aSYangbo LuPHC_VCLOCKS_GET
1620c156174aSYangbo Lu===============
1621c156174aSYangbo Lu
1622c156174aSYangbo LuQuery device PHC virtual clocks information.
1623c156174aSYangbo Lu
1624c156174aSYangbo LuRequest contents:
1625c156174aSYangbo Lu
1626c156174aSYangbo Lu  ====================================  ======  ==========================
1627c156174aSYangbo Lu  ``ETHTOOL_A_PHC_VCLOCKS_HEADER``      nested  request header
1628c156174aSYangbo Lu  ====================================  ======  ==========================
1629c156174aSYangbo Lu
1630c156174aSYangbo LuKernel response contents:
1631c156174aSYangbo Lu
1632c156174aSYangbo Lu  ====================================  ======  ==========================
1633c156174aSYangbo Lu  ``ETHTOOL_A_PHC_VCLOCKS_HEADER``      nested  reply header
1634c156174aSYangbo Lu  ``ETHTOOL_A_PHC_VCLOCKS_NUM``         u32     PHC virtual clocks number
1635c156174aSYangbo Lu  ``ETHTOOL_A_PHC_VCLOCKS_INDEX``       s32     PHC index array
1636c156174aSYangbo Lu  ====================================  ======  ==========================
1637c156174aSYangbo Lu
1638353407d9SIdo SchimmelMODULE_GET
1639353407d9SIdo Schimmel==========
1640353407d9SIdo Schimmel
1641353407d9SIdo SchimmelGets transceiver module parameters.
1642353407d9SIdo Schimmel
1643353407d9SIdo SchimmelRequest contents:
1644353407d9SIdo Schimmel
1645353407d9SIdo Schimmel  =====================================  ======  ==========================
1646353407d9SIdo Schimmel  ``ETHTOOL_A_MODULE_HEADER``            nested  request header
1647353407d9SIdo Schimmel  =====================================  ======  ==========================
1648353407d9SIdo Schimmel
1649353407d9SIdo SchimmelKernel response contents:
1650353407d9SIdo Schimmel
1651353407d9SIdo Schimmel  ======================================  ======  ==========================
1652353407d9SIdo Schimmel  ``ETHTOOL_A_MODULE_HEADER``             nested  reply header
1653353407d9SIdo Schimmel  ``ETHTOOL_A_MODULE_POWER_MODE_POLICY``  u8      power mode policy
1654353407d9SIdo Schimmel  ``ETHTOOL_A_MODULE_POWER_MODE``         u8      operational power mode
1655353407d9SIdo Schimmel  ======================================  ======  ==========================
1656353407d9SIdo Schimmel
1657353407d9SIdo SchimmelThe optional ``ETHTOOL_A_MODULE_POWER_MODE_POLICY`` attribute encodes the
1658353407d9SIdo Schimmeltransceiver module power mode policy enforced by the host. The default policy
1659353407d9SIdo Schimmelis driver-dependent, but "auto" is the recommended default and it should be
1660353407d9SIdo Schimmelimplemented by new drivers and drivers where conformance to a legacy behavior
1661353407d9SIdo Schimmelis not critical.
1662353407d9SIdo Schimmel
1663353407d9SIdo SchimmelThe optional ``ETHTHOOL_A_MODULE_POWER_MODE`` attribute encodes the operational
1664353407d9SIdo Schimmelpower mode policy of the transceiver module. It is only reported when a module
1665353407d9SIdo Schimmelis plugged-in. Possible values are:
1666353407d9SIdo Schimmel
1667353407d9SIdo Schimmel.. kernel-doc:: include/uapi/linux/ethtool.h
1668353407d9SIdo Schimmel    :identifiers: ethtool_module_power_mode
1669353407d9SIdo Schimmel
1670353407d9SIdo SchimmelMODULE_SET
1671353407d9SIdo Schimmel==========
1672353407d9SIdo Schimmel
1673353407d9SIdo SchimmelSets transceiver module parameters.
1674353407d9SIdo Schimmel
1675353407d9SIdo SchimmelRequest contents:
1676353407d9SIdo Schimmel
1677353407d9SIdo Schimmel  ======================================  ======  ==========================
1678353407d9SIdo Schimmel  ``ETHTOOL_A_MODULE_HEADER``             nested  request header
1679353407d9SIdo Schimmel  ``ETHTOOL_A_MODULE_POWER_MODE_POLICY``  u8      power mode policy
1680353407d9SIdo Schimmel  ======================================  ======  ==========================
1681353407d9SIdo Schimmel
1682353407d9SIdo SchimmelWhen set, the optional ``ETHTOOL_A_MODULE_POWER_MODE_POLICY`` attribute is used
1683353407d9SIdo Schimmelto set the transceiver module power policy enforced by the host. Possible
1684353407d9SIdo Schimmelvalues are:
1685353407d9SIdo Schimmel
1686353407d9SIdo Schimmel.. kernel-doc:: include/uapi/linux/ethtool.h
1687353407d9SIdo Schimmel    :identifiers: ethtool_module_power_mode_policy
1688353407d9SIdo Schimmel
1689353407d9SIdo SchimmelFor SFF-8636 modules, low power mode is forced by the host according to table
1690353407d9SIdo Schimmel6-10 in revision 2.10a of the specification.
1691353407d9SIdo Schimmel
1692353407d9SIdo SchimmelFor CMIS modules, low power mode is forced by the host according to table 6-12
1693353407d9SIdo Schimmelin revision 5.0 of the specification.
1694353407d9SIdo Schimmel
169518ff0bcdSOleksij RempelPSE_GET
169618ff0bcdSOleksij Rempel=======
169718ff0bcdSOleksij Rempel
169818ff0bcdSOleksij RempelGets PSE attributes.
169918ff0bcdSOleksij Rempel
170018ff0bcdSOleksij RempelRequest contents:
170118ff0bcdSOleksij Rempel
170218ff0bcdSOleksij Rempel  =====================================  ======  ==========================
170318ff0bcdSOleksij Rempel  ``ETHTOOL_A_PSE_HEADER``               nested  request header
170418ff0bcdSOleksij Rempel  =====================================  ======  ==========================
170518ff0bcdSOleksij Rempel
170618ff0bcdSOleksij RempelKernel response contents:
170718ff0bcdSOleksij Rempel
170818ff0bcdSOleksij Rempel  ======================================  ======  =============================
170918ff0bcdSOleksij Rempel  ``ETHTOOL_A_PSE_HEADER``                nested  reply header
171018ff0bcdSOleksij Rempel  ``ETHTOOL_A_PODL_PSE_ADMIN_STATE``         u32  Operational state of the PoDL
171118ff0bcdSOleksij Rempel                                                  PSE functions
171218ff0bcdSOleksij Rempel  ``ETHTOOL_A_PODL_PSE_PW_D_STATUS``         u32  power detection status of the
171318ff0bcdSOleksij Rempel                                                  PoDL PSE.
171418ff0bcdSOleksij Rempel  ======================================  ======  =============================
171518ff0bcdSOleksij Rempel
171618ff0bcdSOleksij RempelWhen set, the optional ``ETHTOOL_A_PODL_PSE_ADMIN_STATE`` attribute identifies
171718ff0bcdSOleksij Rempelthe operational state of the PoDL PSE functions.  The operational state of the
171818ff0bcdSOleksij RempelPSE function can be changed using the ``ETHTOOL_A_PODL_PSE_ADMIN_CONTROL``
171918ff0bcdSOleksij Rempelaction. This option is corresponding to ``IEEE 802.3-2018`` 30.15.1.1.2
172018ff0bcdSOleksij RempelaPoDLPSEAdminState. Possible values are:
172118ff0bcdSOleksij Rempel
172218ff0bcdSOleksij Rempel.. kernel-doc:: include/uapi/linux/ethtool.h
172318ff0bcdSOleksij Rempel    :identifiers: ethtool_podl_pse_admin_state
172418ff0bcdSOleksij Rempel
172518ff0bcdSOleksij RempelWhen set, the optional ``ETHTOOL_A_PODL_PSE_PW_D_STATUS`` attribute identifies
172618ff0bcdSOleksij Rempelthe power detection status of the PoDL PSE.  The status depend on internal PSE
172718ff0bcdSOleksij Rempelstate machine and automatic PD classification support. This option is
172818ff0bcdSOleksij Rempelcorresponding to ``IEEE 802.3-2018`` 30.15.1.1.3 aPoDLPSEPowerDetectionStatus.
172918ff0bcdSOleksij RempelPossible values are:
173018ff0bcdSOleksij Rempel
173118ff0bcdSOleksij Rempel.. kernel-doc:: include/uapi/linux/ethtool.h
173218ff0bcdSOleksij Rempel    :identifiers: ethtool_podl_pse_pw_d_status
173318ff0bcdSOleksij Rempel
173418ff0bcdSOleksij RempelPSE_SET
173518ff0bcdSOleksij Rempel=======
173618ff0bcdSOleksij Rempel
173718ff0bcdSOleksij RempelSets PSE parameters.
173818ff0bcdSOleksij Rempel
173918ff0bcdSOleksij RempelRequest contents:
174018ff0bcdSOleksij Rempel
174118ff0bcdSOleksij Rempel  ======================================  ======  =============================
174218ff0bcdSOleksij Rempel  ``ETHTOOL_A_PSE_HEADER``                nested  request header
174318ff0bcdSOleksij Rempel  ``ETHTOOL_A_PODL_PSE_ADMIN_CONTROL``       u32  Control PoDL PSE Admin state
174418ff0bcdSOleksij Rempel  ======================================  ======  =============================
174518ff0bcdSOleksij Rempel
174618ff0bcdSOleksij RempelWhen set, the optional ``ETHTOOL_A_PODL_PSE_ADMIN_CONTROL`` attribute is used
174718ff0bcdSOleksij Rempelto control PoDL PSE Admin functions. This option is implementing
174818ff0bcdSOleksij Rempel``IEEE 802.3-2018`` 30.15.1.2.1 acPoDLPSEAdminControl. See
174918ff0bcdSOleksij Rempel``ETHTOOL_A_PODL_PSE_ADMIN_STATE`` for supported values.
175018ff0bcdSOleksij Rempel
17517112a046SSudheer MogilappagariRSS_GET
17527112a046SSudheer Mogilappagari=======
17537112a046SSudheer Mogilappagari
17547112a046SSudheer MogilappagariGet indirection table, hash key and hash function info associated with a
17557112a046SSudheer MogilappagariRSS context of an interface similar to ``ETHTOOL_GRSSH`` ioctl request.
17567112a046SSudheer Mogilappagari
17577112a046SSudheer MogilappagariRequest contents:
17587112a046SSudheer Mogilappagari
17597112a046SSudheer Mogilappagari=====================================  ======  ==========================
17607112a046SSudheer Mogilappagari  ``ETHTOOL_A_RSS_HEADER``             nested  request header
17617112a046SSudheer Mogilappagari  ``ETHTOOL_A_RSS_CONTEXT``            u32     context number
17627112a046SSudheer Mogilappagari=====================================  ======  ==========================
17637112a046SSudheer Mogilappagari
17647112a046SSudheer MogilappagariKernel response contents:
17657112a046SSudheer Mogilappagari
17667112a046SSudheer Mogilappagari=====================================  ======  ==========================
17677112a046SSudheer Mogilappagari  ``ETHTOOL_A_RSS_HEADER``             nested  reply header
17687112a046SSudheer Mogilappagari  ``ETHTOOL_A_RSS_HFUNC``              u32     RSS hash func
17697112a046SSudheer Mogilappagari  ``ETHTOOL_A_RSS_INDIR``              binary  Indir table bytes
17707112a046SSudheer Mogilappagari  ``ETHTOOL_A_RSS_HKEY``               binary  Hash key bytes
17717112a046SSudheer Mogilappagari=====================================  ======  ==========================
17727112a046SSudheer Mogilappagari
17737112a046SSudheer MogilappagariETHTOOL_A_RSS_HFUNC attribute is bitmap indicating the hash function
17747112a046SSudheer Mogilappagaribeing used. Current supported options are toeplitz, xor or crc32.
17757112a046SSudheer MogilappagariETHTOOL_A_RSS_INDIR attribute returns RSS indrection table where each byte
17767112a046SSudheer Mogilappagariindicates queue number.
17777112a046SSudheer Mogilappagari
17788580e16cSPiergiorgio BerutoPLCA_GET_CFG
17798580e16cSPiergiorgio Beruto============
17808580e16cSPiergiorgio Beruto
17818580e16cSPiergiorgio BerutoGets the IEEE 802.3cg-2019 Clause 148 Physical Layer Collision Avoidance
17828580e16cSPiergiorgio Beruto(PLCA) Reconciliation Sublayer (RS) attributes.
17838580e16cSPiergiorgio Beruto
17848580e16cSPiergiorgio BerutoRequest contents:
17858580e16cSPiergiorgio Beruto
17868580e16cSPiergiorgio Beruto  =====================================  ======  ==========================
17878580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_HEADER``              nested  request header
17888580e16cSPiergiorgio Beruto  =====================================  ======  ==========================
17898580e16cSPiergiorgio Beruto
17908580e16cSPiergiorgio BerutoKernel response contents:
17918580e16cSPiergiorgio Beruto
17928580e16cSPiergiorgio Beruto  ======================================  ======  =============================
17938580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_HEADER``               nested  reply header
17948580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_VERSION``              u16     Supported PLCA management
17958580e16cSPiergiorgio Beruto                                                  interface standard/version
17968580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_ENABLED``              u8      PLCA Admin State
17978580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_NODE_ID``              u32     PLCA unique local node ID
17988580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_NODE_CNT``             u32     Number of PLCA nodes on the
17998580e16cSPiergiorgio Beruto                                                  network, including the
18008580e16cSPiergiorgio Beruto                                                  coordinator
18018580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_TO_TMR``               u32     Transmit Opportunity Timer
18028580e16cSPiergiorgio Beruto                                                  value in bit-times (BT)
18038580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_BURST_CNT``            u32     Number of additional packets
18048580e16cSPiergiorgio Beruto                                                  the node is allowed to send
18058580e16cSPiergiorgio Beruto                                                  within a single TO
18068580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_BURST_TMR``            u32     Time to wait for the MAC to
18078580e16cSPiergiorgio Beruto                                                  transmit a new frame before
18088580e16cSPiergiorgio Beruto                                                  terminating the burst
18098580e16cSPiergiorgio Beruto  ======================================  ======  =============================
18108580e16cSPiergiorgio Beruto
18118580e16cSPiergiorgio BerutoWhen set, the optional ``ETHTOOL_A_PLCA_VERSION`` attribute indicates which
18128580e16cSPiergiorgio Berutostandard and version the PLCA management interface complies to. When not set,
18138580e16cSPiergiorgio Berutothe interface is vendor-specific and (possibly) supplied by the driver.
18148580e16cSPiergiorgio BerutoThe OPEN Alliance SIG specifies a standard register map for 10BASE-T1S PHYs
18158580e16cSPiergiorgio Berutoembedding the PLCA Reconcialiation Sublayer. See "10BASE-T1S PLCA Management
18168580e16cSPiergiorgio BerutoRegisters" at https://www.opensig.org/about/specifications/.
18178580e16cSPiergiorgio Beruto
18188580e16cSPiergiorgio BerutoWhen set, the optional ``ETHTOOL_A_PLCA_ENABLED`` attribute indicates the
18198580e16cSPiergiorgio Berutoadministrative state of the PLCA RS. When not set, the node operates in "plain"
18208580e16cSPiergiorgio BerutoCSMA/CD mode. This option is corresponding to ``IEEE 802.3cg-2019`` 30.16.1.1.1
18218580e16cSPiergiorgio BerutoaPLCAAdminState / 30.16.1.2.1 acPLCAAdminControl.
18228580e16cSPiergiorgio Beruto
18238580e16cSPiergiorgio BerutoWhen set, the optional ``ETHTOOL_A_PLCA_NODE_ID`` attribute indicates the
18248580e16cSPiergiorgio Berutoconfigured local node ID of the PHY. This ID determines which transmit
18258580e16cSPiergiorgio Berutoopportunity (TO) is reserved for the node to transmit into. This option is
18268580e16cSPiergiorgio Berutocorresponding to ``IEEE 802.3cg-2019`` 30.16.1.1.4 aPLCALocalNodeID. The valid
18278580e16cSPiergiorgio Berutorange for this attribute is [0 .. 255] where 255 means "not configured".
18288580e16cSPiergiorgio Beruto
18298580e16cSPiergiorgio BerutoWhen set, the optional ``ETHTOOL_A_PLCA_NODE_CNT`` attribute indicates the
18308580e16cSPiergiorgio Berutoconfigured maximum number of PLCA nodes on the mixing-segment. This number
18318580e16cSPiergiorgio Berutodetermines the total number of transmit opportunities generated during a
18328580e16cSPiergiorgio BerutoPLCA cycle. This attribute is relevant only for the PLCA coordinator, which is
18338580e16cSPiergiorgio Berutothe node with aPLCALocalNodeID set to 0. Follower nodes ignore this setting.
18348580e16cSPiergiorgio BerutoThis option is corresponding to ``IEEE 802.3cg-2019`` 30.16.1.1.3
18358580e16cSPiergiorgio BerutoaPLCANodeCount. The valid range for this attribute is [1 .. 255].
18368580e16cSPiergiorgio Beruto
18378580e16cSPiergiorgio BerutoWhen set, the optional ``ETHTOOL_A_PLCA_TO_TMR`` attribute indicates the
18388580e16cSPiergiorgio Berutoconfigured value of the transmit opportunity timer in bit-times. This value
18398580e16cSPiergiorgio Berutomust be set equal across all nodes sharing the medium for PLCA to work
18408580e16cSPiergiorgio Berutocorrectly. This option is corresponding to ``IEEE 802.3cg-2019`` 30.16.1.1.5
18418580e16cSPiergiorgio BerutoaPLCATransmitOpportunityTimer. The valid range for this attribute is
18428580e16cSPiergiorgio Beruto[0 .. 255].
18438580e16cSPiergiorgio Beruto
18448580e16cSPiergiorgio BerutoWhen set, the optional ``ETHTOOL_A_PLCA_BURST_CNT`` attribute indicates the
18458580e16cSPiergiorgio Berutoconfigured number of extra packets that the node is allowed to send during a
18468580e16cSPiergiorgio Berutosingle transmit opportunity. By default, this attribute is 0, meaning that
1847a266ef69SRandy Dunlapthe node can only send a single frame per TO. When greater than 0, the PLCA RS
18488580e16cSPiergiorgio Berutokeeps the TO after any transmission, waiting for the MAC to send a new frame
18498580e16cSPiergiorgio Berutofor up to aPLCABurstTimer BTs. This can only happen a number of times per PLCA
18508580e16cSPiergiorgio Berutocycle up to the value of this parameter. After that, the burst is over and the
18518580e16cSPiergiorgio Berutonormal counting of TOs resumes. This option is corresponding to
18528580e16cSPiergiorgio Beruto``IEEE 802.3cg-2019`` 30.16.1.1.6 aPLCAMaxBurstCount. The valid range for this
18538580e16cSPiergiorgio Berutoattribute is [0 .. 255].
18548580e16cSPiergiorgio Beruto
18558580e16cSPiergiorgio BerutoWhen set, the optional ``ETHTOOL_A_PLCA_BURST_TMR`` attribute indicates how
18568580e16cSPiergiorgio Berutomany bit-times the PLCA RS waits for the MAC to initiate a new transmission
18578580e16cSPiergiorgio Berutowhen aPLCAMaxBurstCount is greater than 0. If the MAC fails to send a new
18588580e16cSPiergiorgio Berutoframe within this time, the burst ends and the counting of TOs resumes.
18598580e16cSPiergiorgio BerutoOtherwise, the new frame is sent as part of the current burst. This option
18608580e16cSPiergiorgio Berutois corresponding to ``IEEE 802.3cg-2019`` 30.16.1.1.7 aPLCABurstTimer. The
18618580e16cSPiergiorgio Berutovalid range for this attribute is [0 .. 255]. Although, the value should be
18628580e16cSPiergiorgio Berutoset greater than the Inter-Frame-Gap (IFG) time of the MAC (plus some margin)
18638580e16cSPiergiorgio Berutofor PLCA burst mode to work as intended.
18648580e16cSPiergiorgio Beruto
18658580e16cSPiergiorgio BerutoPLCA_SET_CFG
18668580e16cSPiergiorgio Beruto============
18678580e16cSPiergiorgio Beruto
18688580e16cSPiergiorgio BerutoSets PLCA RS parameters.
18698580e16cSPiergiorgio Beruto
18708580e16cSPiergiorgio BerutoRequest contents:
18718580e16cSPiergiorgio Beruto
18728580e16cSPiergiorgio Beruto  ======================================  ======  =============================
18738580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_HEADER``               nested  request header
18748580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_ENABLED``              u8      PLCA Admin State
18758580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_NODE_ID``              u8      PLCA unique local node ID
18768580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_NODE_CNT``             u8      Number of PLCA nodes on the
18778580e16cSPiergiorgio Beruto                                                  netkork, including the
18788580e16cSPiergiorgio Beruto                                                  coordinator
18798580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_TO_TMR``               u8      Transmit Opportunity Timer
18808580e16cSPiergiorgio Beruto                                                  value in bit-times (BT)
18818580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_BURST_CNT``            u8      Number of additional packets
18828580e16cSPiergiorgio Beruto                                                  the node is allowed to send
18838580e16cSPiergiorgio Beruto                                                  within a single TO
18848580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_BURST_TMR``            u8      Time to wait for the MAC to
18858580e16cSPiergiorgio Beruto                                                  transmit a new frame before
18868580e16cSPiergiorgio Beruto                                                  terminating the burst
18878580e16cSPiergiorgio Beruto  ======================================  ======  =============================
18888580e16cSPiergiorgio Beruto
18898580e16cSPiergiorgio BerutoFor a description of each attribute, see ``PLCA_GET_CFG``.
18908580e16cSPiergiorgio Beruto
18918580e16cSPiergiorgio BerutoPLCA_GET_STATUS
18928580e16cSPiergiorgio Beruto===============
18938580e16cSPiergiorgio Beruto
18948580e16cSPiergiorgio BerutoGets PLCA RS status information.
18958580e16cSPiergiorgio Beruto
18968580e16cSPiergiorgio BerutoRequest contents:
18978580e16cSPiergiorgio Beruto
18988580e16cSPiergiorgio Beruto  =====================================  ======  ==========================
18998580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_HEADER``              nested  request header
19008580e16cSPiergiorgio Beruto  =====================================  ======  ==========================
19018580e16cSPiergiorgio Beruto
19028580e16cSPiergiorgio BerutoKernel response contents:
19038580e16cSPiergiorgio Beruto
19048580e16cSPiergiorgio Beruto  ======================================  ======  =============================
19058580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_HEADER``               nested  reply header
19068580e16cSPiergiorgio Beruto  ``ETHTOOL_A_PLCA_STATUS``               u8      PLCA RS operational status
19078580e16cSPiergiorgio Beruto  ======================================  ======  =============================
19088580e16cSPiergiorgio Beruto
19098580e16cSPiergiorgio BerutoWhen set, the ``ETHTOOL_A_PLCA_STATUS`` attribute indicates whether the node is
19108580e16cSPiergiorgio Berutodetecting the presence of the BEACON on the network. This flag is
19118580e16cSPiergiorgio Berutocorresponding to ``IEEE 802.3cg-2019`` 30.16.1.1.2 aPLCAStatus.
19128580e16cSPiergiorgio Beruto
191337000004SVladimir OlteanMM_GET
191437000004SVladimir Oltean======
191537000004SVladimir Oltean
191637000004SVladimir OlteanRetrieve 802.3 MAC Merge parameters.
191737000004SVladimir Oltean
191837000004SVladimir OlteanRequest contents:
191937000004SVladimir Oltean
192037000004SVladimir Oltean  ====================================  ======  ==========================
192137000004SVladimir Oltean  ``ETHTOOL_A_MM_HEADER``               nested  request header
192237000004SVladimir Oltean  ====================================  ======  ==========================
192337000004SVladimir Oltean
192437000004SVladimir OlteanKernel response contents:
192537000004SVladimir Oltean
192637000004SVladimir Oltean  =================================  ======  ===================================
192737000004SVladimir Oltean  ``ETHTOOL_A_MM_HEADER``            nested  request header
192837000004SVladimir Oltean  ``ETHTOOL_A_MM_PMAC_ENABLED``      bool    set if RX of preemptible and SMD-V
192937000004SVladimir Oltean                                             frames is enabled
193037000004SVladimir Oltean  ``ETHTOOL_A_MM_TX_ENABLED``        bool    set if TX of preemptible frames is
193137000004SVladimir Oltean                                             administratively enabled (might be
193237000004SVladimir Oltean                                             inactive if verification failed)
193337000004SVladimir Oltean  ``ETHTOOL_A_MM_TX_ACTIVE``         bool    set if TX of preemptible frames is
193437000004SVladimir Oltean                                             operationally enabled
193537000004SVladimir Oltean  ``ETHTOOL_A_MM_TX_MIN_FRAG_SIZE``  u32     minimum size of transmitted
193637000004SVladimir Oltean                                             non-final fragments, in octets
193737000004SVladimir Oltean  ``ETHTOOL_A_MM_RX_MIN_FRAG_SIZE``  u32     minimum size of received non-final
193837000004SVladimir Oltean                                             fragments, in octets
193937000004SVladimir Oltean  ``ETHTOOL_A_MM_VERIFY_ENABLED``    bool    set if TX of SMD-V frames is
194037000004SVladimir Oltean                                             administratively enabled
194137000004SVladimir Oltean  ``ETHTOOL_A_MM_VERIFY_STATUS``     u8      state of the verification function
194237000004SVladimir Oltean  ``ETHTOOL_A_MM_VERIFY_TIME``       u32     delay between verification attempts
194337000004SVladimir Oltean  ``ETHTOOL_A_MM_MAX_VERIFY_TIME```  u32     maximum verification interval
194437000004SVladimir Oltean                                             supported by device
194537000004SVladimir Oltean  ``ETHTOOL_A_MM_STATS``             nested  IEEE 802.3-2018 subclause 30.14.1
194637000004SVladimir Oltean                                             oMACMergeEntity statistics counters
194737000004SVladimir Oltean  =================================  ======  ===================================
194837000004SVladimir Oltean
194937000004SVladimir OlteanThe attributes are populated by the device driver through the following
195037000004SVladimir Olteanstructure:
195137000004SVladimir Oltean
195237000004SVladimir Oltean.. kernel-doc:: include/linux/ethtool.h
195337000004SVladimir Oltean    :identifiers: ethtool_mm_state
195437000004SVladimir Oltean
195537000004SVladimir OlteanThe ``ETHTOOL_A_MM_VERIFY_STATUS`` will report one of the values from
195637000004SVladimir Oltean
195737000004SVladimir Oltean.. kernel-doc:: include/uapi/linux/ethtool.h
195837000004SVladimir Oltean    :identifiers: ethtool_mm_verify_status
195937000004SVladimir Oltean
196037000004SVladimir OlteanIf ``ETHTOOL_A_MM_VERIFY_ENABLED`` was passed as false in the ``MM_SET``
196137000004SVladimir Olteancommand, ``ETHTOOL_A_MM_VERIFY_STATUS`` will report either
196237000004SVladimir Oltean``ETHTOOL_MM_VERIFY_STATUS_INITIAL`` or ``ETHTOOL_MM_VERIFY_STATUS_DISABLED``,
196337000004SVladimir Olteanotherwise it should report one of the other states.
196437000004SVladimir Oltean
196537000004SVladimir OlteanIt is recommended that drivers start with the pMAC disabled, and enable it upon
196637000004SVladimir Olteanuser space request. It is also recommended that user space does not depend upon
196737000004SVladimir Olteanthe default values from ``ETHTOOL_MSG_MM_GET`` requests.
196837000004SVladimir Oltean
196937000004SVladimir Oltean``ETHTOOL_A_MM_STATS`` are reported if ``ETHTOOL_FLAG_STATS`` was set in
197037000004SVladimir Oltean``ETHTOOL_A_HEADER_FLAGS``. The attribute will be empty if driver did not
197137000004SVladimir Olteanreport any statistics. Drivers fill in the statistics in the following
197237000004SVladimir Olteanstructure:
197337000004SVladimir Oltean
197437000004SVladimir Oltean.. kernel-doc:: include/linux/ethtool.h
197537000004SVladimir Oltean    :identifiers: ethtool_mm_stats
197637000004SVladimir Oltean
197737000004SVladimir OlteanMM_SET
197837000004SVladimir Oltean======
197937000004SVladimir Oltean
198037000004SVladimir OlteanModifies the configuration of the 802.3 MAC Merge layer.
198137000004SVladimir Oltean
198237000004SVladimir OlteanRequest contents:
198337000004SVladimir Oltean
198437000004SVladimir Oltean  =================================  ======  ==========================
198537000004SVladimir Oltean  ``ETHTOOL_A_MM_VERIFY_TIME``       u32     see MM_GET description
198637000004SVladimir Oltean  ``ETHTOOL_A_MM_VERIFY_ENABLED``    bool    see MM_GET description
198737000004SVladimir Oltean  ``ETHTOOL_A_MM_TX_ENABLED``        bool    see MM_GET description
198837000004SVladimir Oltean  ``ETHTOOL_A_MM_PMAC_ENABLED``      bool    see MM_GET description
198937000004SVladimir Oltean  ``ETHTOOL_A_MM_TX_MIN_FRAG_SIZE``  u32     see MM_GET description
199037000004SVladimir Oltean  =================================  ======  ==========================
199137000004SVladimir Oltean
199237000004SVladimir OlteanThe attributes are propagated to the driver through the following structure:
199337000004SVladimir Oltean
199437000004SVladimir Oltean.. kernel-doc:: include/linux/ethtool.h
199537000004SVladimir Oltean    :identifiers: ethtool_mm_cfg
199637000004SVladimir Oltean
19972b4a8990SMichal KubecekRequest translation
19982b4a8990SMichal Kubecek===================
19992b4a8990SMichal Kubecek
20002b4a8990SMichal KubecekThe following table maps ioctl commands to netlink commands providing their
20012b4a8990SMichal Kubecekfunctionality. Entries with "n/a" in right column are commands which do not
200211ca3c42SAndrew Lunnhave their netlink replacement yet. Entries which "n/a" in the left column
200311ca3c42SAndrew Lunnare netlink only.
20042b4a8990SMichal Kubecek
20052b4a8990SMichal Kubecek  =================================== =====================================
20062b4a8990SMichal Kubecek  ioctl command                       netlink command
20072b4a8990SMichal Kubecek  =================================== =====================================
2008459e0b81SMichal Kubecek  ``ETHTOOL_GSET``                    ``ETHTOOL_MSG_LINKINFO_GET``
2009f625aa9bSMichal Kubecek                                      ``ETHTOOL_MSG_LINKMODES_GET``
2010a53f3d41SMichal Kubecek  ``ETHTOOL_SSET``                    ``ETHTOOL_MSG_LINKINFO_SET``
2011bfbcfe20SMichal Kubecek                                      ``ETHTOOL_MSG_LINKMODES_SET``
20122b4a8990SMichal Kubecek  ``ETHTOOL_GDRVINFO``                n/a
20132b4a8990SMichal Kubecek  ``ETHTOOL_GREGS``                   n/a
201451ea22b0SMichal Kubecek  ``ETHTOOL_GWOL``                    ``ETHTOOL_MSG_WOL_GET``
20158d425b19SMichal Kubecek  ``ETHTOOL_SWOL``                    ``ETHTOOL_MSG_WOL_SET``
20166a94b8ccSMichal Kubecek  ``ETHTOOL_GMSGLVL``                 ``ETHTOOL_MSG_DEBUG_GET``
2017e54d04e3SMichal Kubecek  ``ETHTOOL_SMSGLVL``                 ``ETHTOOL_MSG_DEBUG_SET``
20182b4a8990SMichal Kubecek  ``ETHTOOL_NWAY_RST``                n/a
20193d2b847fSMichal Kubecek  ``ETHTOOL_GLINK``                   ``ETHTOOL_MSG_LINKSTATE_GET``
20202b4a8990SMichal Kubecek  ``ETHTOOL_GEEPROM``                 n/a
20212b4a8990SMichal Kubecek  ``ETHTOOL_SEEPROM``                 n/a
202221727545SMichal Kubecek  ``ETHTOOL_GCOALESCE``               ``ETHTOOL_MSG_COALESCE_GET``
20239881418cSMichal Kubecek  ``ETHTOOL_SCOALESCE``               ``ETHTOOL_MSG_COALESCE_SET``
2024e4a1717bSMichal Kubecek  ``ETHTOOL_GRINGPARAM``              ``ETHTOOL_MSG_RINGS_GET``
20252fc2929eSMichal Kubecek  ``ETHTOOL_SRINGPARAM``              ``ETHTOOL_MSG_RINGS_SET``
20267f59fb32SMichal Kubecek  ``ETHTOOL_GPAUSEPARAM``             ``ETHTOOL_MSG_PAUSE_GET``
20273ab87993SMichal Kubecek  ``ETHTOOL_SPAUSEPARAM``             ``ETHTOOL_MSG_PAUSE_SET``
20280524399dSMichal Kubecek  ``ETHTOOL_GRXCSUM``                 ``ETHTOOL_MSG_FEATURES_GET``
20290980bfcdSMichal Kubecek  ``ETHTOOL_SRXCSUM``                 ``ETHTOOL_MSG_FEATURES_SET``
20300524399dSMichal Kubecek  ``ETHTOOL_GTXCSUM``                 ``ETHTOOL_MSG_FEATURES_GET``
20310980bfcdSMichal Kubecek  ``ETHTOOL_STXCSUM``                 ``ETHTOOL_MSG_FEATURES_SET``
20320524399dSMichal Kubecek  ``ETHTOOL_GSG``                     ``ETHTOOL_MSG_FEATURES_GET``
20330980bfcdSMichal Kubecek  ``ETHTOOL_SSG``                     ``ETHTOOL_MSG_FEATURES_SET``
20342b4a8990SMichal Kubecek  ``ETHTOOL_TEST``                    n/a
203571921690SMichal Kubecek  ``ETHTOOL_GSTRINGS``                ``ETHTOOL_MSG_STRSET_GET``
20362b4a8990SMichal Kubecek  ``ETHTOOL_PHYS_ID``                 n/a
20372b4a8990SMichal Kubecek  ``ETHTOOL_GSTATS``                  n/a
20380524399dSMichal Kubecek  ``ETHTOOL_GTSO``                    ``ETHTOOL_MSG_FEATURES_GET``
20390980bfcdSMichal Kubecek  ``ETHTOOL_STSO``                    ``ETHTOOL_MSG_FEATURES_SET``
20402b4a8990SMichal Kubecek  ``ETHTOOL_GPERMADDR``               rtnetlink ``RTM_GETLINK``
20410524399dSMichal Kubecek  ``ETHTOOL_GUFO``                    ``ETHTOOL_MSG_FEATURES_GET``
20420980bfcdSMichal Kubecek  ``ETHTOOL_SUFO``                    ``ETHTOOL_MSG_FEATURES_SET``
20430524399dSMichal Kubecek  ``ETHTOOL_GGSO``                    ``ETHTOOL_MSG_FEATURES_GET``
20440980bfcdSMichal Kubecek  ``ETHTOOL_SGSO``                    ``ETHTOOL_MSG_FEATURES_SET``
20450524399dSMichal Kubecek  ``ETHTOOL_GFLAGS``                  ``ETHTOOL_MSG_FEATURES_GET``
20460980bfcdSMichal Kubecek  ``ETHTOOL_SFLAGS``                  ``ETHTOOL_MSG_FEATURES_SET``
2047e16c3386SMichal Kubecek  ``ETHTOOL_GPFLAGS``                 ``ETHTOOL_MSG_PRIVFLAGS_GET``
2048f265d799SMichal Kubecek  ``ETHTOOL_SPFLAGS``                 ``ETHTOOL_MSG_PRIVFLAGS_SET``
20492b4a8990SMichal Kubecek  ``ETHTOOL_GRXFH``                   n/a
20502b4a8990SMichal Kubecek  ``ETHTOOL_SRXFH``                   n/a
20510524399dSMichal Kubecek  ``ETHTOOL_GGRO``                    ``ETHTOOL_MSG_FEATURES_GET``
20520980bfcdSMichal Kubecek  ``ETHTOOL_SGRO``                    ``ETHTOOL_MSG_FEATURES_SET``
20532b4a8990SMichal Kubecek  ``ETHTOOL_GRXRINGS``                n/a
20542b4a8990SMichal Kubecek  ``ETHTOOL_GRXCLSRLCNT``             n/a
20552b4a8990SMichal Kubecek  ``ETHTOOL_GRXCLSRULE``              n/a
20562b4a8990SMichal Kubecek  ``ETHTOOL_GRXCLSRLALL``             n/a
20572b4a8990SMichal Kubecek  ``ETHTOOL_SRXCLSRLDEL``             n/a
20582b4a8990SMichal Kubecek  ``ETHTOOL_SRXCLSRLINS``             n/a
20592b4a8990SMichal Kubecek  ``ETHTOOL_FLASHDEV``                n/a
20602b4a8990SMichal Kubecek  ``ETHTOOL_RESET``                   n/a
20612b4a8990SMichal Kubecek  ``ETHTOOL_SRXNTUPLE``               n/a
20622b4a8990SMichal Kubecek  ``ETHTOOL_GRXNTUPLE``               n/a
206371921690SMichal Kubecek  ``ETHTOOL_GSSET_INFO``              ``ETHTOOL_MSG_STRSET_GET``
20642b4a8990SMichal Kubecek  ``ETHTOOL_GRXFHINDIR``              n/a
20652b4a8990SMichal Kubecek  ``ETHTOOL_SRXFHINDIR``              n/a
20660524399dSMichal Kubecek  ``ETHTOOL_GFEATURES``               ``ETHTOOL_MSG_FEATURES_GET``
20670980bfcdSMichal Kubecek  ``ETHTOOL_SFEATURES``               ``ETHTOOL_MSG_FEATURES_SET``
20680c84979cSMichal Kubecek  ``ETHTOOL_GCHANNELS``               ``ETHTOOL_MSG_CHANNELS_GET``
2069e19c591eSMichal Kubecek  ``ETHTOOL_SCHANNELS``               ``ETHTOOL_MSG_CHANNELS_SET``
20702b4a8990SMichal Kubecek  ``ETHTOOL_SET_DUMP``                n/a
20712b4a8990SMichal Kubecek  ``ETHTOOL_GET_DUMP_FLAG``           n/a
20722b4a8990SMichal Kubecek  ``ETHTOOL_GET_DUMP_DATA``           n/a
20735b071c59SMichal Kubecek  ``ETHTOOL_GET_TS_INFO``             ``ETHTOOL_MSG_TSINFO_GET``
2074c781ff12SVladyslav Tarasiuk  ``ETHTOOL_GMODULEINFO``             ``ETHTOOL_MSG_MODULE_EEPROM_GET``
2075c781ff12SVladyslav Tarasiuk  ``ETHTOOL_GMODULEEEPROM``           ``ETHTOOL_MSG_MODULE_EEPROM_GET``
2076b7eeefe7SMichal Kubecek  ``ETHTOOL_GEEE``                    ``ETHTOOL_MSG_EEE_GET``
2077fd77be7bSMichal Kubecek  ``ETHTOOL_SEEE``                    ``ETHTOOL_MSG_EEE_SET``
20787112a046SSudheer Mogilappagari  ``ETHTOOL_GRSSH``                   ``ETHTOOL_MSG_RSS_GET``
20792b4a8990SMichal Kubecek  ``ETHTOOL_SRSSH``                   n/a
20802b4a8990SMichal Kubecek  ``ETHTOOL_GTUNABLE``                n/a
20812b4a8990SMichal Kubecek  ``ETHTOOL_STUNABLE``                n/a
20822b4a8990SMichal Kubecek  ``ETHTOOL_GPHYSTATS``               n/a
20832b4a8990SMichal Kubecek  ``ETHTOOL_PERQUEUE``                n/a
2084459e0b81SMichal Kubecek  ``ETHTOOL_GLINKSETTINGS``           ``ETHTOOL_MSG_LINKINFO_GET``
2085f625aa9bSMichal Kubecek                                      ``ETHTOOL_MSG_LINKMODES_GET``
2086a53f3d41SMichal Kubecek  ``ETHTOOL_SLINKSETTINGS``           ``ETHTOOL_MSG_LINKINFO_SET``
2087bfbcfe20SMichal Kubecek                                      ``ETHTOOL_MSG_LINKMODES_SET``
20882b4a8990SMichal Kubecek  ``ETHTOOL_PHY_GTUNABLE``            n/a
20892b4a8990SMichal Kubecek  ``ETHTOOL_PHY_STUNABLE``            n/a
20901e5d1f69SJakub Kicinski  ``ETHTOOL_GFECPARAM``               ``ETHTOOL_MSG_FEC_GET``
20911e5d1f69SJakub Kicinski  ``ETHTOOL_SFECPARAM``               ``ETHTOOL_MSG_FEC_SET``
20920b35e0deSJakub Kicinski  n/a                                 ``ETHTOOL_MSG_CABLE_TEST_ACT``
20930b35e0deSJakub Kicinski  n/a                                 ``ETHTOOL_MSG_CABLE_TEST_TDR_ACT``
209419a83d36SMichal Kubecek  n/a                                 ``ETHTOOL_MSG_TUNNEL_INFO_GET``
2095c156174aSYangbo Lu  n/a                                 ``ETHTOOL_MSG_PHC_VCLOCKS_GET``
2096353407d9SIdo Schimmel  n/a                                 ``ETHTOOL_MSG_MODULE_GET``
2097353407d9SIdo Schimmel  n/a                                 ``ETHTOOL_MSG_MODULE_SET``
20988580e16cSPiergiorgio Beruto  n/a                                 ``ETHTOOL_MSG_PLCA_GET_CFG``
20998580e16cSPiergiorgio Beruto  n/a                                 ``ETHTOOL_MSG_PLCA_SET_CFG``
21008580e16cSPiergiorgio Beruto  n/a                                 ``ETHTOOL_MSG_PLCA_GET_STATUS``
210137000004SVladimir Oltean  n/a                                 ``ETHTOOL_MSG_MM_GET``
210237000004SVladimir Oltean  n/a                                 ``ETHTOOL_MSG_MM_SET``
21032b4a8990SMichal Kubecek  =================================== =====================================
2104