ethtool-netlink.rst 115 KB

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