netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wojciech Drewek <wojciech.drewek@intel.com>
To: netdev@vger.kernel.org
Cc: intel-wired-lan@lists.osuosl.org, simon.horman@corigine.com,
	anthony.l.nguyen@intel.com, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, idosch@nvidia.com,
	przemyslaw.kitszel@intel.com, marcin.szycik@linux.intel.com
Subject: [PATCH net-next 0/3] ethtool: Max power support
Date: Fri, 29 Mar 2024 10:23:18 +0100	[thread overview]
Message-ID: <20240329092321.16843-1-wojciech.drewek@intel.com> (raw)

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


             reply	other threads:[~2024-03-29  9:25 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29  9:23 Wojciech Drewek [this message]
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

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=20240329092321.16843-1-wojciech.drewek@intel.com \
    --to=wojciech.drewek@intel.com \
    --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 \
    --cc=simon.horman@corigine.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).