netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] ethtool: Max power support
@ 2024-03-29  9:23 Wojciech Drewek
  2024-03-29  9:23 ` [PATCH net-next 1/3] ethtool: Make module API more generic Wojciech Drewek
                   ` (4 more replies)
  0 siblings, 5 replies; 34+ messages in thread
From: Wojciech Drewek @ 2024-03-29  9:23 UTC (permalink / raw)
  To: netdev
  Cc: intel-wired-lan, simon.horman, anthony.l.nguyen, edumazet, kuba,
	pabeni, idosch, przemyslaw.kitszel, marcin.szycik

Some ethernet modules use nonstandard power levels [1]. Extend ethtool
module implementation to support new attributes that will allow user
to change maximum power. Rename structures and functions to be more
generic. Introduce an example of the new API in ice driver.

Ethtool examples:
$ ethtool --show-module enp1s0f0np0
Module parameters for enp1s0f0np0:
power-min-allowed: 1000 mW
power-max-allowed: 3000 mW
power-max-set: 1500 mW

$ ethtool --set-module enp1s0f0np0 power-max-set 4000

This idea was originally discussed here [2]

[1] https://www.fs.com/de-en/products/69111.html
[2] https://lore.kernel.org/netdev/MW4PR11MB57768054635E8DEF841BB2A9FDE3A@MW4PR11MB5776.namprd11.prod.outlook.com/

Wojciech Drewek (3):
  ethtool: Make module API more generic
  ethtool: Introduce max power support
  ice: Implement ethtool max power configuration

 drivers/net/ethernet/intel/ice/ice.h          |   2 +
 .../net/ethernet/intel/ice/ice_adminq_cmd.h   |  21 +
 drivers/net/ethernet/intel/ice/ice_common.c   |  46 ++
 drivers/net/ethernet/intel/ice/ice_common.h   |   3 +
 drivers/net/ethernet/intel/ice/ice_devlink.c  |  14 +-
 drivers/net/ethernet/intel/ice/ice_ethtool.c  | 461 ++++++++++++++++++
 drivers/net/ethernet/intel/ice/ice_nvm.c      |   2 +-
 drivers/net/ethernet/intel/ice/ice_nvm.h      |   3 +
 drivers/net/ethernet/intel/ice/ice_type.h     |   4 +
 .../net/ethernet/mellanox/mlxsw/core_env.c    |   2 +-
 .../net/ethernet/mellanox/mlxsw/core_env.h    |   2 +-
 drivers/net/ethernet/mellanox/mlxsw/minimal.c |   8 +-
 .../mellanox/mlxsw/spectrum_ethtool.c         |   8 +-
 include/linux/ethtool.h                       |  35 +-
 include/uapi/linux/ethtool_netlink.h          |   4 +
 net/ethtool/module.c                          | 102 +++-
 net/ethtool/netlink.h                         |   2 +-
 17 files changed, 669 insertions(+), 50 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2024-04-18 11:48 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-04-15 22:03                     ` Andrew Lunn
2024-04-18 11:48                       ` Wojciech Drewek

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).