Netdev List
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	petrm@nvidia.com, jiri@nvidia.com, vadimp@nvidia.com,
	mlxsw@nvidia.com, Ido Schimmel <idosch@nvidia.com>
Subject: [PATCH net-next 0/6] mlxsw: Line cards status tracking
Date: Tue, 19 Apr 2022 17:54:25 +0300	[thread overview]
Message-ID: <20220419145431.2991382-1-idosch@nvidia.com> (raw)

When a line card is provisioned, netdevs corresponding to the ports
found on the line card are registered. User space can then perform
various logical configurations (e.g., splitting, setting MTU) on these
netdevs.

However, since the line card is not present / powered on (i.e., it is
not in 'active' state), user space cannot access the various components
found on the line card. For example, user space cannot read the
temperature of gearboxes or transceiver modules found on the line card
via hwmon / thermal. Similarly, it cannot dump the EEPROM contents of
these transceiver modules. The above is only possible when the line card
becomes active.

This patchset solves the problem by tracking the status of each line
card and invoking callbacks from interested parties when a line card
becomes active / inactive.

Patchset overview:

Patch #1 adds the infrastructure in the line cards core that allows
users to registers a set of callbacks that are invoked when a line card
becomes active / inactive. To avoid races, if a line card is already
active during registration, the got_active() callback is invoked.

Patches #2-#3 are preparations.

Patch #4 changes the port module core to register a set of callbacks
with the line cards core. See detailed description with examples in the
commit message.

Patches #5-#6 do the same with regards to thermal / hwmon support, so
that user space will be able to monitor the temperature of various
components on the line card when it becomes active.

Jiri Pirko (1):
  mlxsw: core_linecards: Introduce ops for linecards status change
    tracking

Vadim Pasternak (5):
  mlxsw: core: Add bus argument to environment init API
  mlxsw: core_env: Split module power mode setting to a separate
    function
  mlxsw: core_env: Add interfaces for line card initialization and
    de-initialization
  mlxsw: core_thermal: Add interfaces for line card initialization and
    de-initialization
  mlxsw: core_hwmon: Add interfaces for line card initialization and
    de-initialization

 drivers/net/ethernet/mellanox/mlxsw/core.c    |   2 +-
 drivers/net/ethernet/mellanox/mlxsw/core.h    |  17 ++
 .../net/ethernet/mellanox/mlxsw/core_env.c    | 213 ++++++++++++++++--
 .../net/ethernet/mellanox/mlxsw/core_env.h    |   4 +-
 .../net/ethernet/mellanox/mlxsw/core_hwmon.c  |  84 +++++++
 .../ethernet/mellanox/mlxsw/core_linecards.c  | 137 +++++++++++
 .../ethernet/mellanox/mlxsw/core_thermal.c    |  74 ++++++
 7 files changed, 513 insertions(+), 18 deletions(-)

-- 
2.33.1


             reply	other threads:[~2022-04-19 14:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 14:54 Ido Schimmel [this message]
2022-04-19 14:54 ` [PATCH net-next 1/6] mlxsw: core_linecards: Introduce ops for linecards status change tracking Ido Schimmel
2022-04-19 14:54 ` [PATCH net-next 2/6] mlxsw: core: Add bus argument to environment init API Ido Schimmel
2022-04-19 14:54 ` [PATCH net-next 3/6] mlxsw: core_env: Split module power mode setting to a separate function Ido Schimmel
2022-04-19 14:54 ` [PATCH net-next 4/6] mlxsw: core_env: Add interfaces for line card initialization and de-initialization Ido Schimmel
2022-04-19 14:54 ` [PATCH net-next 5/6] mlxsw: core_thermal: " Ido Schimmel
2022-04-19 14:54 ` [PATCH net-next 6/6] mlxsw: core_hwmon: " Ido Schimmel
2022-04-20 14:10 ` [PATCH net-next 0/6] mlxsw: Line cards status tracking patchwork-bot+netdevbpf

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=20220419145431.2991382-1-idosch@nvidia.com \
    --to=idosch@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=vadimp@nvidia.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