Skip to content

Commit 3700000

Browse files
vladimirolteandavem330
authored andcommitted
docs: ethtool-netlink: document interface for MAC Merge layer
Show details about the structures passed back and forth related to MAC Merge layer configuration, state and statistics. The rendered htmldocs will be much more verbose due to the kerneldoc references. Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2b30f82 commit 3700000

File tree

2 files changed

+90
-0
lines changed

2 files changed

+90
-0
lines changed

Documentation/networking/ethtool-netlink.rst

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ Userspace to kernel:
223223
``ETHTOOL_MSG_PSE_SET`` set PSE parameters
224224
``ETHTOOL_MSG_PSE_GET`` get PSE parameters
225225
``ETHTOOL_MSG_RSS_GET`` get RSS settings
226+
``ETHTOOL_MSG_MM_GET`` get MAC merge layer state
227+
``ETHTOOL_MSG_MM_SET`` set MAC merge layer parameters
226228
===================================== =================================
227229

228230
Kernel to userspace:
@@ -265,6 +267,7 @@ Kernel to userspace:
265267
``ETHTOOL_MSG_MODULE_GET_REPLY`` transceiver module parameters
266268
``ETHTOOL_MSG_PSE_GET_REPLY`` PSE parameters
267269
``ETHTOOL_MSG_RSS_GET_REPLY`` RSS settings
270+
``ETHTOOL_MSG_MM_GET_REPLY`` MAC merge layer status
268271
======================================== =================================
269272

270273
``GET`` requests are sent by userspace applications to retrieve device
@@ -1868,6 +1871,90 @@ When set, the ``ETHTOOL_A_PLCA_STATUS`` attribute indicates whether the node is
18681871
detecting the presence of the BEACON on the network. This flag is
18691872
corresponding to ``IEEE 802.3cg-2019`` 30.16.1.1.2 aPLCAStatus.
18701873

1874+
MM_GET
1875+
======
1876+
1877+
Retrieve 802.3 MAC Merge parameters.
1878+
1879+
Request contents:
1880+
1881+
==================================== ====== ==========================
1882+
``ETHTOOL_A_MM_HEADER`` nested request header
1883+
==================================== ====== ==========================
1884+
1885+
Kernel response contents:
1886+
1887+
================================= ====== ===================================
1888+
``ETHTOOL_A_MM_HEADER`` nested request header
1889+
``ETHTOOL_A_MM_PMAC_ENABLED`` bool set if RX of preemptible and SMD-V
1890+
frames is enabled
1891+
``ETHTOOL_A_MM_TX_ENABLED`` bool set if TX of preemptible frames is
1892+
administratively enabled (might be
1893+
inactive if verification failed)
1894+
``ETHTOOL_A_MM_TX_ACTIVE`` bool set if TX of preemptible frames is
1895+
operationally enabled
1896+
``ETHTOOL_A_MM_TX_MIN_FRAG_SIZE`` u32 minimum size of transmitted
1897+
non-final fragments, in octets
1898+
``ETHTOOL_A_MM_RX_MIN_FRAG_SIZE`` u32 minimum size of received non-final
1899+
fragments, in octets
1900+
``ETHTOOL_A_MM_VERIFY_ENABLED`` bool set if TX of SMD-V frames is
1901+
administratively enabled
1902+
``ETHTOOL_A_MM_VERIFY_STATUS`` u8 state of the verification function
1903+
``ETHTOOL_A_MM_VERIFY_TIME`` u32 delay between verification attempts
1904+
``ETHTOOL_A_MM_MAX_VERIFY_TIME``` u32 maximum verification interval
1905+
supported by device
1906+
``ETHTOOL_A_MM_STATS`` nested IEEE 802.3-2018 subclause 30.14.1
1907+
oMACMergeEntity statistics counters
1908+
================================= ====== ===================================
1909+
1910+
The attributes are populated by the device driver through the following
1911+
structure:
1912+
1913+
.. kernel-doc:: include/linux/ethtool.h
1914+
:identifiers: ethtool_mm_state
1915+
1916+
The ``ETHTOOL_A_MM_VERIFY_STATUS`` will report one of the values from
1917+
1918+
.. kernel-doc:: include/uapi/linux/ethtool.h
1919+
:identifiers: ethtool_mm_verify_status
1920+
1921+
If ``ETHTOOL_A_MM_VERIFY_ENABLED`` was passed as false in the ``MM_SET``
1922+
command, ``ETHTOOL_A_MM_VERIFY_STATUS`` will report either
1923+
``ETHTOOL_MM_VERIFY_STATUS_INITIAL`` or ``ETHTOOL_MM_VERIFY_STATUS_DISABLED``,
1924+
otherwise it should report one of the other states.
1925+
1926+
It is recommended that drivers start with the pMAC disabled, and enable it upon
1927+
user space request. It is also recommended that user space does not depend upon
1928+
the default values from ``ETHTOOL_MSG_MM_GET`` requests.
1929+
1930+
``ETHTOOL_A_MM_STATS`` are reported if ``ETHTOOL_FLAG_STATS`` was set in
1931+
``ETHTOOL_A_HEADER_FLAGS``. The attribute will be empty if driver did not
1932+
report any statistics. Drivers fill in the statistics in the following
1933+
structure:
1934+
1935+
.. kernel-doc:: include/linux/ethtool.h
1936+
:identifiers: ethtool_mm_stats
1937+
1938+
MM_SET
1939+
======
1940+
1941+
Modifies the configuration of the 802.3 MAC Merge layer.
1942+
1943+
Request contents:
1944+
1945+
================================= ====== ==========================
1946+
``ETHTOOL_A_MM_VERIFY_TIME`` u32 see MM_GET description
1947+
``ETHTOOL_A_MM_VERIFY_ENABLED`` bool see MM_GET description
1948+
``ETHTOOL_A_MM_TX_ENABLED`` bool see MM_GET description
1949+
``ETHTOOL_A_MM_PMAC_ENABLED`` bool see MM_GET description
1950+
``ETHTOOL_A_MM_TX_MIN_FRAG_SIZE`` u32 see MM_GET description
1951+
================================= ====== ==========================
1952+
1953+
The attributes are propagated to the driver through the following structure:
1954+
1955+
.. kernel-doc:: include/linux/ethtool.h
1956+
:identifiers: ethtool_mm_cfg
1957+
18711958
Request translation
18721959
===================
18731960

@@ -1972,4 +2059,6 @@ are netlink only.
19722059
n/a ``ETHTOOL_MSG_PLCA_GET_CFG``
19732060
n/a ``ETHTOOL_MSG_PLCA_SET_CFG``
19742061
n/a ``ETHTOOL_MSG_PLCA_GET_STATUS``
2062+
n/a ``ETHTOOL_MSG_MM_GET``
2063+
n/a ``ETHTOOL_MSG_MM_SET``
19752064
=================================== =====================================

Documentation/networking/statistics.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ statistics are supported in the following commands:
171171

172172
- `ETHTOOL_MSG_PAUSE_GET`
173173
- `ETHTOOL_MSG_FEC_GET`
174+
- `ETHTOOL_MSG_MM_GET`
174175

175176
debugfs
176177
-------

0 commit comments

Comments
 (0)