summaryrefslogtreecommitdiff
path: root/Documentation/netlink
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2025-09-24 14:02:41 +0200
committerPaolo Abeni <pabeni@redhat.com>2025-09-30 09:48:31 +0200
commit7bd80ed89d72285515db673803b021469ba71ee8 (patch)
treec92364da79b65325d85f9c0fcb3a62a4011edbf4 /Documentation/netlink
parentc5cb31c99257aacd5cc2ff72a3b6f0c660046c9b (diff)
downloadlinux-7bd80ed89d72285515db673803b021469ba71ee8.tar.gz
linux-7bd80ed89d72285515db673803b021469ba71ee8.tar.bz2
linux-7bd80ed89d72285515db673803b021469ba71ee8.zip
Documentation: net: add flow control guide and document ethtool API
Introduce a new document, flow_control.rst, to provide a comprehensive guide on Ethernet Flow Control in Linux. The guide explains how flow control works, how autonegotiation resolves pause capabilities, and how to configure it using ethtool and Netlink. In parallel, document the pause and pause-stat attributes in the ethtool.yaml netlink spec. This enables the ynl tool to generate kernel-doc comments for the corresponding enums in the UAPI header, making the C interface self-documenting. Finally, replace the legacy flow control section in phy.rst with a reference to the new document and add pointers in the relevant C source files. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20250924120241.724850-1-o.rempel@pengutronix.de Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'Documentation/netlink')
-rw-r--r--Documentation/netlink/specs/ethtool.yaml27
1 files changed, 27 insertions, 0 deletions
diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml
index 6a0fb1974513..e4852505294f 100644
--- a/Documentation/netlink/specs/ethtool.yaml
+++ b/Documentation/netlink/specs/ethtool.yaml
@@ -864,7 +864,9 @@ attribute-sets:
-
name: pause-stat
+ doc: Statistics counters for link-wide PAUSE frames (IEEE 802.3 Annex 31B).
attr-cnt-name: __ethtool-a-pause-stat-cnt
+ enum-name: ethtool-a-pause-stat
attributes:
-
name: unspec
@@ -875,13 +877,17 @@ attribute-sets:
type: pad
-
name: tx-frames
+ doc: Number of PAUSE frames transmitted.
type: u64
-
name: rx-frames
+ doc: Number of PAUSE frames received.
type: u64
-
name: pause
+ doc: Parameters for link-wide PAUSE (IEEE 802.3 Annex 31B).
attr-cnt-name: __ethtool-a-pause-cnt
+ enum-name: ethtool-a-pause
attributes:
-
name: unspec
@@ -893,19 +899,40 @@ attribute-sets:
nested-attributes: header
-
name: autoneg
+ doc: |
+ Acts as a mode selector for the driver.
+ On GET: indicates the driver's behavior. If true, the driver will
+ respect the negotiated outcome; if false, the driver will use a
+ forced configuration.
+ On SET: if true, the driver configures the PHY's advertisement based
+ on the rx and tx attributes. If false, the driver forces the MAC
+ into the state defined by the rx and tx attributes.
type: u8
-
name: rx
+ doc: |
+ Enable receiving PAUSE frames (pausing local TX).
+ On GET: reflects the currently preferred configuration state.
type: u8
-
name: tx
+ doc: |
+ Enable transmitting PAUSE frames (pausing peer TX).
+ On GET: reflects the currently preferred configuration state.
type: u8
-
name: stats
+ doc: |
+ Contains the pause statistics counters. The source of these
+ statistics is determined by stats-src.
type: nest
nested-attributes: pause-stat
-
name: stats-src
+ doc: |
+ Selects the source of the MAC statistics, values from
+ enum ethtool_mac_stats_src. This allows requesting statistics
+ from the individual components of the MAC Merge layer.
type: u32
-
name: eee