1*4882a593Smuzhiyun============================= 2*4882a593SmuzhiyunNetlink interface for ethtool 3*4882a593Smuzhiyun============================= 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunBasic information 7*4882a593Smuzhiyun================= 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunNetlink interface for ethtool uses generic netlink family ``ethtool`` 10*4882a593Smuzhiyun(userspace application should use macros ``ETHTOOL_GENL_NAME`` and 11*4882a593Smuzhiyun``ETHTOOL_GENL_VERSION`` defined in ``<linux/ethtool_netlink.h>`` uapi 12*4882a593Smuzhiyunheader). This family does not use a specific header, all information in 13*4882a593Smuzhiyunrequests and replies is passed using netlink attributes. 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunThe ethtool netlink interface uses extended ACK for error and warning 16*4882a593Smuzhiyunreporting, userspace application developers are encouraged to make these 17*4882a593Smuzhiyunmessages available to user in a suitable way. 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunRequests can be divided into three categories: "get" (retrieving information), 20*4882a593Smuzhiyun"set" (setting parameters) and "action" (invoking an action). 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunAll "set" and "action" type requests require admin privileges 23*4882a593Smuzhiyun(``CAP_NET_ADMIN`` in the namespace). Most "get" type requests are allowed for 24*4882a593Smuzhiyunanyone but there are exceptions (where the response contains sensitive 25*4882a593Smuzhiyuninformation). In some cases, the request as such is allowed for anyone but 26*4882a593Smuzhiyununprivileged users have attributes with sensitive information (e.g. 27*4882a593Smuzhiyunwake-on-lan password) omitted. 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun 30*4882a593SmuzhiyunConventions 31*4882a593Smuzhiyun=========== 32*4882a593Smuzhiyun 33*4882a593SmuzhiyunAttributes which represent a boolean value usually use NLA_U8 type so that we 34*4882a593Smuzhiyuncan distinguish three states: "on", "off" and "not present" (meaning the 35*4882a593Smuzhiyuninformation is not available in "get" requests or value is not to be changed 36*4882a593Smuzhiyunin "set" requests). For these attributes, the "true" value should be passed as 37*4882a593Smuzhiyunnumber 1 but any non-zero value should be understood as "true" by recipient. 38*4882a593SmuzhiyunIn the tables below, "bool" denotes NLA_U8 attributes interpreted in this way. 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunIn the message structure descriptions below, if an attribute name is suffixed 41*4882a593Smuzhiyunwith "+", parent nest can contain multiple attributes of the same type. This 42*4882a593Smuzhiyunimplements an array of entries. 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun 45*4882a593SmuzhiyunRequest header 46*4882a593Smuzhiyun============== 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunEach request or reply message contains a nested attribute with common header. 49*4882a593SmuzhiyunStructure of this header is 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun ============================== ====== ============================= 52*4882a593Smuzhiyun ``ETHTOOL_A_HEADER_DEV_INDEX`` u32 device ifindex 53*4882a593Smuzhiyun ``ETHTOOL_A_HEADER_DEV_NAME`` string device name 54*4882a593Smuzhiyun ``ETHTOOL_A_HEADER_FLAGS`` u32 flags common for all requests 55*4882a593Smuzhiyun ============================== ====== ============================= 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun``ETHTOOL_A_HEADER_DEV_INDEX`` and ``ETHTOOL_A_HEADER_DEV_NAME`` identify the 58*4882a593Smuzhiyundevice message relates to. One of them is sufficient in requests, if both are 59*4882a593Smuzhiyunused, they must identify the same device. Some requests, e.g. global string 60*4882a593Smuzhiyunsets, do not require device identification. Most ``GET`` requests also allow 61*4882a593Smuzhiyundump requests without device identification to query the same information for 62*4882a593Smuzhiyunall devices providing it (each device in a separate message). 63*4882a593Smuzhiyun 64*4882a593Smuzhiyun``ETHTOOL_A_HEADER_FLAGS`` is a bitmap of request flags common for all request 65*4882a593Smuzhiyuntypes. The interpretation of these flags is the same for all request types but 66*4882a593Smuzhiyunthe flags may not apply to requests. Recognized flags are: 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun ================================= =================================== 69*4882a593Smuzhiyun ``ETHTOOL_FLAG_COMPACT_BITSETS`` use compact format bitsets in reply 70*4882a593Smuzhiyun ``ETHTOOL_FLAG_OMIT_REPLY`` omit optional reply (_SET and _ACT) 71*4882a593Smuzhiyun ``ETHTOOL_FLAG_STATS`` include optional device statistics 72*4882a593Smuzhiyun ================================= =================================== 73*4882a593Smuzhiyun 74*4882a593SmuzhiyunNew request flags should follow the general idea that if the flag is not set, 75*4882a593Smuzhiyunthe behaviour is backward compatible, i.e. requests from old clients not aware 76*4882a593Smuzhiyunof the flag should be interpreted the way the client expects. A client must 77*4882a593Smuzhiyunnot set flags it does not understand. 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun 80*4882a593SmuzhiyunBit sets 81*4882a593Smuzhiyun======== 82*4882a593Smuzhiyun 83*4882a593SmuzhiyunFor short bitmaps of (reasonably) fixed length, standard ``NLA_BITFIELD32`` 84*4882a593Smuzhiyuntype is used. For arbitrary length bitmaps, ethtool netlink uses a nested 85*4882a593Smuzhiyunattribute with contents of one of two forms: compact (two binary bitmaps 86*4882a593Smuzhiyunrepresenting bit values and mask of affected bits) and bit-by-bit (list of 87*4882a593Smuzhiyunbits identified by either index or name). 88*4882a593Smuzhiyun 89*4882a593SmuzhiyunVerbose (bit-by-bit) bitsets allow sending symbolic names for bits together 90*4882a593Smuzhiyunwith their values which saves a round trip (when the bitset is passed in a 91*4882a593Smuzhiyunrequest) or at least a second request (when the bitset is in a reply). This is 92*4882a593Smuzhiyunuseful for one shot applications like traditional ethtool command. On the 93*4882a593Smuzhiyunother hand, long running applications like ethtool monitor (displaying 94*4882a593Smuzhiyunnotifications) or network management daemons may prefer fetching the names 95*4882a593Smuzhiyunonly once and using compact form to save message size. Notifications from 96*4882a593Smuzhiyunethtool netlink interface always use compact form for bitsets. 97*4882a593Smuzhiyun 98*4882a593SmuzhiyunA bitset can represent either a value/mask pair (``ETHTOOL_A_BITSET_NOMASK`` 99*4882a593Smuzhiyunnot set) or a single bitmap (``ETHTOOL_A_BITSET_NOMASK`` set). In requests 100*4882a593Smuzhiyunmodifying a bitmap, the former changes the bit set in mask to values set in 101*4882a593Smuzhiyunvalue and preserves the rest; the latter sets the bits set in the bitmap and 102*4882a593Smuzhiyunclears the rest. 103*4882a593Smuzhiyun 104*4882a593SmuzhiyunCompact form: nested (bitset) atrribute contents: 105*4882a593Smuzhiyun 106*4882a593Smuzhiyun ============================ ====== ============================ 107*4882a593Smuzhiyun ``ETHTOOL_A_BITSET_NOMASK`` flag no mask, only a list 108*4882a593Smuzhiyun ``ETHTOOL_A_BITSET_SIZE`` u32 number of significant bits 109*4882a593Smuzhiyun ``ETHTOOL_A_BITSET_VALUE`` binary bitmap of bit values 110*4882a593Smuzhiyun ``ETHTOOL_A_BITSET_MASK`` binary bitmap of valid bits 111*4882a593Smuzhiyun ============================ ====== ============================ 112*4882a593Smuzhiyun 113*4882a593SmuzhiyunValue and mask must have length at least ``ETHTOOL_A_BITSET_SIZE`` bits 114*4882a593Smuzhiyunrounded up to a multiple of 32 bits. They consist of 32-bit words in host byte 115*4882a593Smuzhiyunorder, words ordered from least significant to most significant (i.e. the same 116*4882a593Smuzhiyunway as bitmaps are passed with ioctl interface). 117*4882a593Smuzhiyun 118*4882a593SmuzhiyunFor compact form, ``ETHTOOL_A_BITSET_SIZE`` and ``ETHTOOL_A_BITSET_VALUE`` are 119*4882a593Smuzhiyunmandatory. ``ETHTOOL_A_BITSET_MASK`` attribute is mandatory if 120*4882a593Smuzhiyun``ETHTOOL_A_BITSET_NOMASK`` is not set (bitset represents a value/mask pair); 121*4882a593Smuzhiyunif ``ETHTOOL_A_BITSET_NOMASK`` is not set, ``ETHTOOL_A_BITSET_MASK`` is not 122*4882a593Smuzhiyunallowed (bitset represents a single bitmap. 123*4882a593Smuzhiyun 124*4882a593SmuzhiyunKernel bit set length may differ from userspace length if older application is 125*4882a593Smuzhiyunused on newer kernel or vice versa. If userspace bitmap is longer, an error is 126*4882a593Smuzhiyunissued only if the request actually tries to set values of some bits not 127*4882a593Smuzhiyunrecognized by kernel. 128*4882a593Smuzhiyun 129*4882a593SmuzhiyunBit-by-bit form: nested (bitset) attribute contents: 130*4882a593Smuzhiyun 131*4882a593Smuzhiyun +------------------------------------+--------+-----------------------------+ 132*4882a593Smuzhiyun | ``ETHTOOL_A_BITSET_NOMASK`` | flag | no mask, only a list | 133*4882a593Smuzhiyun +------------------------------------+--------+-----------------------------+ 134*4882a593Smuzhiyun | ``ETHTOOL_A_BITSET_SIZE`` | u32 | number of significant bits | 135*4882a593Smuzhiyun +------------------------------------+--------+-----------------------------+ 136*4882a593Smuzhiyun | ``ETHTOOL_A_BITSET_BITS`` | nested | array of bits | 137*4882a593Smuzhiyun +-+----------------------------------+--------+-----------------------------+ 138*4882a593Smuzhiyun | | ``ETHTOOL_A_BITSET_BITS_BIT+`` | nested | one bit | 139*4882a593Smuzhiyun +-+-+--------------------------------+--------+-----------------------------+ 140*4882a593Smuzhiyun | | | ``ETHTOOL_A_BITSET_BIT_INDEX`` | u32 | bit index (0 for LSB) | 141*4882a593Smuzhiyun +-+-+--------------------------------+--------+-----------------------------+ 142*4882a593Smuzhiyun | | | ``ETHTOOL_A_BITSET_BIT_NAME`` | string | bit name | 143*4882a593Smuzhiyun +-+-+--------------------------------+--------+-----------------------------+ 144*4882a593Smuzhiyun | | | ``ETHTOOL_A_BITSET_BIT_VALUE`` | flag | present if bit is set | 145*4882a593Smuzhiyun +-+-+--------------------------------+--------+-----------------------------+ 146*4882a593Smuzhiyun 147*4882a593SmuzhiyunBit size is optional for bit-by-bit form. ``ETHTOOL_A_BITSET_BITS`` nest can 148*4882a593Smuzhiyunonly contain ``ETHTOOL_A_BITSET_BITS_BIT`` attributes but there can be an 149*4882a593Smuzhiyunarbitrary number of them. A bit may be identified by its index or by its 150*4882a593Smuzhiyunname. When used in requests, listed bits are set to 0 or 1 according to 151*4882a593Smuzhiyun``ETHTOOL_A_BITSET_BIT_VALUE``, the rest is preserved. A request fails if 152*4882a593Smuzhiyunindex exceeds kernel bit length or if name is not recognized. 153*4882a593Smuzhiyun 154*4882a593SmuzhiyunWhen ``ETHTOOL_A_BITSET_NOMASK`` flag is present, bitset is interpreted as 155*4882a593Smuzhiyuna simple bitmap. ``ETHTOOL_A_BITSET_BIT_VALUE`` attributes are not used in 156*4882a593Smuzhiyunsuch case. Such bitset represents a bitmap with listed bits set and the rest 157*4882a593Smuzhiyunzero. 158*4882a593Smuzhiyun 159*4882a593SmuzhiyunIn requests, application can use either form. Form used by kernel in reply is 160*4882a593Smuzhiyundetermined by ``ETHTOOL_FLAG_COMPACT_BITSETS`` flag in flags field of request 161*4882a593Smuzhiyunheader. Semantics of value and mask depends on the attribute. 162*4882a593Smuzhiyun 163*4882a593Smuzhiyun 164*4882a593SmuzhiyunList of message types 165*4882a593Smuzhiyun===================== 166*4882a593Smuzhiyun 167*4882a593SmuzhiyunAll constants identifying message types use ``ETHTOOL_CMD_`` prefix and suffix 168*4882a593Smuzhiyunaccording to message purpose: 169*4882a593Smuzhiyun 170*4882a593Smuzhiyun ============== ====================================== 171*4882a593Smuzhiyun ``_GET`` userspace request to retrieve data 172*4882a593Smuzhiyun ``_SET`` userspace request to set data 173*4882a593Smuzhiyun ``_ACT`` userspace request to perform an action 174*4882a593Smuzhiyun ``_GET_REPLY`` kernel reply to a ``GET`` request 175*4882a593Smuzhiyun ``_SET_REPLY`` kernel reply to a ``SET`` request 176*4882a593Smuzhiyun ``_ACT_REPLY`` kernel reply to an ``ACT`` request 177*4882a593Smuzhiyun ``_NTF`` kernel notification 178*4882a593Smuzhiyun ============== ====================================== 179*4882a593Smuzhiyun 180*4882a593SmuzhiyunUserspace to kernel: 181*4882a593Smuzhiyun 182*4882a593Smuzhiyun ===================================== ================================ 183*4882a593Smuzhiyun ``ETHTOOL_MSG_STRSET_GET`` get string set 184*4882a593Smuzhiyun ``ETHTOOL_MSG_LINKINFO_GET`` get link settings 185*4882a593Smuzhiyun ``ETHTOOL_MSG_LINKINFO_SET`` set link settings 186*4882a593Smuzhiyun ``ETHTOOL_MSG_LINKMODES_GET`` get link modes info 187*4882a593Smuzhiyun ``ETHTOOL_MSG_LINKMODES_SET`` set link modes info 188*4882a593Smuzhiyun ``ETHTOOL_MSG_LINKSTATE_GET`` get link state 189*4882a593Smuzhiyun ``ETHTOOL_MSG_DEBUG_GET`` get debugging settings 190*4882a593Smuzhiyun ``ETHTOOL_MSG_DEBUG_SET`` set debugging settings 191*4882a593Smuzhiyun ``ETHTOOL_MSG_WOL_GET`` get wake-on-lan settings 192*4882a593Smuzhiyun ``ETHTOOL_MSG_WOL_SET`` set wake-on-lan settings 193*4882a593Smuzhiyun ``ETHTOOL_MSG_FEATURES_GET`` get device features 194*4882a593Smuzhiyun ``ETHTOOL_MSG_FEATURES_SET`` set device features 195*4882a593Smuzhiyun ``ETHTOOL_MSG_PRIVFLAGS_GET`` get private flags 196*4882a593Smuzhiyun ``ETHTOOL_MSG_PRIVFLAGS_SET`` set private flags 197*4882a593Smuzhiyun ``ETHTOOL_MSG_RINGS_GET`` get ring sizes 198*4882a593Smuzhiyun ``ETHTOOL_MSG_RINGS_SET`` set ring sizes 199*4882a593Smuzhiyun ``ETHTOOL_MSG_CHANNELS_GET`` get channel counts 200*4882a593Smuzhiyun ``ETHTOOL_MSG_CHANNELS_SET`` set channel counts 201*4882a593Smuzhiyun ``ETHTOOL_MSG_COALESCE_GET`` get coalescing parameters 202*4882a593Smuzhiyun ``ETHTOOL_MSG_COALESCE_SET`` set coalescing parameters 203*4882a593Smuzhiyun ``ETHTOOL_MSG_PAUSE_GET`` get pause parameters 204*4882a593Smuzhiyun ``ETHTOOL_MSG_PAUSE_SET`` set pause parameters 205*4882a593Smuzhiyun ``ETHTOOL_MSG_EEE_GET`` get EEE settings 206*4882a593Smuzhiyun ``ETHTOOL_MSG_EEE_SET`` set EEE settings 207*4882a593Smuzhiyun ``ETHTOOL_MSG_TSINFO_GET`` get timestamping info 208*4882a593Smuzhiyun ``ETHTOOL_MSG_CABLE_TEST_ACT`` action start cable test 209*4882a593Smuzhiyun ``ETHTOOL_MSG_CABLE_TEST_TDR_ACT`` action start raw TDR cable test 210*4882a593Smuzhiyun ``ETHTOOL_MSG_TUNNEL_INFO_GET`` get tunnel offload info 211*4882a593Smuzhiyun ===================================== ================================ 212*4882a593Smuzhiyun 213*4882a593SmuzhiyunKernel to userspace: 214*4882a593Smuzhiyun 215*4882a593Smuzhiyun ===================================== ================================= 216*4882a593Smuzhiyun ``ETHTOOL_MSG_STRSET_GET_REPLY`` string set contents 217*4882a593Smuzhiyun ``ETHTOOL_MSG_LINKINFO_GET_REPLY`` link settings 218*4882a593Smuzhiyun ``ETHTOOL_MSG_LINKINFO_NTF`` link settings notification 219*4882a593Smuzhiyun ``ETHTOOL_MSG_LINKMODES_GET_REPLY`` link modes info 220*4882a593Smuzhiyun ``ETHTOOL_MSG_LINKMODES_NTF`` link modes notification 221*4882a593Smuzhiyun ``ETHTOOL_MSG_LINKSTATE_GET_REPLY`` link state info 222*4882a593Smuzhiyun ``ETHTOOL_MSG_DEBUG_GET_REPLY`` debugging settings 223*4882a593Smuzhiyun ``ETHTOOL_MSG_DEBUG_NTF`` debugging settings notification 224*4882a593Smuzhiyun ``ETHTOOL_MSG_WOL_GET_REPLY`` wake-on-lan settings 225*4882a593Smuzhiyun ``ETHTOOL_MSG_WOL_NTF`` wake-on-lan settings notification 226*4882a593Smuzhiyun ``ETHTOOL_MSG_FEATURES_GET_REPLY`` device features 227*4882a593Smuzhiyun ``ETHTOOL_MSG_FEATURES_SET_REPLY`` optional reply to FEATURES_SET 228*4882a593Smuzhiyun ``ETHTOOL_MSG_FEATURES_NTF`` netdev features notification 229*4882a593Smuzhiyun ``ETHTOOL_MSG_PRIVFLAGS_GET_REPLY`` private flags 230*4882a593Smuzhiyun ``ETHTOOL_MSG_PRIVFLAGS_NTF`` private flags 231*4882a593Smuzhiyun ``ETHTOOL_MSG_RINGS_GET_REPLY`` ring sizes 232*4882a593Smuzhiyun ``ETHTOOL_MSG_RINGS_NTF`` ring sizes 233*4882a593Smuzhiyun ``ETHTOOL_MSG_CHANNELS_GET_REPLY`` channel counts 234*4882a593Smuzhiyun ``ETHTOOL_MSG_CHANNELS_NTF`` channel counts 235*4882a593Smuzhiyun ``ETHTOOL_MSG_COALESCE_GET_REPLY`` coalescing parameters 236*4882a593Smuzhiyun ``ETHTOOL_MSG_COALESCE_NTF`` coalescing parameters 237*4882a593Smuzhiyun ``ETHTOOL_MSG_PAUSE_GET_REPLY`` pause parameters 238*4882a593Smuzhiyun ``ETHTOOL_MSG_PAUSE_NTF`` pause parameters 239*4882a593Smuzhiyun ``ETHTOOL_MSG_EEE_GET_REPLY`` EEE settings 240*4882a593Smuzhiyun ``ETHTOOL_MSG_EEE_NTF`` EEE settings 241*4882a593Smuzhiyun ``ETHTOOL_MSG_TSINFO_GET_REPLY`` timestamping info 242*4882a593Smuzhiyun ``ETHTOOL_MSG_CABLE_TEST_NTF`` Cable test results 243*4882a593Smuzhiyun ``ETHTOOL_MSG_CABLE_TEST_TDR_NTF`` Cable test TDR results 244*4882a593Smuzhiyun ``ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY`` tunnel offload info 245*4882a593Smuzhiyun ===================================== ================================= 246*4882a593Smuzhiyun 247*4882a593Smuzhiyun``GET`` requests are sent by userspace applications to retrieve device 248*4882a593Smuzhiyuninformation. They usually do not contain any message specific attributes. 249*4882a593SmuzhiyunKernel replies with corresponding "GET_REPLY" message. For most types, ``GET`` 250*4882a593Smuzhiyunrequest with ``NLM_F_DUMP`` and no device identification can be used to query 251*4882a593Smuzhiyunthe information for all devices supporting the request. 252*4882a593Smuzhiyun 253*4882a593SmuzhiyunIf the data can be also modified, corresponding ``SET`` message with the same 254*4882a593Smuzhiyunlayout as corresponding ``GET_REPLY`` is used to request changes. Only 255*4882a593Smuzhiyunattributes where a change is requested are included in such request (also, not 256*4882a593Smuzhiyunall attributes may be changed). Replies to most ``SET`` request consist only 257*4882a593Smuzhiyunof error code and extack; if kernel provides additional data, it is sent in 258*4882a593Smuzhiyunthe form of corresponding ``SET_REPLY`` message which can be suppressed by 259*4882a593Smuzhiyunsetting ``ETHTOOL_FLAG_OMIT_REPLY`` flag in request header. 260*4882a593Smuzhiyun 261*4882a593SmuzhiyunData modification also triggers sending a ``NTF`` message with a notification. 262*4882a593SmuzhiyunThese usually bear only a subset of attributes which was affected by the 263*4882a593Smuzhiyunchange. The same notification is issued if the data is modified using other 264*4882a593Smuzhiyunmeans (mostly ioctl ethtool interface). Unlike notifications from ethtool 265*4882a593Smuzhiyunnetlink code which are only sent if something actually changed, notifications 266*4882a593Smuzhiyuntriggered by ioctl interface may be sent even if the request did not actually 267*4882a593Smuzhiyunchange any data. 268*4882a593Smuzhiyun 269*4882a593Smuzhiyun``ACT`` messages request kernel (driver) to perform a specific action. If some 270*4882a593Smuzhiyuninformation is reported by kernel (which can be suppressed by setting 271*4882a593Smuzhiyun``ETHTOOL_FLAG_OMIT_REPLY`` flag in request header), the reply takes form of 272*4882a593Smuzhiyunan ``ACT_REPLY`` message. Performing an action also triggers a notification 273*4882a593Smuzhiyun(``NTF`` message). 274*4882a593Smuzhiyun 275*4882a593SmuzhiyunLater sections describe the format and semantics of these messages. 276*4882a593Smuzhiyun 277*4882a593Smuzhiyun 278*4882a593SmuzhiyunSTRSET_GET 279*4882a593Smuzhiyun========== 280*4882a593Smuzhiyun 281*4882a593SmuzhiyunRequests contents of a string set as provided by ioctl commands 282*4882a593Smuzhiyun``ETHTOOL_GSSET_INFO`` and ``ETHTOOL_GSTRINGS.`` String sets are not user 283*4882a593Smuzhiyunwriteable so that the corresponding ``STRSET_SET`` message is only used in 284*4882a593Smuzhiyunkernel replies. There are two types of string sets: global (independent of 285*4882a593Smuzhiyuna device, e.g. device feature names) and device specific (e.g. device private 286*4882a593Smuzhiyunflags). 287*4882a593Smuzhiyun 288*4882a593SmuzhiyunRequest contents: 289*4882a593Smuzhiyun 290*4882a593Smuzhiyun +---------------------------------------+--------+------------------------+ 291*4882a593Smuzhiyun | ``ETHTOOL_A_STRSET_HEADER`` | nested | request header | 292*4882a593Smuzhiyun +---------------------------------------+--------+------------------------+ 293*4882a593Smuzhiyun | ``ETHTOOL_A_STRSET_STRINGSETS`` | nested | string set to request | 294*4882a593Smuzhiyun +-+-------------------------------------+--------+------------------------+ 295*4882a593Smuzhiyun | | ``ETHTOOL_A_STRINGSETS_STRINGSET+`` | nested | one string set | 296*4882a593Smuzhiyun +-+-+-----------------------------------+--------+------------------------+ 297*4882a593Smuzhiyun | | | ``ETHTOOL_A_STRINGSET_ID`` | u32 | set id | 298*4882a593Smuzhiyun +-+-+-----------------------------------+--------+------------------------+ 299*4882a593Smuzhiyun 300*4882a593SmuzhiyunKernel response contents: 301*4882a593Smuzhiyun 302*4882a593Smuzhiyun +---------------------------------------+--------+-----------------------+ 303*4882a593Smuzhiyun | ``ETHTOOL_A_STRSET_HEADER`` | nested | reply header | 304*4882a593Smuzhiyun +---------------------------------------+--------+-----------------------+ 305*4882a593Smuzhiyun | ``ETHTOOL_A_STRSET_STRINGSETS`` | nested | array of string sets | 306*4882a593Smuzhiyun +-+-------------------------------------+--------+-----------------------+ 307*4882a593Smuzhiyun | | ``ETHTOOL_A_STRINGSETS_STRINGSET+`` | nested | one string set | 308*4882a593Smuzhiyun +-+-+-----------------------------------+--------+-----------------------+ 309*4882a593Smuzhiyun | | | ``ETHTOOL_A_STRINGSET_ID`` | u32 | set id | 310*4882a593Smuzhiyun +-+-+-----------------------------------+--------+-----------------------+ 311*4882a593Smuzhiyun | | | ``ETHTOOL_A_STRINGSET_COUNT`` | u32 | number of strings | 312*4882a593Smuzhiyun +-+-+-----------------------------------+--------+-----------------------+ 313*4882a593Smuzhiyun | | | ``ETHTOOL_A_STRINGSET_STRINGS`` | nested | array of strings | 314*4882a593Smuzhiyun +-+-+-+---------------------------------+--------+-----------------------+ 315*4882a593Smuzhiyun | | | | ``ETHTOOL_A_STRINGS_STRING+`` | nested | one string | 316*4882a593Smuzhiyun +-+-+-+-+-------------------------------+--------+-----------------------+ 317*4882a593Smuzhiyun | | | | | ``ETHTOOL_A_STRING_INDEX`` | u32 | string index | 318*4882a593Smuzhiyun +-+-+-+-+-------------------------------+--------+-----------------------+ 319*4882a593Smuzhiyun | | | | | ``ETHTOOL_A_STRING_VALUE`` | string | string value | 320*4882a593Smuzhiyun +-+-+-+-+-------------------------------+--------+-----------------------+ 321*4882a593Smuzhiyun | ``ETHTOOL_A_STRSET_COUNTS_ONLY`` | flag | return only counts | 322*4882a593Smuzhiyun +---------------------------------------+--------+-----------------------+ 323*4882a593Smuzhiyun 324*4882a593SmuzhiyunDevice identification in request header is optional. Depending on its presence 325*4882a593Smuzhiyuna and ``NLM_F_DUMP`` flag, there are three type of ``STRSET_GET`` requests: 326*4882a593Smuzhiyun 327*4882a593Smuzhiyun - no ``NLM_F_DUMP,`` no device: get "global" stringsets 328*4882a593Smuzhiyun - no ``NLM_F_DUMP``, with device: get string sets related to the device 329*4882a593Smuzhiyun - ``NLM_F_DUMP``, no device: get device related string sets for all devices 330*4882a593Smuzhiyun 331*4882a593SmuzhiyunIf there is no ``ETHTOOL_A_STRSET_STRINGSETS`` array, all string sets of 332*4882a593Smuzhiyunrequested type are returned, otherwise only those specified in the request. 333*4882a593SmuzhiyunFlag ``ETHTOOL_A_STRSET_COUNTS_ONLY`` tells kernel to only return string 334*4882a593Smuzhiyuncounts of the sets, not the actual strings. 335*4882a593Smuzhiyun 336*4882a593Smuzhiyun 337*4882a593SmuzhiyunLINKINFO_GET 338*4882a593Smuzhiyun============ 339*4882a593Smuzhiyun 340*4882a593SmuzhiyunRequests link settings as provided by ``ETHTOOL_GLINKSETTINGS`` except for 341*4882a593Smuzhiyunlink modes and autonegotiation related information. The request does not use 342*4882a593Smuzhiyunany attributes. 343*4882a593Smuzhiyun 344*4882a593SmuzhiyunRequest contents: 345*4882a593Smuzhiyun 346*4882a593Smuzhiyun ==================================== ====== ========================== 347*4882a593Smuzhiyun ``ETHTOOL_A_LINKINFO_HEADER`` nested request header 348*4882a593Smuzhiyun ==================================== ====== ========================== 349*4882a593Smuzhiyun 350*4882a593SmuzhiyunKernel response contents: 351*4882a593Smuzhiyun 352*4882a593Smuzhiyun ==================================== ====== ========================== 353*4882a593Smuzhiyun ``ETHTOOL_A_LINKINFO_HEADER`` nested reply header 354*4882a593Smuzhiyun ``ETHTOOL_A_LINKINFO_PORT`` u8 physical port 355*4882a593Smuzhiyun ``ETHTOOL_A_LINKINFO_PHYADDR`` u8 phy MDIO address 356*4882a593Smuzhiyun ``ETHTOOL_A_LINKINFO_TP_MDIX`` u8 MDI(-X) status 357*4882a593Smuzhiyun ``ETHTOOL_A_LINKINFO_TP_MDIX_CTRL`` u8 MDI(-X) control 358*4882a593Smuzhiyun ``ETHTOOL_A_LINKINFO_TRANSCEIVER`` u8 transceiver 359*4882a593Smuzhiyun ==================================== ====== ========================== 360*4882a593Smuzhiyun 361*4882a593SmuzhiyunAttributes and their values have the same meaning as matching members of the 362*4882a593Smuzhiyuncorresponding ioctl structures. 363*4882a593Smuzhiyun 364*4882a593Smuzhiyun``LINKINFO_GET`` allows dump requests (kernel returns reply message for all 365*4882a593Smuzhiyundevices supporting the request). 366*4882a593Smuzhiyun 367*4882a593Smuzhiyun 368*4882a593SmuzhiyunLINKINFO_SET 369*4882a593Smuzhiyun============ 370*4882a593Smuzhiyun 371*4882a593Smuzhiyun``LINKINFO_SET`` request allows setting some of the attributes reported by 372*4882a593Smuzhiyun``LINKINFO_GET``. 373*4882a593Smuzhiyun 374*4882a593SmuzhiyunRequest contents: 375*4882a593Smuzhiyun 376*4882a593Smuzhiyun ==================================== ====== ========================== 377*4882a593Smuzhiyun ``ETHTOOL_A_LINKINFO_HEADER`` nested request header 378*4882a593Smuzhiyun ``ETHTOOL_A_LINKINFO_PORT`` u8 physical port 379*4882a593Smuzhiyun ``ETHTOOL_A_LINKINFO_PHYADDR`` u8 phy MDIO address 380*4882a593Smuzhiyun ``ETHTOOL_A_LINKINFO_TP_MDIX_CTRL`` u8 MDI(-X) control 381*4882a593Smuzhiyun ==================================== ====== ========================== 382*4882a593Smuzhiyun 383*4882a593SmuzhiyunMDI(-X) status and transceiver cannot be set, request with the corresponding 384*4882a593Smuzhiyunattributes is rejected. 385*4882a593Smuzhiyun 386*4882a593Smuzhiyun 387*4882a593SmuzhiyunLINKMODES_GET 388*4882a593Smuzhiyun============= 389*4882a593Smuzhiyun 390*4882a593SmuzhiyunRequests link modes (supported, advertised and peer advertised) and related 391*4882a593Smuzhiyuninformation (autonegotiation status, link speed and duplex) as provided by 392*4882a593Smuzhiyun``ETHTOOL_GLINKSETTINGS``. The request does not use any attributes. 393*4882a593Smuzhiyun 394*4882a593SmuzhiyunRequest contents: 395*4882a593Smuzhiyun 396*4882a593Smuzhiyun ==================================== ====== ========================== 397*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_HEADER`` nested request header 398*4882a593Smuzhiyun ==================================== ====== ========================== 399*4882a593Smuzhiyun 400*4882a593SmuzhiyunKernel response contents: 401*4882a593Smuzhiyun 402*4882a593Smuzhiyun ========================================== ====== ========================== 403*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_HEADER`` nested reply header 404*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_AUTONEG`` u8 autonegotiation status 405*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_OURS`` bitset advertised link modes 406*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_PEER`` bitset partner link modes 407*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_SPEED`` u32 link speed (Mb/s) 408*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_DUPLEX`` u8 duplex mode 409*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG`` u8 Master/slave port mode 410*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE`` u8 Master/slave port state 411*4882a593Smuzhiyun ========================================== ====== ========================== 412*4882a593Smuzhiyun 413*4882a593SmuzhiyunFor ``ETHTOOL_A_LINKMODES_OURS``, value represents advertised modes and mask 414*4882a593Smuzhiyunrepresents supported modes. ``ETHTOOL_A_LINKMODES_PEER`` in the reply is a bit 415*4882a593Smuzhiyunlist. 416*4882a593Smuzhiyun 417*4882a593Smuzhiyun``LINKMODES_GET`` allows dump requests (kernel returns reply messages for all 418*4882a593Smuzhiyundevices supporting the request). 419*4882a593Smuzhiyun 420*4882a593Smuzhiyun 421*4882a593SmuzhiyunLINKMODES_SET 422*4882a593Smuzhiyun============= 423*4882a593Smuzhiyun 424*4882a593SmuzhiyunRequest contents: 425*4882a593Smuzhiyun 426*4882a593Smuzhiyun ========================================== ====== ========================== 427*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_HEADER`` nested request header 428*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_AUTONEG`` u8 autonegotiation status 429*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_OURS`` bitset advertised link modes 430*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_PEER`` bitset partner link modes 431*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_SPEED`` u32 link speed (Mb/s) 432*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_DUPLEX`` u8 duplex mode 433*4882a593Smuzhiyun ``ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG`` u8 Master/slave port mode 434*4882a593Smuzhiyun ========================================== ====== ========================== 435*4882a593Smuzhiyun 436*4882a593Smuzhiyun``ETHTOOL_A_LINKMODES_OURS`` bit set allows setting advertised link modes. If 437*4882a593Smuzhiyunautonegotiation is on (either set now or kept from before), advertised modes 438*4882a593Smuzhiyunare not changed (no ``ETHTOOL_A_LINKMODES_OURS`` attribute) and at least one 439*4882a593Smuzhiyunof speed and duplex is specified, kernel adjusts advertised modes to all 440*4882a593Smuzhiyunsupported modes matching speed, duplex or both (whatever is specified). This 441*4882a593Smuzhiyunautoselection is done on ethtool side with ioctl interface, netlink interface 442*4882a593Smuzhiyunis supposed to allow requesting changes without knowing what exactly kernel 443*4882a593Smuzhiyunsupports. 444*4882a593Smuzhiyun 445*4882a593Smuzhiyun 446*4882a593SmuzhiyunLINKSTATE_GET 447*4882a593Smuzhiyun============= 448*4882a593Smuzhiyun 449*4882a593SmuzhiyunRequests link state information. Link up/down flag (as provided by 450*4882a593Smuzhiyun``ETHTOOL_GLINK`` ioctl command) is provided. Optionally, extended state might 451*4882a593Smuzhiyunbe provided as well. In general, extended state describes reasons for why a port 452*4882a593Smuzhiyunis down, or why it operates in some non-obvious mode. This request does not have 453*4882a593Smuzhiyunany attributes. 454*4882a593Smuzhiyun 455*4882a593SmuzhiyunRequest contents: 456*4882a593Smuzhiyun 457*4882a593Smuzhiyun ==================================== ====== ========================== 458*4882a593Smuzhiyun ``ETHTOOL_A_LINKSTATE_HEADER`` nested request header 459*4882a593Smuzhiyun ==================================== ====== ========================== 460*4882a593Smuzhiyun 461*4882a593SmuzhiyunKernel response contents: 462*4882a593Smuzhiyun 463*4882a593Smuzhiyun ==================================== ====== ============================ 464*4882a593Smuzhiyun ``ETHTOOL_A_LINKSTATE_HEADER`` nested reply header 465*4882a593Smuzhiyun ``ETHTOOL_A_LINKSTATE_LINK`` bool link state (up/down) 466*4882a593Smuzhiyun ``ETHTOOL_A_LINKSTATE_SQI`` u32 Current Signal Quality Index 467*4882a593Smuzhiyun ``ETHTOOL_A_LINKSTATE_SQI_MAX`` u32 Max support SQI value 468*4882a593Smuzhiyun ``ETHTOOL_A_LINKSTATE_EXT_STATE`` u8 link extended state 469*4882a593Smuzhiyun ``ETHTOOL_A_LINKSTATE_EXT_SUBSTATE`` u8 link extended substate 470*4882a593Smuzhiyun ==================================== ====== ============================ 471*4882a593Smuzhiyun 472*4882a593SmuzhiyunFor most NIC drivers, the value of ``ETHTOOL_A_LINKSTATE_LINK`` returns 473*4882a593Smuzhiyuncarrier flag provided by ``netif_carrier_ok()`` but there are drivers which 474*4882a593Smuzhiyundefine their own handler. 475*4882a593Smuzhiyun 476*4882a593Smuzhiyun``ETHTOOL_A_LINKSTATE_EXT_STATE`` and ``ETHTOOL_A_LINKSTATE_EXT_SUBSTATE`` are 477*4882a593Smuzhiyunoptional values. ethtool core can provide either both 478*4882a593Smuzhiyun``ETHTOOL_A_LINKSTATE_EXT_STATE`` and ``ETHTOOL_A_LINKSTATE_EXT_SUBSTATE``, 479*4882a593Smuzhiyunor only ``ETHTOOL_A_LINKSTATE_EXT_STATE``, or none of them. 480*4882a593Smuzhiyun 481*4882a593Smuzhiyun``LINKSTATE_GET`` allows dump requests (kernel returns reply messages for all 482*4882a593Smuzhiyundevices supporting the request). 483*4882a593Smuzhiyun 484*4882a593Smuzhiyun 485*4882a593SmuzhiyunLink extended states: 486*4882a593Smuzhiyun 487*4882a593Smuzhiyun ================================================ ============================================ 488*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_STATE_AUTONEG`` States relating to the autonegotiation or 489*4882a593Smuzhiyun issues therein 490*4882a593Smuzhiyun 491*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE`` Failure during link training 492*4882a593Smuzhiyun 493*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH`` Logical mismatch in physical coding sublayer 494*4882a593Smuzhiyun or forward error correction sublayer 495*4882a593Smuzhiyun 496*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY`` Signal integrity issues 497*4882a593Smuzhiyun 498*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_STATE_NO_CABLE`` No cable connected 499*4882a593Smuzhiyun 500*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE`` Failure is related to cable, 501*4882a593Smuzhiyun e.g., unsupported cable 502*4882a593Smuzhiyun 503*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_STATE_EEPROM_ISSUE`` Failure is related to EEPROM, e.g., failure 504*4882a593Smuzhiyun during reading or parsing the data 505*4882a593Smuzhiyun 506*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE`` Failure during calibration algorithm 507*4882a593Smuzhiyun 508*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED`` The hardware is not able to provide the 509*4882a593Smuzhiyun power required from cable or module 510*4882a593Smuzhiyun 511*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_STATE_OVERHEAT`` The module is overheated 512*4882a593Smuzhiyun ================================================ ============================================ 513*4882a593Smuzhiyun 514*4882a593SmuzhiyunLink extended substates: 515*4882a593Smuzhiyun 516*4882a593Smuzhiyun Autoneg substates: 517*4882a593Smuzhiyun 518*4882a593Smuzhiyun =============================================================== ================================ 519*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED`` Peer side is down 520*4882a593Smuzhiyun 521*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_AN_ACK_NOT_RECEIVED`` Ack not received from peer side 522*4882a593Smuzhiyun 523*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_AN_NEXT_PAGE_EXCHANGE_FAILED`` Next page exchange failed 524*4882a593Smuzhiyun 525*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED_FORCE_MODE`` Peer side is down during force 526*4882a593Smuzhiyun mode or there is no agreement of 527*4882a593Smuzhiyun speed 528*4882a593Smuzhiyun 529*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_AN_FEC_MISMATCH_DURING_OVERRIDE`` Forward error correction modes 530*4882a593Smuzhiyun in both sides are mismatched 531*4882a593Smuzhiyun 532*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_HCD`` No Highest Common Denominator 533*4882a593Smuzhiyun =============================================================== ================================ 534*4882a593Smuzhiyun 535*4882a593Smuzhiyun Link training substates: 536*4882a593Smuzhiyun 537*4882a593Smuzhiyun =========================================================================== ==================== 538*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_FRAME_LOCK_NOT_ACQUIRED`` Frames were not 539*4882a593Smuzhiyun recognized, the 540*4882a593Smuzhiyun lock failed 541*4882a593Smuzhiyun 542*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_INHIBIT_TIMEOUT`` The lock did not 543*4882a593Smuzhiyun occur before 544*4882a593Smuzhiyun timeout 545*4882a593Smuzhiyun 546*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_PARTNER_DID_NOT_SET_RECEIVER_READY`` Peer side did not 547*4882a593Smuzhiyun send ready signal 548*4882a593Smuzhiyun after training 549*4882a593Smuzhiyun process 550*4882a593Smuzhiyun 551*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT`` Remote side is not 552*4882a593Smuzhiyun ready yet 553*4882a593Smuzhiyun =========================================================================== ==================== 554*4882a593Smuzhiyun 555*4882a593Smuzhiyun Link logical mismatch substates: 556*4882a593Smuzhiyun 557*4882a593Smuzhiyun ================================================================ =============================== 558*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_BLOCK_LOCK`` Physical coding sublayer was 559*4882a593Smuzhiyun not locked in first phase - 560*4882a593Smuzhiyun block lock 561*4882a593Smuzhiyun 562*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_AM_LOCK`` Physical coding sublayer was 563*4882a593Smuzhiyun not locked in second phase - 564*4882a593Smuzhiyun alignment markers lock 565*4882a593Smuzhiyun 566*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_GET_ALIGN_STATUS`` Physical coding sublayer did 567*4882a593Smuzhiyun not get align status 568*4882a593Smuzhiyun 569*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_FC_FEC_IS_NOT_LOCKED`` FC forward error correction is 570*4882a593Smuzhiyun not locked 571*4882a593Smuzhiyun 572*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_LLM_RS_FEC_IS_NOT_LOCKED`` RS forward error correction is 573*4882a593Smuzhiyun not locked 574*4882a593Smuzhiyun ================================================================ =============================== 575*4882a593Smuzhiyun 576*4882a593Smuzhiyun Bad signal integrity substates: 577*4882a593Smuzhiyun 578*4882a593Smuzhiyun ================================================================= ============================= 579*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS`` Large number of physical 580*4882a593Smuzhiyun errors 581*4882a593Smuzhiyun 582*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE`` The system attempted to 583*4882a593Smuzhiyun operate the cable at a rate 584*4882a593Smuzhiyun that is not formally 585*4882a593Smuzhiyun supported, which led to 586*4882a593Smuzhiyun signal integrity issues 587*4882a593Smuzhiyun ================================================================= ============================= 588*4882a593Smuzhiyun 589*4882a593Smuzhiyun Cable issue substates: 590*4882a593Smuzhiyun 591*4882a593Smuzhiyun =================================================== ============================================ 592*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_CI_UNSUPPORTED_CABLE`` Unsupported cable 593*4882a593Smuzhiyun 594*4882a593Smuzhiyun ``ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE`` Cable test failure 595*4882a593Smuzhiyun =================================================== ============================================ 596*4882a593Smuzhiyun 597*4882a593SmuzhiyunDEBUG_GET 598*4882a593Smuzhiyun========= 599*4882a593Smuzhiyun 600*4882a593SmuzhiyunRequests debugging settings of a device. At the moment, only message mask is 601*4882a593Smuzhiyunprovided. 602*4882a593Smuzhiyun 603*4882a593SmuzhiyunRequest contents: 604*4882a593Smuzhiyun 605*4882a593Smuzhiyun ==================================== ====== ========================== 606*4882a593Smuzhiyun ``ETHTOOL_A_DEBUG_HEADER`` nested request header 607*4882a593Smuzhiyun ==================================== ====== ========================== 608*4882a593Smuzhiyun 609*4882a593SmuzhiyunKernel response contents: 610*4882a593Smuzhiyun 611*4882a593Smuzhiyun ==================================== ====== ========================== 612*4882a593Smuzhiyun ``ETHTOOL_A_DEBUG_HEADER`` nested reply header 613*4882a593Smuzhiyun ``ETHTOOL_A_DEBUG_MSGMASK`` bitset message mask 614*4882a593Smuzhiyun ==================================== ====== ========================== 615*4882a593Smuzhiyun 616*4882a593SmuzhiyunThe message mask (``ETHTOOL_A_DEBUG_MSGMASK``) is equal to message level as 617*4882a593Smuzhiyunprovided by ``ETHTOOL_GMSGLVL`` and set by ``ETHTOOL_SMSGLVL`` in ioctl 618*4882a593Smuzhiyuninterface. While it is called message level there for historical reasons, most 619*4882a593Smuzhiyundrivers and almost all newer drivers use it as a mask of enabled message 620*4882a593Smuzhiyunclasses (represented by ``NETIF_MSG_*`` constants); therefore netlink 621*4882a593Smuzhiyuninterface follows its actual use in practice. 622*4882a593Smuzhiyun 623*4882a593Smuzhiyun``DEBUG_GET`` allows dump requests (kernel returns reply messages for all 624*4882a593Smuzhiyundevices supporting the request). 625*4882a593Smuzhiyun 626*4882a593Smuzhiyun 627*4882a593SmuzhiyunDEBUG_SET 628*4882a593Smuzhiyun========= 629*4882a593Smuzhiyun 630*4882a593SmuzhiyunSet or update debugging settings of a device. At the moment, only message mask 631*4882a593Smuzhiyunis supported. 632*4882a593Smuzhiyun 633*4882a593SmuzhiyunRequest contents: 634*4882a593Smuzhiyun 635*4882a593Smuzhiyun ==================================== ====== ========================== 636*4882a593Smuzhiyun ``ETHTOOL_A_DEBUG_HEADER`` nested request header 637*4882a593Smuzhiyun ``ETHTOOL_A_DEBUG_MSGMASK`` bitset message mask 638*4882a593Smuzhiyun ==================================== ====== ========================== 639*4882a593Smuzhiyun 640*4882a593Smuzhiyun``ETHTOOL_A_DEBUG_MSGMASK`` bit set allows setting or modifying mask of 641*4882a593Smuzhiyunenabled debugging message types for the device. 642*4882a593Smuzhiyun 643*4882a593Smuzhiyun 644*4882a593SmuzhiyunWOL_GET 645*4882a593Smuzhiyun======= 646*4882a593Smuzhiyun 647*4882a593SmuzhiyunQuery device wake-on-lan settings. Unlike most "GET" type requests, 648*4882a593Smuzhiyun``ETHTOOL_MSG_WOL_GET`` requires (netns) ``CAP_NET_ADMIN`` privileges as it 649*4882a593Smuzhiyun(potentially) provides SecureOn(tm) password which is confidential. 650*4882a593Smuzhiyun 651*4882a593SmuzhiyunRequest contents: 652*4882a593Smuzhiyun 653*4882a593Smuzhiyun ==================================== ====== ========================== 654*4882a593Smuzhiyun ``ETHTOOL_A_WOL_HEADER`` nested request header 655*4882a593Smuzhiyun ==================================== ====== ========================== 656*4882a593Smuzhiyun 657*4882a593SmuzhiyunKernel response contents: 658*4882a593Smuzhiyun 659*4882a593Smuzhiyun ==================================== ====== ========================== 660*4882a593Smuzhiyun ``ETHTOOL_A_WOL_HEADER`` nested reply header 661*4882a593Smuzhiyun ``ETHTOOL_A_WOL_MODES`` bitset mask of enabled WoL modes 662*4882a593Smuzhiyun ``ETHTOOL_A_WOL_SOPASS`` binary SecureOn(tm) password 663*4882a593Smuzhiyun ==================================== ====== ========================== 664*4882a593Smuzhiyun 665*4882a593SmuzhiyunIn reply, ``ETHTOOL_A_WOL_MODES`` mask consists of modes supported by the 666*4882a593Smuzhiyundevice, value of modes which are enabled. ``ETHTOOL_A_WOL_SOPASS`` is only 667*4882a593Smuzhiyunincluded in reply if ``WAKE_MAGICSECURE`` mode is supported. 668*4882a593Smuzhiyun 669*4882a593Smuzhiyun 670*4882a593SmuzhiyunWOL_SET 671*4882a593Smuzhiyun======= 672*4882a593Smuzhiyun 673*4882a593SmuzhiyunSet or update wake-on-lan settings. 674*4882a593Smuzhiyun 675*4882a593SmuzhiyunRequest contents: 676*4882a593Smuzhiyun 677*4882a593Smuzhiyun ==================================== ====== ========================== 678*4882a593Smuzhiyun ``ETHTOOL_A_WOL_HEADER`` nested request header 679*4882a593Smuzhiyun ``ETHTOOL_A_WOL_MODES`` bitset enabled WoL modes 680*4882a593Smuzhiyun ``ETHTOOL_A_WOL_SOPASS`` binary SecureOn(tm) password 681*4882a593Smuzhiyun ==================================== ====== ========================== 682*4882a593Smuzhiyun 683*4882a593Smuzhiyun``ETHTOOL_A_WOL_SOPASS`` is only allowed for devices supporting 684*4882a593Smuzhiyun``WAKE_MAGICSECURE`` mode. 685*4882a593Smuzhiyun 686*4882a593Smuzhiyun 687*4882a593SmuzhiyunFEATURES_GET 688*4882a593Smuzhiyun============ 689*4882a593Smuzhiyun 690*4882a593SmuzhiyunGets netdev features like ``ETHTOOL_GFEATURES`` ioctl request. 691*4882a593Smuzhiyun 692*4882a593SmuzhiyunRequest contents: 693*4882a593Smuzhiyun 694*4882a593Smuzhiyun ==================================== ====== ========================== 695*4882a593Smuzhiyun ``ETHTOOL_A_FEATURES_HEADER`` nested request header 696*4882a593Smuzhiyun ==================================== ====== ========================== 697*4882a593Smuzhiyun 698*4882a593SmuzhiyunKernel response contents: 699*4882a593Smuzhiyun 700*4882a593Smuzhiyun ==================================== ====== ========================== 701*4882a593Smuzhiyun ``ETHTOOL_A_FEATURES_HEADER`` nested reply header 702*4882a593Smuzhiyun ``ETHTOOL_A_FEATURES_HW`` bitset dev->hw_features 703*4882a593Smuzhiyun ``ETHTOOL_A_FEATURES_WANTED`` bitset dev->wanted_features 704*4882a593Smuzhiyun ``ETHTOOL_A_FEATURES_ACTIVE`` bitset dev->features 705*4882a593Smuzhiyun ``ETHTOOL_A_FEATURES_NOCHANGE`` bitset NETIF_F_NEVER_CHANGE 706*4882a593Smuzhiyun ==================================== ====== ========================== 707*4882a593Smuzhiyun 708*4882a593SmuzhiyunBitmaps in kernel response have the same meaning as bitmaps used in ioctl 709*4882a593Smuzhiyuninterference but attribute names are different (they are based on 710*4882a593Smuzhiyuncorresponding members of struct net_device). Legacy "flags" are not provided, 711*4882a593Smuzhiyunif userspace needs them (most likely only ethtool for backward compatibility), 712*4882a593Smuzhiyunit can calculate their values from related feature bits itself. 713*4882a593SmuzhiyunETHA_FEATURES_HW uses mask consisting of all features recognized by kernel (to 714*4882a593Smuzhiyunprovide all names when using verbose bitmap format), the other three use no 715*4882a593Smuzhiyunmask (simple bit lists). 716*4882a593Smuzhiyun 717*4882a593Smuzhiyun 718*4882a593SmuzhiyunFEATURES_SET 719*4882a593Smuzhiyun============ 720*4882a593Smuzhiyun 721*4882a593SmuzhiyunRequest to set netdev features like ``ETHTOOL_SFEATURES`` ioctl request. 722*4882a593Smuzhiyun 723*4882a593SmuzhiyunRequest contents: 724*4882a593Smuzhiyun 725*4882a593Smuzhiyun ==================================== ====== ========================== 726*4882a593Smuzhiyun ``ETHTOOL_A_FEATURES_HEADER`` nested request header 727*4882a593Smuzhiyun ``ETHTOOL_A_FEATURES_WANTED`` bitset requested features 728*4882a593Smuzhiyun ==================================== ====== ========================== 729*4882a593Smuzhiyun 730*4882a593SmuzhiyunKernel response contents: 731*4882a593Smuzhiyun 732*4882a593Smuzhiyun ==================================== ====== ========================== 733*4882a593Smuzhiyun ``ETHTOOL_A_FEATURES_HEADER`` nested reply header 734*4882a593Smuzhiyun ``ETHTOOL_A_FEATURES_WANTED`` bitset diff wanted vs. result 735*4882a593Smuzhiyun ``ETHTOOL_A_FEATURES_ACTIVE`` bitset diff old vs. new active 736*4882a593Smuzhiyun ==================================== ====== ========================== 737*4882a593Smuzhiyun 738*4882a593SmuzhiyunRequest constains only one bitset which can be either value/mask pair (request 739*4882a593Smuzhiyunto change specific feature bits and leave the rest) or only a value (request 740*4882a593Smuzhiyunto set all features to specified set). 741*4882a593Smuzhiyun 742*4882a593SmuzhiyunAs request is subject to netdev_change_features() sanity checks, optional 743*4882a593Smuzhiyunkernel reply (can be suppressed by ``ETHTOOL_FLAG_OMIT_REPLY`` flag in request 744*4882a593Smuzhiyunheader) informs client about the actual result. ``ETHTOOL_A_FEATURES_WANTED`` 745*4882a593Smuzhiyunreports the difference between client request and actual result: mask consists 746*4882a593Smuzhiyunof bits which differ between requested features and result (dev->features 747*4882a593Smuzhiyunafter the operation), value consists of values of these bits in the request 748*4882a593Smuzhiyun(i.e. negated values from resulting features). ``ETHTOOL_A_FEATURES_ACTIVE`` 749*4882a593Smuzhiyunreports the difference between old and new dev->features: mask consists of 750*4882a593Smuzhiyunbits which have changed, values are their values in new dev->features (after 751*4882a593Smuzhiyunthe operation). 752*4882a593Smuzhiyun 753*4882a593Smuzhiyun``ETHTOOL_MSG_FEATURES_NTF`` notification is sent not only if device features 754*4882a593Smuzhiyunare modified using ``ETHTOOL_MSG_FEATURES_SET`` request or on of ethtool ioctl 755*4882a593Smuzhiyunrequest but also each time features are modified with netdev_update_features() 756*4882a593Smuzhiyunor netdev_change_features(). 757*4882a593Smuzhiyun 758*4882a593Smuzhiyun 759*4882a593SmuzhiyunPRIVFLAGS_GET 760*4882a593Smuzhiyun============= 761*4882a593Smuzhiyun 762*4882a593SmuzhiyunGets private flags like ``ETHTOOL_GPFLAGS`` ioctl request. 763*4882a593Smuzhiyun 764*4882a593SmuzhiyunRequest contents: 765*4882a593Smuzhiyun 766*4882a593Smuzhiyun ==================================== ====== ========================== 767*4882a593Smuzhiyun ``ETHTOOL_A_PRIVFLAGS_HEADER`` nested request header 768*4882a593Smuzhiyun ==================================== ====== ========================== 769*4882a593Smuzhiyun 770*4882a593SmuzhiyunKernel response contents: 771*4882a593Smuzhiyun 772*4882a593Smuzhiyun ==================================== ====== ========================== 773*4882a593Smuzhiyun ``ETHTOOL_A_PRIVFLAGS_HEADER`` nested reply header 774*4882a593Smuzhiyun ``ETHTOOL_A_PRIVFLAGS_FLAGS`` bitset private flags 775*4882a593Smuzhiyun ==================================== ====== ========================== 776*4882a593Smuzhiyun 777*4882a593Smuzhiyun``ETHTOOL_A_PRIVFLAGS_FLAGS`` is a bitset with values of device private flags. 778*4882a593SmuzhiyunThese flags are defined by driver, their number and names (and also meaning) 779*4882a593Smuzhiyunare device dependent. For compact bitset format, names can be retrieved as 780*4882a593Smuzhiyun``ETH_SS_PRIV_FLAGS`` string set. If verbose bitset format is requested, 781*4882a593Smuzhiyunresponse uses all private flags supported by the device as mask so that client 782*4882a593Smuzhiyungets the full information without having to fetch the string set with names. 783*4882a593Smuzhiyun 784*4882a593Smuzhiyun 785*4882a593SmuzhiyunPRIVFLAGS_SET 786*4882a593Smuzhiyun============= 787*4882a593Smuzhiyun 788*4882a593SmuzhiyunSets or modifies values of device private flags like ``ETHTOOL_SPFLAGS`` 789*4882a593Smuzhiyunioctl request. 790*4882a593Smuzhiyun 791*4882a593SmuzhiyunRequest contents: 792*4882a593Smuzhiyun 793*4882a593Smuzhiyun ==================================== ====== ========================== 794*4882a593Smuzhiyun ``ETHTOOL_A_PRIVFLAGS_HEADER`` nested request header 795*4882a593Smuzhiyun ``ETHTOOL_A_PRIVFLAGS_FLAGS`` bitset private flags 796*4882a593Smuzhiyun ==================================== ====== ========================== 797*4882a593Smuzhiyun 798*4882a593Smuzhiyun``ETHTOOL_A_PRIVFLAGS_FLAGS`` can either set the whole set of private flags or 799*4882a593Smuzhiyunmodify only values of some of them. 800*4882a593Smuzhiyun 801*4882a593Smuzhiyun 802*4882a593SmuzhiyunRINGS_GET 803*4882a593Smuzhiyun========= 804*4882a593Smuzhiyun 805*4882a593SmuzhiyunGets ring sizes like ``ETHTOOL_GRINGPARAM`` ioctl request. 806*4882a593Smuzhiyun 807*4882a593SmuzhiyunRequest contents: 808*4882a593Smuzhiyun 809*4882a593Smuzhiyun ==================================== ====== ========================== 810*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_HEADER`` nested request header 811*4882a593Smuzhiyun ==================================== ====== ========================== 812*4882a593Smuzhiyun 813*4882a593SmuzhiyunKernel response contents: 814*4882a593Smuzhiyun 815*4882a593Smuzhiyun ==================================== ====== ========================== 816*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_HEADER`` nested reply header 817*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_RX_MAX`` u32 max size of RX ring 818*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_RX_MINI_MAX`` u32 max size of RX mini ring 819*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_RX_JUMBO_MAX`` u32 max size of RX jumbo ring 820*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_TX_MAX`` u32 max size of TX ring 821*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_RX`` u32 size of RX ring 822*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_RX_MINI`` u32 size of RX mini ring 823*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_RX_JUMBO`` u32 size of RX jumbo ring 824*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_TX`` u32 size of TX ring 825*4882a593Smuzhiyun ==================================== ====== ========================== 826*4882a593Smuzhiyun 827*4882a593Smuzhiyun 828*4882a593SmuzhiyunRINGS_SET 829*4882a593Smuzhiyun========= 830*4882a593Smuzhiyun 831*4882a593SmuzhiyunSets ring sizes like ``ETHTOOL_SRINGPARAM`` ioctl request. 832*4882a593Smuzhiyun 833*4882a593SmuzhiyunRequest contents: 834*4882a593Smuzhiyun 835*4882a593Smuzhiyun ==================================== ====== ========================== 836*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_HEADER`` nested reply header 837*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_RX`` u32 size of RX ring 838*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_RX_MINI`` u32 size of RX mini ring 839*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_RX_JUMBO`` u32 size of RX jumbo ring 840*4882a593Smuzhiyun ``ETHTOOL_A_RINGS_TX`` u32 size of TX ring 841*4882a593Smuzhiyun ==================================== ====== ========================== 842*4882a593Smuzhiyun 843*4882a593SmuzhiyunKernel checks that requested ring sizes do not exceed limits reported by 844*4882a593Smuzhiyundriver. Driver may impose additional constraints and may not suspport all 845*4882a593Smuzhiyunattributes. 846*4882a593Smuzhiyun 847*4882a593Smuzhiyun 848*4882a593SmuzhiyunCHANNELS_GET 849*4882a593Smuzhiyun============ 850*4882a593Smuzhiyun 851*4882a593SmuzhiyunGets channel counts like ``ETHTOOL_GCHANNELS`` ioctl request. 852*4882a593Smuzhiyun 853*4882a593SmuzhiyunRequest contents: 854*4882a593Smuzhiyun 855*4882a593Smuzhiyun ==================================== ====== ========================== 856*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_HEADER`` nested request header 857*4882a593Smuzhiyun ==================================== ====== ========================== 858*4882a593Smuzhiyun 859*4882a593SmuzhiyunKernel response contents: 860*4882a593Smuzhiyun 861*4882a593Smuzhiyun ===================================== ====== ========================== 862*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_HEADER`` nested reply header 863*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_RX_MAX`` u32 max receive channels 864*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_TX_MAX`` u32 max transmit channels 865*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_OTHER_MAX`` u32 max other channels 866*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_COMBINED_MAX`` u32 max combined channels 867*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_RX_COUNT`` u32 receive channel count 868*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_TX_COUNT`` u32 transmit channel count 869*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_OTHER_COUNT`` u32 other channel count 870*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_COMBINED_COUNT`` u32 combined channel count 871*4882a593Smuzhiyun ===================================== ====== ========================== 872*4882a593Smuzhiyun 873*4882a593Smuzhiyun 874*4882a593SmuzhiyunCHANNELS_SET 875*4882a593Smuzhiyun============ 876*4882a593Smuzhiyun 877*4882a593SmuzhiyunSets channel counts like ``ETHTOOL_SCHANNELS`` ioctl request. 878*4882a593Smuzhiyun 879*4882a593SmuzhiyunRequest contents: 880*4882a593Smuzhiyun 881*4882a593Smuzhiyun ===================================== ====== ========================== 882*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_HEADER`` nested request header 883*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_RX_COUNT`` u32 receive channel count 884*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_TX_COUNT`` u32 transmit channel count 885*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_OTHER_COUNT`` u32 other channel count 886*4882a593Smuzhiyun ``ETHTOOL_A_CHANNELS_COMBINED_COUNT`` u32 combined channel count 887*4882a593Smuzhiyun ===================================== ====== ========================== 888*4882a593Smuzhiyun 889*4882a593SmuzhiyunKernel checks that requested channel counts do not exceed limits reported by 890*4882a593Smuzhiyundriver. Driver may impose additional constraints and may not suspport all 891*4882a593Smuzhiyunattributes. 892*4882a593Smuzhiyun 893*4882a593Smuzhiyun 894*4882a593SmuzhiyunCOALESCE_GET 895*4882a593Smuzhiyun============ 896*4882a593Smuzhiyun 897*4882a593SmuzhiyunGets coalescing parameters like ``ETHTOOL_GCOALESCE`` ioctl request. 898*4882a593Smuzhiyun 899*4882a593SmuzhiyunRequest contents: 900*4882a593Smuzhiyun 901*4882a593Smuzhiyun ==================================== ====== ========================== 902*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_HEADER`` nested request header 903*4882a593Smuzhiyun ==================================== ====== ========================== 904*4882a593Smuzhiyun 905*4882a593SmuzhiyunKernel response contents: 906*4882a593Smuzhiyun 907*4882a593Smuzhiyun =========================================== ====== ======================= 908*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_HEADER`` nested reply header 909*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_USECS`` u32 delay (us), normal Rx 910*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES`` u32 max packets, normal Rx 911*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_USECS_IRQ`` u32 delay (us), Rx in IRQ 912*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ`` u32 max packets, Rx in IRQ 913*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_USECS`` u32 delay (us), normal Tx 914*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES`` u32 max packets, normal Tx 915*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_USECS_IRQ`` u32 delay (us), Tx in IRQ 916*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ`` u32 IRQ packets, Tx in IRQ 917*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_STATS_BLOCK_USECS`` u32 delay of stats update 918*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX`` bool adaptive Rx coalesce 919*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX`` bool adaptive Tx coalesce 920*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_PKT_RATE_LOW`` u32 threshold for low rate 921*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_USECS_LOW`` u32 delay (us), low Rx 922*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW`` u32 max packets, low Rx 923*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_USECS_LOW`` u32 delay (us), low Tx 924*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW`` u32 max packets, low Tx 925*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_PKT_RATE_HIGH`` u32 threshold for high rate 926*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_USECS_HIGH`` u32 delay (us), high Rx 927*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH`` u32 max packets, high Rx 928*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_USECS_HIGH`` u32 delay (us), high Tx 929*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH`` u32 max packets, high Tx 930*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL`` u32 rate sampling interval 931*4882a593Smuzhiyun =========================================== ====== ======================= 932*4882a593Smuzhiyun 933*4882a593SmuzhiyunAttributes are only included in reply if their value is not zero or the 934*4882a593Smuzhiyuncorresponding bit in ``ethtool_ops::supported_coalesce_params`` is set (i.e. 935*4882a593Smuzhiyunthey are declared as supported by driver). 936*4882a593Smuzhiyun 937*4882a593Smuzhiyun 938*4882a593SmuzhiyunCOALESCE_SET 939*4882a593Smuzhiyun============ 940*4882a593Smuzhiyun 941*4882a593SmuzhiyunSets coalescing parameters like ``ETHTOOL_SCOALESCE`` ioctl request. 942*4882a593Smuzhiyun 943*4882a593SmuzhiyunRequest contents: 944*4882a593Smuzhiyun 945*4882a593Smuzhiyun =========================================== ====== ======================= 946*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_HEADER`` nested request header 947*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_USECS`` u32 delay (us), normal Rx 948*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES`` u32 max packets, normal Rx 949*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_USECS_IRQ`` u32 delay (us), Rx in IRQ 950*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ`` u32 max packets, Rx in IRQ 951*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_USECS`` u32 delay (us), normal Tx 952*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES`` u32 max packets, normal Tx 953*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_USECS_IRQ`` u32 delay (us), Tx in IRQ 954*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ`` u32 IRQ packets, Tx in IRQ 955*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_STATS_BLOCK_USECS`` u32 delay of stats update 956*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX`` bool adaptive Rx coalesce 957*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX`` bool adaptive Tx coalesce 958*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_PKT_RATE_LOW`` u32 threshold for low rate 959*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_USECS_LOW`` u32 delay (us), low Rx 960*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW`` u32 max packets, low Rx 961*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_USECS_LOW`` u32 delay (us), low Tx 962*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW`` u32 max packets, low Tx 963*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_PKT_RATE_HIGH`` u32 threshold for high rate 964*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_USECS_HIGH`` u32 delay (us), high Rx 965*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH`` u32 max packets, high Rx 966*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_USECS_HIGH`` u32 delay (us), high Tx 967*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH`` u32 max packets, high Tx 968*4882a593Smuzhiyun ``ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL`` u32 rate sampling interval 969*4882a593Smuzhiyun =========================================== ====== ======================= 970*4882a593Smuzhiyun 971*4882a593SmuzhiyunRequest is rejected if it attributes declared as unsupported by driver (i.e. 972*4882a593Smuzhiyunsuch that the corresponding bit in ``ethtool_ops::supported_coalesce_params`` 973*4882a593Smuzhiyunis not set), regardless of their values. Driver may impose additional 974*4882a593Smuzhiyunconstraints on coalescing parameters and their values. 975*4882a593Smuzhiyun 976*4882a593Smuzhiyun 977*4882a593SmuzhiyunPAUSE_GET 978*4882a593Smuzhiyun============ 979*4882a593Smuzhiyun 980*4882a593SmuzhiyunGets channel counts like ``ETHTOOL_GPAUSE`` ioctl request. 981*4882a593Smuzhiyun 982*4882a593SmuzhiyunRequest contents: 983*4882a593Smuzhiyun 984*4882a593Smuzhiyun ===================================== ====== ========================== 985*4882a593Smuzhiyun ``ETHTOOL_A_PAUSE_HEADER`` nested request header 986*4882a593Smuzhiyun ===================================== ====== ========================== 987*4882a593Smuzhiyun 988*4882a593SmuzhiyunKernel response contents: 989*4882a593Smuzhiyun 990*4882a593Smuzhiyun ===================================== ====== ========================== 991*4882a593Smuzhiyun ``ETHTOOL_A_PAUSE_HEADER`` nested request header 992*4882a593Smuzhiyun ``ETHTOOL_A_PAUSE_AUTONEG`` bool pause autonegotiation 993*4882a593Smuzhiyun ``ETHTOOL_A_PAUSE_RX`` bool receive pause frames 994*4882a593Smuzhiyun ``ETHTOOL_A_PAUSE_TX`` bool transmit pause frames 995*4882a593Smuzhiyun ``ETHTOOL_A_PAUSE_STATS`` nested pause statistics 996*4882a593Smuzhiyun ===================================== ====== ========================== 997*4882a593Smuzhiyun 998*4882a593Smuzhiyun``ETHTOOL_A_PAUSE_STATS`` are reported if ``ETHTOOL_FLAG_STATS`` was set 999*4882a593Smuzhiyunin ``ETHTOOL_A_HEADER_FLAGS``. 1000*4882a593SmuzhiyunIt will be empty if driver did not report any statistics. Drivers fill in 1001*4882a593Smuzhiyunthe statistics in the following structure: 1002*4882a593Smuzhiyun 1003*4882a593Smuzhiyun.. kernel-doc:: include/linux/ethtool.h 1004*4882a593Smuzhiyun :identifiers: ethtool_pause_stats 1005*4882a593Smuzhiyun 1006*4882a593SmuzhiyunEach member has a corresponding attribute defined. 1007*4882a593Smuzhiyun 1008*4882a593SmuzhiyunPAUSE_SET 1009*4882a593Smuzhiyun============ 1010*4882a593Smuzhiyun 1011*4882a593SmuzhiyunSets pause parameters like ``ETHTOOL_GPAUSEPARAM`` ioctl request. 1012*4882a593Smuzhiyun 1013*4882a593SmuzhiyunRequest contents: 1014*4882a593Smuzhiyun 1015*4882a593Smuzhiyun ===================================== ====== ========================== 1016*4882a593Smuzhiyun ``ETHTOOL_A_PAUSE_HEADER`` nested request header 1017*4882a593Smuzhiyun ``ETHTOOL_A_PAUSE_AUTONEG`` bool pause autonegotiation 1018*4882a593Smuzhiyun ``ETHTOOL_A_PAUSE_RX`` bool receive pause frames 1019*4882a593Smuzhiyun ``ETHTOOL_A_PAUSE_TX`` bool transmit pause frames 1020*4882a593Smuzhiyun ===================================== ====== ========================== 1021*4882a593Smuzhiyun 1022*4882a593Smuzhiyun 1023*4882a593SmuzhiyunEEE_GET 1024*4882a593Smuzhiyun======= 1025*4882a593Smuzhiyun 1026*4882a593SmuzhiyunGets channel counts like ``ETHTOOL_GEEE`` ioctl request. 1027*4882a593Smuzhiyun 1028*4882a593SmuzhiyunRequest contents: 1029*4882a593Smuzhiyun 1030*4882a593Smuzhiyun ===================================== ====== ========================== 1031*4882a593Smuzhiyun ``ETHTOOL_A_EEE_HEADER`` nested request header 1032*4882a593Smuzhiyun ===================================== ====== ========================== 1033*4882a593Smuzhiyun 1034*4882a593SmuzhiyunKernel response contents: 1035*4882a593Smuzhiyun 1036*4882a593Smuzhiyun ===================================== ====== ========================== 1037*4882a593Smuzhiyun ``ETHTOOL_A_EEE_HEADER`` nested request header 1038*4882a593Smuzhiyun ``ETHTOOL_A_EEE_MODES_OURS`` bool supported/advertised modes 1039*4882a593Smuzhiyun ``ETHTOOL_A_EEE_MODES_PEER`` bool peer advertised link modes 1040*4882a593Smuzhiyun ``ETHTOOL_A_EEE_ACTIVE`` bool EEE is actively used 1041*4882a593Smuzhiyun ``ETHTOOL_A_EEE_ENABLED`` bool EEE is enabled 1042*4882a593Smuzhiyun ``ETHTOOL_A_EEE_TX_LPI_ENABLED`` bool Tx lpi enabled 1043*4882a593Smuzhiyun ``ETHTOOL_A_EEE_TX_LPI_TIMER`` u32 Tx lpi timeout (in us) 1044*4882a593Smuzhiyun ===================================== ====== ========================== 1045*4882a593Smuzhiyun 1046*4882a593SmuzhiyunIn ``ETHTOOL_A_EEE_MODES_OURS``, mask consists of link modes for which EEE is 1047*4882a593Smuzhiyunenabled, value of link modes for which EEE is advertised. Link modes for which 1048*4882a593Smuzhiyunpeer advertises EEE are listed in ``ETHTOOL_A_EEE_MODES_PEER`` (no mask). The 1049*4882a593Smuzhiyunnetlink interface allows reporting EEE status for all link modes but only 1050*4882a593Smuzhiyunfirst 32 are provided by the ``ethtool_ops`` callback. 1051*4882a593Smuzhiyun 1052*4882a593Smuzhiyun 1053*4882a593SmuzhiyunEEE_SET 1054*4882a593Smuzhiyun======= 1055*4882a593Smuzhiyun 1056*4882a593SmuzhiyunSets pause parameters like ``ETHTOOL_GEEEPARAM`` ioctl request. 1057*4882a593Smuzhiyun 1058*4882a593SmuzhiyunRequest contents: 1059*4882a593Smuzhiyun 1060*4882a593Smuzhiyun ===================================== ====== ========================== 1061*4882a593Smuzhiyun ``ETHTOOL_A_EEE_HEADER`` nested request header 1062*4882a593Smuzhiyun ``ETHTOOL_A_EEE_MODES_OURS`` bool advertised modes 1063*4882a593Smuzhiyun ``ETHTOOL_A_EEE_ENABLED`` bool EEE is enabled 1064*4882a593Smuzhiyun ``ETHTOOL_A_EEE_TX_LPI_ENABLED`` bool Tx lpi enabled 1065*4882a593Smuzhiyun ``ETHTOOL_A_EEE_TX_LPI_TIMER`` u32 Tx lpi timeout (in us) 1066*4882a593Smuzhiyun ===================================== ====== ========================== 1067*4882a593Smuzhiyun 1068*4882a593Smuzhiyun``ETHTOOL_A_EEE_MODES_OURS`` is used to either list link modes to advertise 1069*4882a593SmuzhiyunEEE for (if there is no mask) or specify changes to the list (if there is 1070*4882a593Smuzhiyuna mask). The netlink interface allows reporting EEE status for all link modes 1071*4882a593Smuzhiyunbut only first 32 can be set at the moment as that is what the ``ethtool_ops`` 1072*4882a593Smuzhiyuncallback supports. 1073*4882a593Smuzhiyun 1074*4882a593Smuzhiyun 1075*4882a593SmuzhiyunTSINFO_GET 1076*4882a593Smuzhiyun========== 1077*4882a593Smuzhiyun 1078*4882a593SmuzhiyunGets timestamping information like ``ETHTOOL_GET_TS_INFO`` ioctl request. 1079*4882a593Smuzhiyun 1080*4882a593SmuzhiyunRequest contents: 1081*4882a593Smuzhiyun 1082*4882a593Smuzhiyun ===================================== ====== ========================== 1083*4882a593Smuzhiyun ``ETHTOOL_A_TSINFO_HEADER`` nested request header 1084*4882a593Smuzhiyun ===================================== ====== ========================== 1085*4882a593Smuzhiyun 1086*4882a593SmuzhiyunKernel response contents: 1087*4882a593Smuzhiyun 1088*4882a593Smuzhiyun ===================================== ====== ========================== 1089*4882a593Smuzhiyun ``ETHTOOL_A_TSINFO_HEADER`` nested request header 1090*4882a593Smuzhiyun ``ETHTOOL_A_TSINFO_TIMESTAMPING`` bitset SO_TIMESTAMPING flags 1091*4882a593Smuzhiyun ``ETHTOOL_A_TSINFO_TX_TYPES`` bitset supported Tx types 1092*4882a593Smuzhiyun ``ETHTOOL_A_TSINFO_RX_FILTERS`` bitset supported Rx filters 1093*4882a593Smuzhiyun ``ETHTOOL_A_TSINFO_PHC_INDEX`` u32 PTP hw clock index 1094*4882a593Smuzhiyun ===================================== ====== ========================== 1095*4882a593Smuzhiyun 1096*4882a593Smuzhiyun``ETHTOOL_A_TSINFO_PHC_INDEX`` is absent if there is no associated PHC (there 1097*4882a593Smuzhiyunis no special value for this case). The bitset attributes are omitted if they 1098*4882a593Smuzhiyunwould be empty (no bit set). 1099*4882a593Smuzhiyun 1100*4882a593SmuzhiyunCABLE_TEST 1101*4882a593Smuzhiyun========== 1102*4882a593Smuzhiyun 1103*4882a593SmuzhiyunStart a cable test. 1104*4882a593Smuzhiyun 1105*4882a593SmuzhiyunRequest contents: 1106*4882a593Smuzhiyun 1107*4882a593Smuzhiyun ==================================== ====== ========================== 1108*4882a593Smuzhiyun ``ETHTOOL_A_CABLE_TEST_HEADER`` nested request header 1109*4882a593Smuzhiyun ==================================== ====== ========================== 1110*4882a593Smuzhiyun 1111*4882a593SmuzhiyunNotification contents: 1112*4882a593Smuzhiyun 1113*4882a593SmuzhiyunAn Ethernet cable typically contains 1, 2 or 4 pairs. The length of 1114*4882a593Smuzhiyunthe pair can only be measured when there is a fault in the pair and 1115*4882a593Smuzhiyunhence a reflection. Information about the fault may not be available, 1116*4882a593Smuzhiyundepending on the specific hardware. Hence the contents of the notify 1117*4882a593Smuzhiyunmessage are mostly optional. The attributes can be repeated an 1118*4882a593Smuzhiyunarbitrary number of times, in an arbitrary order, for an arbitrary 1119*4882a593Smuzhiyunnumber of pairs. 1120*4882a593Smuzhiyun 1121*4882a593SmuzhiyunThe example shows the notification sent when the test is completed for 1122*4882a593Smuzhiyuna T2 cable, i.e. two pairs. One pair is OK and hence has no length 1123*4882a593Smuzhiyuninformation. The second pair has a fault and does have length 1124*4882a593Smuzhiyuninformation. 1125*4882a593Smuzhiyun 1126*4882a593Smuzhiyun +---------------------------------------------+--------+---------------------+ 1127*4882a593Smuzhiyun | ``ETHTOOL_A_CABLE_TEST_HEADER`` | nested | reply header | 1128*4882a593Smuzhiyun +---------------------------------------------+--------+---------------------+ 1129*4882a593Smuzhiyun | ``ETHTOOL_A_CABLE_TEST_STATUS`` | u8 | completed | 1130*4882a593Smuzhiyun +---------------------------------------------+--------+---------------------+ 1131*4882a593Smuzhiyun | ``ETHTOOL_A_CABLE_TEST_NTF_NEST`` | nested | all the results | 1132*4882a593Smuzhiyun +-+-------------------------------------------+--------+---------------------+ 1133*4882a593Smuzhiyun | | ``ETHTOOL_A_CABLE_NEST_RESULT`` | nested | cable test result | 1134*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+---------------------+ 1135*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR`` | u8 | pair number | 1136*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+---------------------+ 1137*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_RESULTS_CODE`` | u8 | result code | 1138*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+---------------------+ 1139*4882a593Smuzhiyun | | ``ETHTOOL_A_CABLE_NEST_RESULT`` | nested | cable test results | 1140*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+---------------------+ 1141*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR`` | u8 | pair number | 1142*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+---------------------+ 1143*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_RESULTS_CODE`` | u8 | result code | 1144*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+---------------------+ 1145*4882a593Smuzhiyun | | ``ETHTOOL_A_CABLE_NEST_FAULT_LENGTH`` | nested | cable length | 1146*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+---------------------+ 1147*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR`` | u8 | pair number | 1148*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+---------------------+ 1149*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_FAULT_LENGTH_CM`` | u32 | length in cm | 1150*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+---------------------+ 1151*4882a593Smuzhiyun 1152*4882a593SmuzhiyunCABLE_TEST TDR 1153*4882a593Smuzhiyun============== 1154*4882a593Smuzhiyun 1155*4882a593SmuzhiyunStart a cable test and report raw TDR data 1156*4882a593Smuzhiyun 1157*4882a593SmuzhiyunRequest contents: 1158*4882a593Smuzhiyun 1159*4882a593Smuzhiyun +--------------------------------------------+--------+-----------------------+ 1160*4882a593Smuzhiyun | ``ETHTOOL_A_CABLE_TEST_TDR_HEADER`` | nested | reply header | 1161*4882a593Smuzhiyun +--------------------------------------------+--------+-----------------------+ 1162*4882a593Smuzhiyun | ``ETHTOOL_A_CABLE_TEST_TDR_CFG`` | nested | test configuration | 1163*4882a593Smuzhiyun +-+------------------------------------------+--------+-----------------------+ 1164*4882a593Smuzhiyun | | ``ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE`` | u32 | first data distance | 1165*4882a593Smuzhiyun +-+-+----------------------------------------+--------+-----------------------+ 1166*4882a593Smuzhiyun | | ``ETHTOOL_A_CABLE_STEP_LAST_DISTANCE`` | u32 | last data distance | 1167*4882a593Smuzhiyun +-+-+----------------------------------------+--------+-----------------------+ 1168*4882a593Smuzhiyun | | ``ETHTOOL_A_CABLE_STEP_STEP_DISTANCE`` | u32 | distance of each step | 1169*4882a593Smuzhiyun +-+-+----------------------------------------+--------+-----------------------+ 1170*4882a593Smuzhiyun | | ``ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR`` | u8 | pair to test | 1171*4882a593Smuzhiyun +-+-+----------------------------------------+--------+-----------------------+ 1172*4882a593Smuzhiyun 1173*4882a593SmuzhiyunThe ETHTOOL_A_CABLE_TEST_TDR_CFG is optional, as well as all members 1174*4882a593Smuzhiyunof the nest. All distances are expressed in centimeters. The PHY takes 1175*4882a593Smuzhiyunthe distances as a guide, and rounds to the nearest distance it 1176*4882a593Smuzhiyunactually supports. If a pair is passed, only that one pair will be 1177*4882a593Smuzhiyuntested. Otherwise all pairs are tested. 1178*4882a593Smuzhiyun 1179*4882a593SmuzhiyunNotification contents: 1180*4882a593Smuzhiyun 1181*4882a593SmuzhiyunRaw TDR data is gathered by sending a pulse down the cable and 1182*4882a593Smuzhiyunrecording the amplitude of the reflected pulse for a given distance. 1183*4882a593Smuzhiyun 1184*4882a593SmuzhiyunIt can take a number of seconds to collect TDR data, especial if the 1185*4882a593Smuzhiyunfull 100 meters is probed at 1 meter intervals. When the test is 1186*4882a593Smuzhiyunstarted a notification will be sent containing just 1187*4882a593SmuzhiyunETHTOOL_A_CABLE_TEST_TDR_STATUS with the value 1188*4882a593SmuzhiyunETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED. 1189*4882a593Smuzhiyun 1190*4882a593SmuzhiyunWhen the test has completed a second notification will be sent 1191*4882a593Smuzhiyuncontaining ETHTOOL_A_CABLE_TEST_TDR_STATUS with the value 1192*4882a593SmuzhiyunETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED and the TDR data. 1193*4882a593Smuzhiyun 1194*4882a593SmuzhiyunThe message may optionally contain the amplitude of the pulse send 1195*4882a593Smuzhiyundown the cable. This is measured in mV. A reflection should not be 1196*4882a593Smuzhiyunbigger than transmitted pulse. 1197*4882a593Smuzhiyun 1198*4882a593SmuzhiyunBefore the raw TDR data should be an ETHTOOL_A_CABLE_TDR_NEST_STEP 1199*4882a593Smuzhiyunnest containing information about the distance along the cable for the 1200*4882a593Smuzhiyunfirst reading, the last reading, and the step between each 1201*4882a593Smuzhiyunreading. Distances are measured in centimeters. These should be the 1202*4882a593Smuzhiyunexact values the PHY used. These may be different to what the user 1203*4882a593Smuzhiyunrequested, if the native measurement resolution is greater than 1 cm. 1204*4882a593Smuzhiyun 1205*4882a593SmuzhiyunFor each step along the cable, a ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE is 1206*4882a593Smuzhiyunused to report the amplitude of the reflection for a given pair. 1207*4882a593Smuzhiyun 1208*4882a593Smuzhiyun +---------------------------------------------+--------+----------------------+ 1209*4882a593Smuzhiyun | ``ETHTOOL_A_CABLE_TEST_TDR_HEADER`` | nested | reply header | 1210*4882a593Smuzhiyun +---------------------------------------------+--------+----------------------+ 1211*4882a593Smuzhiyun | ``ETHTOOL_A_CABLE_TEST_TDR_STATUS`` | u8 | completed | 1212*4882a593Smuzhiyun +---------------------------------------------+--------+----------------------+ 1213*4882a593Smuzhiyun | ``ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST`` | nested | all the results | 1214*4882a593Smuzhiyun +-+-------------------------------------------+--------+----------------------+ 1215*4882a593Smuzhiyun | | ``ETHTOOL_A_CABLE_TDR_NEST_PULSE`` | nested | TX Pulse amplitude | 1216*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1217*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_PULSE_mV`` | s16 | Pulse amplitude | 1218*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1219*4882a593Smuzhiyun | | ``ETHTOOL_A_CABLE_NEST_STEP`` | nested | TDR step info | 1220*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1221*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE`` | u32 | First data distance | 1222*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1223*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_STEP_LAST_DISTANCE`` | u32 | Last data distance | 1224*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1225*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_STEP_STEP_DISTANCE`` | u32 | distance of each step| 1226*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1227*4882a593Smuzhiyun | | ``ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE`` | nested | Reflection amplitude | 1228*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1229*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR`` | u8 | pair number | 1230*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1231*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_AMPLITUDE_mV`` | s16 | Reflection amplitude | 1232*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1233*4882a593Smuzhiyun | | ``ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE`` | nested | Reflection amplitude | 1234*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1235*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR`` | u8 | pair number | 1236*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1237*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_AMPLITUDE_mV`` | s16 | Reflection amplitude | 1238*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1239*4882a593Smuzhiyun | | ``ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE`` | nested | Reflection amplitude | 1240*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1241*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_RESULTS_PAIR`` | u8 | pair number | 1242*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1243*4882a593Smuzhiyun | | | ``ETHTOOL_A_CABLE_AMPLITUDE_mV`` | s16 | Reflection amplitude | 1244*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+----------------------+ 1245*4882a593Smuzhiyun 1246*4882a593SmuzhiyunTUNNEL_INFO 1247*4882a593Smuzhiyun=========== 1248*4882a593Smuzhiyun 1249*4882a593SmuzhiyunGets information about the tunnel state NIC is aware of. 1250*4882a593Smuzhiyun 1251*4882a593SmuzhiyunRequest contents: 1252*4882a593Smuzhiyun 1253*4882a593Smuzhiyun ===================================== ====== ========================== 1254*4882a593Smuzhiyun ``ETHTOOL_A_TUNNEL_INFO_HEADER`` nested request header 1255*4882a593Smuzhiyun ===================================== ====== ========================== 1256*4882a593Smuzhiyun 1257*4882a593SmuzhiyunKernel response contents: 1258*4882a593Smuzhiyun 1259*4882a593Smuzhiyun +---------------------------------------------+--------+---------------------+ 1260*4882a593Smuzhiyun | ``ETHTOOL_A_TUNNEL_INFO_HEADER`` | nested | reply header | 1261*4882a593Smuzhiyun +---------------------------------------------+--------+---------------------+ 1262*4882a593Smuzhiyun | ``ETHTOOL_A_TUNNEL_INFO_UDP_PORTS`` | nested | all UDP port tables | 1263*4882a593Smuzhiyun +-+-------------------------------------------+--------+---------------------+ 1264*4882a593Smuzhiyun | | ``ETHTOOL_A_TUNNEL_UDP_TABLE`` | nested | one UDP port table | 1265*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+---------------------+ 1266*4882a593Smuzhiyun | | | ``ETHTOOL_A_TUNNEL_UDP_TABLE_SIZE`` | u32 | max size of the | 1267*4882a593Smuzhiyun | | | | | table | 1268*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+---------------------+ 1269*4882a593Smuzhiyun | | | ``ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES`` | bitset | tunnel types which | 1270*4882a593Smuzhiyun | | | | | table can hold | 1271*4882a593Smuzhiyun +-+-+-----------------------------------------+--------+---------------------+ 1272*4882a593Smuzhiyun | | | ``ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY`` | nested | offloaded UDP port | 1273*4882a593Smuzhiyun +-+-+-+---------------------------------------+--------+---------------------+ 1274*4882a593Smuzhiyun | | | | ``ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT`` | be16 | UDP port | 1275*4882a593Smuzhiyun +-+-+-+---------------------------------------+--------+---------------------+ 1276*4882a593Smuzhiyun | | | | ``ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE`` | u32 | tunnel type | 1277*4882a593Smuzhiyun +-+-+-+---------------------------------------+--------+---------------------+ 1278*4882a593Smuzhiyun 1279*4882a593SmuzhiyunFor UDP tunnel table empty ``ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES`` indicates that 1280*4882a593Smuzhiyunthe table contains static entries, hard-coded by the NIC. 1281*4882a593Smuzhiyun 1282*4882a593SmuzhiyunRequest translation 1283*4882a593Smuzhiyun=================== 1284*4882a593Smuzhiyun 1285*4882a593SmuzhiyunThe following table maps ioctl commands to netlink commands providing their 1286*4882a593Smuzhiyunfunctionality. Entries with "n/a" in right column are commands which do not 1287*4882a593Smuzhiyunhave their netlink replacement yet. Entries which "n/a" in the left column 1288*4882a593Smuzhiyunare netlink only. 1289*4882a593Smuzhiyun 1290*4882a593Smuzhiyun =================================== ===================================== 1291*4882a593Smuzhiyun ioctl command netlink command 1292*4882a593Smuzhiyun =================================== ===================================== 1293*4882a593Smuzhiyun ``ETHTOOL_GSET`` ``ETHTOOL_MSG_LINKINFO_GET`` 1294*4882a593Smuzhiyun ``ETHTOOL_MSG_LINKMODES_GET`` 1295*4882a593Smuzhiyun ``ETHTOOL_SSET`` ``ETHTOOL_MSG_LINKINFO_SET`` 1296*4882a593Smuzhiyun ``ETHTOOL_MSG_LINKMODES_SET`` 1297*4882a593Smuzhiyun ``ETHTOOL_GDRVINFO`` n/a 1298*4882a593Smuzhiyun ``ETHTOOL_GREGS`` n/a 1299*4882a593Smuzhiyun ``ETHTOOL_GWOL`` ``ETHTOOL_MSG_WOL_GET`` 1300*4882a593Smuzhiyun ``ETHTOOL_SWOL`` ``ETHTOOL_MSG_WOL_SET`` 1301*4882a593Smuzhiyun ``ETHTOOL_GMSGLVL`` ``ETHTOOL_MSG_DEBUG_GET`` 1302*4882a593Smuzhiyun ``ETHTOOL_SMSGLVL`` ``ETHTOOL_MSG_DEBUG_SET`` 1303*4882a593Smuzhiyun ``ETHTOOL_NWAY_RST`` n/a 1304*4882a593Smuzhiyun ``ETHTOOL_GLINK`` ``ETHTOOL_MSG_LINKSTATE_GET`` 1305*4882a593Smuzhiyun ``ETHTOOL_GEEPROM`` n/a 1306*4882a593Smuzhiyun ``ETHTOOL_SEEPROM`` n/a 1307*4882a593Smuzhiyun ``ETHTOOL_GCOALESCE`` ``ETHTOOL_MSG_COALESCE_GET`` 1308*4882a593Smuzhiyun ``ETHTOOL_SCOALESCE`` ``ETHTOOL_MSG_COALESCE_SET`` 1309*4882a593Smuzhiyun ``ETHTOOL_GRINGPARAM`` ``ETHTOOL_MSG_RINGS_GET`` 1310*4882a593Smuzhiyun ``ETHTOOL_SRINGPARAM`` ``ETHTOOL_MSG_RINGS_SET`` 1311*4882a593Smuzhiyun ``ETHTOOL_GPAUSEPARAM`` ``ETHTOOL_MSG_PAUSE_GET`` 1312*4882a593Smuzhiyun ``ETHTOOL_SPAUSEPARAM`` ``ETHTOOL_MSG_PAUSE_SET`` 1313*4882a593Smuzhiyun ``ETHTOOL_GRXCSUM`` ``ETHTOOL_MSG_FEATURES_GET`` 1314*4882a593Smuzhiyun ``ETHTOOL_SRXCSUM`` ``ETHTOOL_MSG_FEATURES_SET`` 1315*4882a593Smuzhiyun ``ETHTOOL_GTXCSUM`` ``ETHTOOL_MSG_FEATURES_GET`` 1316*4882a593Smuzhiyun ``ETHTOOL_STXCSUM`` ``ETHTOOL_MSG_FEATURES_SET`` 1317*4882a593Smuzhiyun ``ETHTOOL_GSG`` ``ETHTOOL_MSG_FEATURES_GET`` 1318*4882a593Smuzhiyun ``ETHTOOL_SSG`` ``ETHTOOL_MSG_FEATURES_SET`` 1319*4882a593Smuzhiyun ``ETHTOOL_TEST`` n/a 1320*4882a593Smuzhiyun ``ETHTOOL_GSTRINGS`` ``ETHTOOL_MSG_STRSET_GET`` 1321*4882a593Smuzhiyun ``ETHTOOL_PHYS_ID`` n/a 1322*4882a593Smuzhiyun ``ETHTOOL_GSTATS`` n/a 1323*4882a593Smuzhiyun ``ETHTOOL_GTSO`` ``ETHTOOL_MSG_FEATURES_GET`` 1324*4882a593Smuzhiyun ``ETHTOOL_STSO`` ``ETHTOOL_MSG_FEATURES_SET`` 1325*4882a593Smuzhiyun ``ETHTOOL_GPERMADDR`` rtnetlink ``RTM_GETLINK`` 1326*4882a593Smuzhiyun ``ETHTOOL_GUFO`` ``ETHTOOL_MSG_FEATURES_GET`` 1327*4882a593Smuzhiyun ``ETHTOOL_SUFO`` ``ETHTOOL_MSG_FEATURES_SET`` 1328*4882a593Smuzhiyun ``ETHTOOL_GGSO`` ``ETHTOOL_MSG_FEATURES_GET`` 1329*4882a593Smuzhiyun ``ETHTOOL_SGSO`` ``ETHTOOL_MSG_FEATURES_SET`` 1330*4882a593Smuzhiyun ``ETHTOOL_GFLAGS`` ``ETHTOOL_MSG_FEATURES_GET`` 1331*4882a593Smuzhiyun ``ETHTOOL_SFLAGS`` ``ETHTOOL_MSG_FEATURES_SET`` 1332*4882a593Smuzhiyun ``ETHTOOL_GPFLAGS`` ``ETHTOOL_MSG_PRIVFLAGS_GET`` 1333*4882a593Smuzhiyun ``ETHTOOL_SPFLAGS`` ``ETHTOOL_MSG_PRIVFLAGS_SET`` 1334*4882a593Smuzhiyun ``ETHTOOL_GRXFH`` n/a 1335*4882a593Smuzhiyun ``ETHTOOL_SRXFH`` n/a 1336*4882a593Smuzhiyun ``ETHTOOL_GGRO`` ``ETHTOOL_MSG_FEATURES_GET`` 1337*4882a593Smuzhiyun ``ETHTOOL_SGRO`` ``ETHTOOL_MSG_FEATURES_SET`` 1338*4882a593Smuzhiyun ``ETHTOOL_GRXRINGS`` n/a 1339*4882a593Smuzhiyun ``ETHTOOL_GRXCLSRLCNT`` n/a 1340*4882a593Smuzhiyun ``ETHTOOL_GRXCLSRULE`` n/a 1341*4882a593Smuzhiyun ``ETHTOOL_GRXCLSRLALL`` n/a 1342*4882a593Smuzhiyun ``ETHTOOL_SRXCLSRLDEL`` n/a 1343*4882a593Smuzhiyun ``ETHTOOL_SRXCLSRLINS`` n/a 1344*4882a593Smuzhiyun ``ETHTOOL_FLASHDEV`` n/a 1345*4882a593Smuzhiyun ``ETHTOOL_RESET`` n/a 1346*4882a593Smuzhiyun ``ETHTOOL_SRXNTUPLE`` n/a 1347*4882a593Smuzhiyun ``ETHTOOL_GRXNTUPLE`` n/a 1348*4882a593Smuzhiyun ``ETHTOOL_GSSET_INFO`` ``ETHTOOL_MSG_STRSET_GET`` 1349*4882a593Smuzhiyun ``ETHTOOL_GRXFHINDIR`` n/a 1350*4882a593Smuzhiyun ``ETHTOOL_SRXFHINDIR`` n/a 1351*4882a593Smuzhiyun ``ETHTOOL_GFEATURES`` ``ETHTOOL_MSG_FEATURES_GET`` 1352*4882a593Smuzhiyun ``ETHTOOL_SFEATURES`` ``ETHTOOL_MSG_FEATURES_SET`` 1353*4882a593Smuzhiyun ``ETHTOOL_GCHANNELS`` ``ETHTOOL_MSG_CHANNELS_GET`` 1354*4882a593Smuzhiyun ``ETHTOOL_SCHANNELS`` ``ETHTOOL_MSG_CHANNELS_SET`` 1355*4882a593Smuzhiyun ``ETHTOOL_SET_DUMP`` n/a 1356*4882a593Smuzhiyun ``ETHTOOL_GET_DUMP_FLAG`` n/a 1357*4882a593Smuzhiyun ``ETHTOOL_GET_DUMP_DATA`` n/a 1358*4882a593Smuzhiyun ``ETHTOOL_GET_TS_INFO`` ``ETHTOOL_MSG_TSINFO_GET`` 1359*4882a593Smuzhiyun ``ETHTOOL_GMODULEINFO`` n/a 1360*4882a593Smuzhiyun ``ETHTOOL_GMODULEEEPROM`` n/a 1361*4882a593Smuzhiyun ``ETHTOOL_GEEE`` ``ETHTOOL_MSG_EEE_GET`` 1362*4882a593Smuzhiyun ``ETHTOOL_SEEE`` ``ETHTOOL_MSG_EEE_SET`` 1363*4882a593Smuzhiyun ``ETHTOOL_GRSSH`` n/a 1364*4882a593Smuzhiyun ``ETHTOOL_SRSSH`` n/a 1365*4882a593Smuzhiyun ``ETHTOOL_GTUNABLE`` n/a 1366*4882a593Smuzhiyun ``ETHTOOL_STUNABLE`` n/a 1367*4882a593Smuzhiyun ``ETHTOOL_GPHYSTATS`` n/a 1368*4882a593Smuzhiyun ``ETHTOOL_PERQUEUE`` n/a 1369*4882a593Smuzhiyun ``ETHTOOL_GLINKSETTINGS`` ``ETHTOOL_MSG_LINKINFO_GET`` 1370*4882a593Smuzhiyun ``ETHTOOL_MSG_LINKMODES_GET`` 1371*4882a593Smuzhiyun ``ETHTOOL_SLINKSETTINGS`` ``ETHTOOL_MSG_LINKINFO_SET`` 1372*4882a593Smuzhiyun ``ETHTOOL_MSG_LINKMODES_SET`` 1373*4882a593Smuzhiyun ``ETHTOOL_PHY_GTUNABLE`` n/a 1374*4882a593Smuzhiyun ``ETHTOOL_PHY_STUNABLE`` n/a 1375*4882a593Smuzhiyun ``ETHTOOL_GFECPARAM`` n/a 1376*4882a593Smuzhiyun ``ETHTOOL_SFECPARAM`` n/a 1377*4882a593Smuzhiyun n/a ''ETHTOOL_MSG_CABLE_TEST_ACT'' 1378*4882a593Smuzhiyun n/a ''ETHTOOL_MSG_CABLE_TEST_TDR_ACT'' 1379*4882a593Smuzhiyun n/a ``ETHTOOL_MSG_TUNNEL_INFO_GET`` 1380*4882a593Smuzhiyun =================================== ===================================== 1381