netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wojciech Drewek <wojciech.drewek@intel.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: <pabeni@redhat.com>, <netdev@vger.kernel.org>,
	<edumazet@google.com>, <marcin.szycik@linux.intel.com>,
	<anthony.l.nguyen@intel.com>, <idosch@nvidia.com>,
	<kuba@kernel.org>, <intel-wired-lan@lists.osuosl.org>,
	<przemyslaw.kitszel@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH net-next 0/3] ethtool: Max power support
Date: Fri, 12 Apr 2024 15:21:24 +0200	[thread overview]
Message-ID: <fb1a53ea-d5cd-45a1-9073-450f6a753f87@intel.com> (raw)
In-Reply-To: <c6258afd-2631-4e5d-ab25-6b2b7e2f4df4@lunn.ch>



On 09.04.2024 15:39, Andrew Lunn wrote:
>> This is something my current design supports I think. Using
>> ETHTOOL_A_MODULE_MAX_POWER_SET user can get what cage supports
>> and change it.
>  
>> This could be done using ethtool_module_power_mode_policy I think.
> 
> All these 'I think' don't give me a warm fuzzy feeling this is a well
> thought out and designed uAPI.
> 
> I assume you have ethtool patches for your new netlink attributes. So
> show us the real usage. Start with an SFP in its default lower power
> mode. Show us the commands to display the current status. Allocate it
> more power, tell the module it can use more power, and then show us
> the status after the change has been made.

Ok, but do we really need an API to switch the module between high/low power mode?
I'd assume this is done automatically e.g. when we lower max power in the cage below
module's high power mode than it should imply that the module should go to low power mode.
Same with the high power mode, if enough power is assigned to the cage than module
should go to the high power mode.

Regarding the current status and what module supports, there is -m option:
$ ethtool -m ens801f0np0
        Identifier                                : 0x0d (QSFP+)
        Extended identifier                       : 0x00
        Extended identifier description           : 1.5W max. Power consumption
        Extended identifier description           : No CDR in TX, No CDR in RX
        Extended identifier description           : High Power Class (> 3.5 W) not enabled

> 
> Then lower the power to that cage and assign the power to a different
> cage.
> 
> This is something you can later reuse in the 0/X patch describing the
> big picture of what the patchset does, and it will guide others who
> want to implement the same API in the Linux SFP driver, or other MAC
> drivers.
> 
> 	Andrew

  reply	other threads:[~2024-04-12 13:21 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29  9:23 [PATCH net-next 0/3] ethtool: Max power support Wojciech Drewek
2024-03-29  9:23 ` [PATCH net-next 1/3] ethtool: Make module API more generic Wojciech Drewek
2024-03-29  9:23 ` [PATCH net-next 2/3] ethtool: Introduce max power support Wojciech Drewek
2024-03-29 22:29   ` Jakub Kicinski
2024-03-29 22:29     ` Jakub Kicinski
2024-04-02 11:25     ` Wojciech Drewek
2024-04-02 14:34       ` Jakub Kicinski
2024-04-03 10:19         ` Wojciech Drewek
2024-04-04  0:18           ` Jakub Kicinski
2024-04-04 12:19             ` Wojciech Drewek
2024-03-30 22:14   ` Andrew Lunn
2024-03-30 22:14     ` Andrew Lunn
2024-04-03  9:50     ` Wojciech Drewek
2024-03-29  9:23 ` [PATCH net-next 3/3] ice: Implement ethtool max power configuration Wojciech Drewek
2024-03-29 22:16 ` [PATCH net-next 0/3] ethtool: Max power support Jakub Kicinski
2024-04-02  9:58   ` Wojciech Drewek
2024-03-30 21:57 ` Andrew Lunn
2024-03-30 21:57   ` Andrew Lunn
2024-04-02 11:38   ` [Intel-wired-lan] " Wojciech Drewek
2024-04-02 14:25     ` Jakub Kicinski
2024-04-02 14:53       ` Andrew Lunn
2024-04-02 14:46     ` Andrew Lunn
2024-04-02 14:57       ` Jakub Kicinski
2024-04-03 13:18       ` Wojciech Drewek
2024-04-03 13:40         ` Andrew Lunn
2024-04-04 12:21           ` Wojciech Drewek
2024-04-03 13:49         ` Andrew Lunn
2024-04-04 12:45           ` Wojciech Drewek
2024-04-04 13:53             ` Andrew Lunn
2024-04-09 12:20               ` Wojciech Drewek
2024-04-09 13:39                 ` Andrew Lunn
2024-04-12 13:21                   ` Wojciech Drewek [this message]
2024-04-15 22:03                     ` Andrew Lunn
2024-04-18 11:48                       ` Wojciech Drewek

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=fb1a53ea-d5cd-45a1-9073-450f6a753f87@intel.com \
    --to=wojciech.drewek@intel.com \
    --cc=andrew@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=edumazet@google.com \
    --cc=idosch@nvidia.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=marcin.szycik@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.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).