[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fb1a53ea-d5cd-45a1-9073-450f6a753f87@intel.com>
Date: Fri, 12 Apr 2024 15:21:24 +0200
From: Wojciech Drewek <wojciech.drewek@...el.com>
To: Andrew Lunn <andrew@...n.ch>
CC: <pabeni@...hat.com>, <netdev@...r.kernel.org>, <edumazet@...gle.com>,
<marcin.szycik@...ux.intel.com>, <anthony.l.nguyen@...el.com>,
<idosch@...dia.com>, <kuba@...nel.org>, <intel-wired-lan@...ts.osuosl.org>,
<przemyslaw.kitszel@...el.com>
Subject: Re: [Intel-wired-lan] [PATCH net-next 0/3] ethtool: Max power support
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
Powered by blists - more mailing lists