From: Donald Hunter <donald.hunter@gmail.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Kory Maincent <kory.maincent@bootlin.com>,
Lukasz Majewski <lukma@denx.de>,
Jonathan Corbet <corbet@lwn.net>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
Jiri Pirko <jiri@resnulli.us>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, Russell King <linux@armlinux.org.uk>,
Divya.Koppera@microchip.com,
Sabrina Dubroca <sd@queasysnail.net>,
Stanislav Fomichev <sdf@fomichev.me>
Subject: Re: [PATCH net-next v4 3/3] Documentation: net: add flow control guide and document ethtool API
Date: Tue, 09 Sep 2025 15:29:53 +0100 [thread overview]
Message-ID: <m2ikhrk8bi.fsf@gmail.com> (raw)
In-Reply-To: <20250909072212.3710365-4-o.rempel@pengutronix.de>
Oleksij Rempel <o.rempel@pengutronix.de> writes:
> 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>
> ---
> changes v4:
> - Reworded pause stats-src doc: clarify that sources are MAC Merge layer
> components, not PHYs.
> - Fixed non-ASCII dash in "Link-wide".
> - Added explicit note that pause_time = 0 resumes transmission immediately.
> - Corrected terminology: use "pause quantum" (singular) consistently.
> - Dropped paragraph about user tuning of FIFO watermarks (no ABI support).
> - Synced UAPI header comments with YAML wording (MAC Merge layer).
> - Ran ASCII sweep to remove stray non-ASCII characters.
> changes v3:
> - add warning about half-duplex collision-based flow control on shared media
> - clarify pause autoneg vs. generic autoneg and forced mode semantics
> - document pause quanta defaults used by common MAC drivers, with time examples
> - fix vague cross-reference, point to autonegotiation resolution section
> - expand notes on PAUSE vs. PFC exclusivity
> - include generated enums (pause / pause-stat) in UAPI with kernel-doc
> changes v2:
> - remove recommendations
> - add note about autoneg resolution
> ---
> Documentation/netlink/specs/ethtool.yaml | 27 ++
> Documentation/networking/flow_control.rst | 373 ++++++++++++++++++
> Documentation/networking/index.rst | 1 +
> Documentation/networking/phy.rst | 12 +-
> include/linux/ethtool.h | 45 ++-
> .../uapi/linux/ethtool_netlink_generated.h | 28 +-
> net/dcb/dcbnl.c | 2 +
> net/ethtool/pause.c | 4 +
> 8 files changed, 477 insertions(+), 15 deletions(-)
> create mode 100644 Documentation/networking/flow_control.rst
>
> diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml
> index 7a7594713f1f..c3f6a9af6f08 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
Please use - instead of _ in all names in ynl specs. See existing
enum-name: entries in ethtool.yaml
> 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
Also here.
next prev parent reply other threads:[~2025-09-09 14:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 7:22 [PATCH net-next v4 0/3] Documentation and ynl: add flow control Oleksij Rempel
2025-09-09 7:22 ` [PATCH net-next v4 1/3] tools: ynl-gen: generate kdoc for attribute enums Oleksij Rempel
2025-09-09 14:05 ` Donald Hunter
2025-09-09 7:22 ` [PATCH net-next v4 2/3] net: ynl: add generated kdoc to UAPI headers Oleksij Rempel
2025-09-09 14:20 ` Donald Hunter
2025-09-09 7:22 ` [PATCH net-next v4 3/3] Documentation: net: add flow control guide and document ethtool API Oleksij Rempel
2025-09-09 14:29 ` Donald Hunter [this message]
2025-09-09 21:32 ` [PATCH net-next v4 0/3] Documentation and ynl: add flow control Jakub Kicinski
2025-09-17 10:12 ` Oleksij Rempel
2025-09-17 21:06 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2ikhrk8bi.fsf@gmail.com \
--to=donald.hunter@gmail.com \
--cc=Divya.Koppera@microchip.com \
--cc=andrew@lunn.ch \
--cc=ast@kernel.org \
--cc=corbet@lwn.net \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hawk@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=jiri@resnulli.us \
--cc=john.fastabend@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kory.maincent@bootlin.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lukma@denx.de \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=sd@queasysnail.net \
--cc=sdf@fomichev.me \
--cc=vadim.fedorenko@linux.dev \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).