From: Jakub Kicinski <kuba@kernel.org>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Michal Kubecek <mkubecek@suse.cz>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Vinicius Costa Gomes <vinicius.gomes@intel.com>,
Xiaoliang Yang <xiaoliang.yang_1@nxp.com>,
Kurt Kanzenbach <kurt@linutronix.de>,
Rui Sousa <rui.sousa@nxp.com>,
Ferenc Fejes <ferenc.fejes@ericsson.com>,
Pranavi Somisetty <pranavi.somisetty@amd.com>,
Harini Katakam <harini.katakam@amd.com>,
Colin Foster <colin.foster@in-advantage.com>,
UNGLinuxDriver@microchip.com,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH v2 net-next 03/12] docs: ethtool-netlink: document interface for MAC Merge layer
Date: Thu, 12 Jan 2023 22:18:36 -0800 [thread overview]
Message-ID: <20230112221836.0b1e6021@kernel.org> (raw)
In-Reply-To: <20230111161706.1465242-4-vladimir.oltean@nxp.com>
On Wed, 11 Jan 2023 18:16:57 +0200 Vladimir Oltean wrote:
> 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 <vladimir.oltean@nxp.com>
> ---
> v1->v2: patch is new
>
> Documentation/networking/ethtool-netlink.rst | 103 +++++++++++++++++++
> Documentation/networking/statistics.rst | 1 +
> 2 files changed, 104 insertions(+)
>
> diff --git a/Documentation/networking/ethtool-netlink.rst b/Documentation/networking/ethtool-netlink.rst
> index f10f8eb44255..490c2280ce4f 100644
> --- a/Documentation/networking/ethtool-netlink.rst
> +++ b/Documentation/networking/ethtool-netlink.rst
> @@ -223,6 +223,8 @@ Userspace to kernel:
> ``ETHTOOL_MSG_PSE_SET`` set PSE parameters
> ``ETHTOOL_MSG_PSE_GET`` get PSE parameters
> ``ETHTOOL_MSG_RSS_GET`` get RSS settings
> + ``ETHTOOL_MSG_MM_GET`` get MAC merge layer state
> + ``ETHTOOL_MSG_MM_SET`` set MAC merge layer parameters
> ===================================== =================================
>
> Kernel to userspace:
> @@ -265,6 +267,7 @@ Kernel to userspace:
> ``ETHTOOL_MSG_MODULE_GET_REPLY`` transceiver module parameters
> ``ETHTOOL_MSG_PSE_GET_REPLY`` PSE parameters
> ``ETHTOOL_MSG_RSS_GET_REPLY`` RSS settings
> + ``ETHTOOL_MSG_MM_GET_REPLY`` MAC merge layer status
> ======================================== =================================
>
> ``GET`` requests are sent by userspace applications to retrieve device
> @@ -1716,6 +1719,104 @@ being used. Current supported options are toeplitz, xor or crc32.
> ETHTOOL_A_RSS_INDIR attribute returns RSS indrection table where each byte
> indicates queue number.
>
> +MM_GET
> +======
> +
> +Retrieve 802.3 MAC Merge parameters.
> +
> +Request contents:
> +
> + ==================================== ====== ==========================
> + ``ETHTOOL_A_MM_HEADER`` nested request header
> + ==================================== ====== ==========================
> +
> +Kernel response contents:
> +
> + ================================ ====== ===================================
> + ``ETHTOOL_A_MM_HEADER`` Nested request header
> +
> + ``ETHTOOL_A_MM_SUPPORTED`` Bool set if device supports the MM layer
I'm guessing the empty lines are to improve readability?
(They are not required for the table to render correctly.)
Why did you capitalize the types, tho?
> + ``ETHTOOL_A_MM_PMAC_ENABLED`` Bool set if RX of preemptible and SMD-V
> + frames is enabled
s/is/are/ ?
> + ``ETHTOOL_A_MM_TX_ENABLED`` Bool set if TX of preemptible frames is
> + administratively enabled (might be
> + inactive if verification failed)
> +
> + ``ETHTOOL_A_MM_TX_ACTIVE`` Bool set if TX of preemptible frames is
> + operationally enabled
> +
> + ``ETHTOOL_A_MM_ADD_FRAG_SIZE`` U32 minimum size of transmitted
> + non-final fragments, in octets
> +
> + ``ETHTOOL_A_MM_VERIFY_ENABLED`` Bool set if TX of SMD-V frames is
> + administratively enabled (TX will
> + not take place when port is not up)
The sentence in the brackets seems obvious, is there some special
MM meaning to "port is not up"? You're not talking about the link
being up?
> + ``ETHTOOL_A_MM_VERIFY_STATUS`` U8 state of the Verify function
Only places you say "Verify function" rather than just "verification",
not sure that's on purpose.
> + ``ETHTOOL_A_MM_VERIFY_TIME`` U32 delay between verification attempts
> +
> + ``ETHTOOL_A_MM_MAX_VERIFY_TIME`` U32 maximum interval supported by
s/interval/verification interval/ ?
> + device
> +
> + ``ETHTOOL_A_MM_STATS`` Nested IEEE 802.3-2018 subclause 30.14.1
> + oMACMergeEntity statistics counters
> +
The empty line between last entry and delimiter can go
> + ================================ ====== ===================================
> +
> +If ``ETHTOOL_A_MM_SUPPORTED`` is reported as false, the other netlink
> +attributes will be absent.
Why not return -EOPNOTSUPP?
You do so in case driver does not have the op:
+ if (!ops->get_mm)
+ return -EOPNOTSUPP;
next prev parent reply other threads:[~2023-01-13 6:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 16:16 [PATCH v2 net-next 00/12] ethtool support for IEEE 802.3 MAC Merge layer Vladimir Oltean
2023-01-11 16:16 ` [PATCH v2 net-next 01/12] net: ethtool: netlink: introduce ethnl_update_bool() Vladimir Oltean
2023-01-11 16:16 ` [PATCH v2 net-next 02/12] net: ethtool: add support for MAC Merge layer Vladimir Oltean
2023-01-13 6:27 ` Jakub Kicinski
2023-01-16 9:02 ` Somisetty, Pranavi
2023-01-16 12:17 ` Vladimir Oltean
2023-01-11 16:16 ` [PATCH v2 net-next 03/12] docs: ethtool-netlink: document interface " Vladimir Oltean
2023-01-13 6:18 ` Jakub Kicinski [this message]
2023-01-11 16:16 ` [PATCH v2 net-next 04/12] net: ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC) Vladimir Oltean
2023-01-14 4:22 ` Jakub Kicinski
2023-01-14 4:43 ` Jakub Kicinski
2023-01-14 23:22 ` Vladimir Oltean
2023-01-16 17:42 ` Vladimir Oltean
2023-01-17 18:54 ` Jakub Kicinski
2023-01-11 16:16 ` [PATCH v2 net-next 05/12] docs: ethtool: document ETHTOOL_A_STATS_SRC and ETHTOOL_A_PAUSE_STATS_SRC Vladimir Oltean
2023-01-11 16:17 ` [PATCH v2 net-next 06/12] net: ethtool: add helpers for aggregate statistics Vladimir Oltean
2023-01-11 16:17 ` [PATCH v2 net-next 07/12] net: ethtool: add helpers for MM addFragSize translation Vladimir Oltean
2023-01-11 16:17 ` [PATCH v2 net-next 08/12] net: dsa: add plumbing for changing and getting MAC merge layer state Vladimir Oltean
2023-01-11 16:17 ` [PATCH v2 net-next 09/12] net: mscc: ocelot: allow ocelot_stat_layout elements with no name Vladimir Oltean
2023-01-11 16:17 ` [PATCH v2 net-next 10/12] net: mscc: ocelot: hide access to ocelot_stats_layout behind a helper Vladimir Oltean
2023-01-11 16:17 ` [PATCH v2 net-next 11/12] net: mscc: ocelot: export ethtool MAC Merge stats for Felix VSC9959 Vladimir Oltean
2023-01-11 16:17 ` [PATCH v2 net-next 12/12] net: mscc: ocelot: add MAC Merge layer support for VSC9959 Vladimir Oltean
2023-01-12 11:29 ` [PATCH v2 net-next 00/12] ethtool support for IEEE 802.3 MAC Merge layer Vladimir Oltean
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=20230112221836.0b1e6021@kernel.org \
--to=kuba@kernel.org \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=colin.foster@in-advantage.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=ferenc.fejes@ericsson.com \
--cc=harini.katakam@amd.com \
--cc=kurt@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pranavi.somisetty@amd.com \
--cc=rui.sousa@nxp.com \
--cc=vinicius.gomes@intel.com \
--cc=vladimir.oltean@nxp.com \
--cc=xiaoliang.yang_1@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).