From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Kory Maincent <kory.maincent@bootlin.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jonathan Corbet <corbet@lwn.net>,
Donald Hunter <donald.hunter@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-doc@vger.kernel.org, Kyle Swenson <kyle.swenson@est.tech>,
Dent Project <dentproject@linuxfoundation.org>,
kernel@pengutronix.de
Subject: Re: [PATCH net-next 06/12] net: ethtool: Add PSE new port priority support feature
Date: Sat, 5 Oct 2024 08:26:36 +0200 [thread overview]
Message-ID: <ZwDcHCr1aXeGWXIh@pengutronix.de> (raw)
In-Reply-To: <20241002-feature_poe_port_prio-v1-6-787054f74ed5@bootlin.com>
On Wed, Oct 02, 2024 at 06:28:02PM +0200, Kory Maincent wrote:
> From: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
>
> This patch expands the status information provided by ethtool for PSE c33
> with current port priority and max port priority. It also adds a call to
> pse_ethtool_set_prio() to configure the PSE port priority.
>
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
> Documentation/networking/ethtool-netlink.rst | 16 ++++++++++++++++
> include/uapi/linux/ethtool_netlink.h | 2 ++
> net/ethtool/pse-pd.c | 18 ++++++++++++++++++
> 3 files changed, 36 insertions(+)
>
> diff --git a/Documentation/networking/ethtool-netlink.rst b/Documentation/networking/ethtool-netlink.rst
> index 295563e91082..15208429a973 100644
> --- a/Documentation/networking/ethtool-netlink.rst
> +++ b/Documentation/networking/ethtool-netlink.rst
> @@ -1763,6 +1763,10 @@ Kernel response contents:
> limit of the PoE PSE.
> ``ETHTOOL_A_C33_PSE_PW_LIMIT_RANGES`` nested Supported power limit
> configuration ranges.
> + ``ETHTOOL_A_C33_PSE_PRIO_MAX`` u32 priority maximum configurable
> + on the PoE PSE
> + ``ETHTOOL_A_C33_PSE_PRIO`` u32 priority of the PoE PSE
> + currently configured
> ========================================== ====== =============================
>
> When set, the optional ``ETHTOOL_A_PODL_PSE_ADMIN_STATE`` attribute identifies
> @@ -1836,6 +1840,12 @@ identifies the C33 PSE power limit ranges through
> If the controller works with fixed classes, the min and max values will be
> equal.
>
> +When set, the optional ``ETHTOOL_A_C33_PSE_PRIO_MAX`` attribute identifies
> +the C33 PSE maximum priority value.
> +
> +When set, the optional ``ETHTOOL_A_C33_PSE_PRIO`` attributes is used to
> +identifies the currently configured C33 PSE priority.
> +
> PSE_SET
> =======
>
> @@ -1849,6 +1859,8 @@ Request contents:
> ``ETHTOOL_A_C33_PSE_ADMIN_CONTROL`` u32 Control PSE Admin state
> ``ETHTOOL_A_C33_PSE_AVAIL_PWR_LIMIT`` u32 Control PoE PSE available
> power limit
> + ``ETHTOOL_A_C33_PSE_PRIO`` u32 Control priority of the
> + PoE PSE
> ====================================== ====== =============================
>
> When set, the optional ``ETHTOOL_A_PODL_PSE_ADMIN_CONTROL`` attribute is used
> @@ -1871,6 +1883,10 @@ various existing products that document power consumption in watts rather than
> classes. If power limit configuration based on classes is needed, the
> conversion can be done in user space, for example by ethtool.
>
> +When set, the optional ``ETHTOOL_A_C33_PSE_PRIO`` attributes is used to
> +control the C33 PSE priority. Allowed priority value are between zero
> +and the value of ``ETHTOOL_A_C33_PSE_PRIO_MAX`` attribute.
We need to introduce a new attribute to effectively manage PSE priorities. With
the addition of the `ETHTOOL_A_C33_PSE_PRIO` attribute for setting priorities,
it's important to know which PSE controller or domain each port belongs to.
Initially, we might consider using a PSE controller index, such as
`ETHTOOL_A_PSE_CONTROLLER_ID`, to identify the specific PSE controller
associated with each port.
However, using just the PSE controller index is too limiting. Here's why:
- Typical PSE controllers handle priorities only within themselves. They
usually can't manage prioritization across different controllers unless they
are part of the same power domain. In systems where multiple PSE controllers
cooperate—either directly or through software mechanisms like the regulator
framework—controllers might share power domains or manage priorities together.
This means priorities are not confined to individual controllers but are
relevant within shared power domains.
- As systems become more complex, with controllers that can work together,
relying solely on a controller index won't accommodate these cooperative
scenarios.
To address these issues, we should use a power domain identifier instead. I
suggest introducing a new attribute called `ETHTOOL_A_PSE_POWER_DOMAIN_ID`.
- It specifies the power domain to which each port belongs, ensuring that
priorities are managed correctly within that domain.
- It accommodates systems where controllers cooperate and share power
resources, allowing for proper coordination of priorities across controllers
within the same power domain.
- It provides flexibility for future developments where controllers might work
together in new ways, preventing limitations that would arise from using a
strict controller index.
However, to provide comprehensive information, it would be beneficial to use
both attributes:
- `ETHTOOL_A_PSE_CONTROLLER_ID` to identify the specific PSE controller
associated with each port.
- `ETHTOOL_A_PSE_POWER_DOMAIN_ID` to specify the power domain to which each
port belongs.
Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-10-05 6:26 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 16:27 [PATCH net-next 00/12] Add support for PSE port priority Kory Maincent
2024-10-02 16:27 ` [PATCH net-next 01/12] net: pse-pd: Remove unused pse_ethtool_get_pw_limit function declaration Kory Maincent
2024-10-02 23:24 ` Andrew Lunn
2024-10-03 3:25 ` Kalesh Anakkur Purayil
2024-10-09 4:37 ` Oleksij Rempel
2024-10-02 16:27 ` [PATCH net-next 02/12] net: pse-pd: tps23881: Correct boolean evaluation for bitmask checks Kory Maincent
2024-10-02 16:27 ` [PATCH net-next 03/12] net: pse-pd: tps23881: Simplify function returns by removing redundant checks Kory Maincent
2024-10-02 23:26 ` Andrew Lunn
2024-10-09 4:38 ` Oleksij Rempel
2024-10-02 16:28 ` [PATCH net-next 04/12] net: pse-pd: tps23881: Add support for power limit and measurement features Kory Maincent
2024-10-02 23:31 ` Andrew Lunn
2024-10-09 5:02 ` Oleksij Rempel
2024-10-09 9:05 ` Kory Maincent
2024-10-09 15:16 ` Oleksij Rempel
2024-10-09 16:17 ` Kory Maincent
2024-10-02 16:28 ` [PATCH net-next 05/12] net: pse-pd: Add support for getting and setting port priority Kory Maincent
2024-10-02 23:34 ` Andrew Lunn
2024-10-09 5:04 ` Oleksij Rempel
2024-10-02 16:28 ` [PATCH net-next 06/12] net: ethtool: Add PSE new port priority support feature Kory Maincent
2024-10-02 23:37 ` Andrew Lunn
2024-10-05 6:26 ` Oleksij Rempel [this message]
2024-10-07 9:30 ` Kory Maincent
2024-10-07 14:10 ` Oleksij Rempel
2024-10-08 10:23 ` Kory Maincent
2024-10-08 12:56 ` Kory Maincent
2024-10-08 15:01 ` Oleksij Rempel
2024-10-08 16:31 ` Oleksij Rempel
2024-10-02 16:28 ` [PATCH net-next 07/12] netlink: specs: Expand the PSE netlink command with C33 prio attributes Kory Maincent
2024-10-04 10:44 ` Donald Hunter
2024-10-02 16:28 ` [PATCH net-next 08/12] net: pse-pd: pd692x0: Add support for PSE PI priority feature Kory Maincent
2024-10-02 23:41 ` Andrew Lunn
2024-10-03 8:01 ` Kory Maincent
2024-10-08 13:57 ` Oleksij Rempel
2024-10-08 14:21 ` Kory Maincent
2024-10-08 14:53 ` Oleksij Rempel
2024-10-08 16:50 ` Andrew Lunn
2024-10-09 7:16 ` Oleksij Rempel
2024-10-09 16:09 ` Andrew Lunn
2024-10-02 16:28 ` [PATCH net-next 09/12] net: pse-pd: tps23881: " Kory Maincent
2024-10-02 23:42 ` Andrew Lunn
2024-10-08 16:26 ` Oleksij Rempel
2024-10-02 16:28 ` [PATCH net-next 10/12] net: pse-pd: Register regulator even for undescribed PSE PIs Kory Maincent
2024-10-02 23:46 ` Andrew Lunn
2024-10-03 8:19 ` Kory Maincent
2024-10-02 16:28 ` [PATCH net-next 11/12] net: pse-pd: Add support for event reporting using devm_regulator_irq_helper Kory Maincent
2024-10-02 23:52 ` Andrew Lunn
2024-10-03 8:28 ` Kory Maincent
2024-10-03 12:56 ` Andrew Lunn
2024-10-03 13:33 ` Kory Maincent
2024-10-03 15:22 ` Andrew Lunn
2024-10-04 13:56 ` Oleksij Rempel
2024-10-04 14:02 ` Oleksij Rempel
2024-10-04 14:10 ` Kory Maincent
2024-10-03 0:02 ` Andrew Lunn
2024-10-02 16:28 ` [PATCH net-next 12/12] net: pse-pd: tps23881: Add support for PSE events and interrupts Kory Maincent
2024-10-02 23:57 ` Andrew Lunn
2024-10-03 8:29 ` Kory Maincent
2024-10-08 17:03 ` Oleksij Rempel
2024-10-09 7:25 ` Oleksij Rempel
2024-10-09 8:25 ` Kory Maincent
2024-10-09 13:54 ` [PATCH net-next 00/12] Add support for PSE port priority Kyle Swenson
2024-10-09 15:04 ` Kory Maincent
2024-10-09 17:42 ` Kyle Swenson
2024-10-10 5:42 ` Oleksij Rempel
2024-10-15 9:43 ` Kory Maincent
2024-10-17 10:35 ` Kory Maincent
2024-10-18 6:14 ` Oleksij Rempel
2024-10-18 12:37 ` Kory Maincent
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=ZwDcHCr1aXeGWXIh@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=dentproject@linuxfoundation.org \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=kernel@pengutronix.de \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=kyle.swenson@est.tech \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=thomas.petazzoni@bootlin.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
all inboxes | Powered by JetHome®