All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia.com>
To: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	<netdev@vger.kernel.org>
Cc: Vadim Pasternak <vadimp@nvidia.com>,
	Ido Schimmel <idosch@nvidia.com>, <mlxsw@nvidia.com>,
	Petr Machata <petrm@nvidia.com>
Subject: [PATCH net-next 0/8] mlxsw: Introduce modular system support by minimal driver
Date: Sun, 21 Aug 2022 18:20:10 +0200	[thread overview]
Message-ID: <cover.1661093502.git.petrm@nvidia.com> (raw)

Vadim Pasternak writes:

This patchset adds line cards support in mlxsw_minimal, which is used
for monitoring purposes on BMC systems. The BMC is connected to the
ASIC over I2C bus, unlike the host CPU that is connected to the ASIC
via PCI bus.

The BMC system needs to be notified whenever line cards become active
or inactive, so that, for example, netdevs will be registered /
unregistered by mlxsw_minimal. However, traps cannot be generated
towards the BMC over the I2C bus. To overcome that, the I2C bus driver
(i.e., mlxsw_i2c) registers an handler for an IRQ that is fired upon
specific system wide changes, like line card activation and
deactivation.

The generated event is handled by mlxsw_core, which checks whether
anything changed in the state of available line cards. If a line card
becomes active or inactive, interested parties such as mlxsw_minimal
are notified via their registered line card event callback.

Patch set overview:

Patches #1 is preparations.

Patches #2-#3 extend mlxsw_core with an infrastructure to handle the
	previously mentioned system events.

Patch #4 extends the I2C bus driver to register an handler for the IRQ
	fired upon specific system wide changes.

Patches #5-#8 gradually add line cards support in mlxsw_minimal by
	dynamically registering / unregistering netdevs for ports found on
	line cards, whenever a line card becomes active / inactive.

Vadim Pasternak (8):
  mlxsw: core_linecards: Separate line card init and fini flow
  mlxsw: core: Add registration APIs for system event handler
  mlxsw: core_linecards: Register a system event handler
  mlxsw: i2c: Add support for system interrupt handling
  mlxsw: minimal: Extend APIs with slot index for modular system support
  mlxsw: minimal: Move ports allocation to separate routine
  mlxsw: minimal: Extend module to port mapping with slot index
  mlxsw: minimal: Extend to support line card dynamic operations

 drivers/net/ethernet/mellanox/mlxsw/core.c    |  68 ++++
 drivers/net/ethernet/mellanox/mlxsw/core.h    |   8 +
 .../ethernet/mellanox/mlxsw/core_linecards.c  | 100 +++--
 drivers/net/ethernet/mellanox/mlxsw/i2c.c     |  87 +++-
 drivers/net/ethernet/mellanox/mlxsw/minimal.c | 381 ++++++++++++++----
 5 files changed, 552 insertions(+), 92 deletions(-)

-- 
2.35.3


             reply	other threads:[~2022-08-21 16:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-21 16:20 Petr Machata [this message]
2022-08-21 16:20 ` [PATCH net-next 1/8] mlxsw: core_linecards: Separate line card init and fini flow Petr Machata
2022-08-21 16:20 ` [PATCH net-next 2/8] mlxsw: core: Add registration APIs for system event handler Petr Machata
2022-08-21 16:20 ` [PATCH net-next 3/8] mlxsw: core_linecards: Register a " Petr Machata
2022-08-21 16:20 ` [PATCH net-next 4/8] mlxsw: i2c: Add support for system interrupt handling Petr Machata
2022-08-22  1:48   ` Andrew Lunn
2022-08-22 11:53     ` Vadim Pasternak
2022-08-21 16:20 ` [PATCH net-next 5/8] mlxsw: minimal: Extend APIs with slot index for modular system support Petr Machata
2022-08-21 16:20 ` [PATCH net-next 6/8] mlxsw: minimal: Move ports allocation to separate routine Petr Machata
2022-08-21 16:20 ` [PATCH net-next 7/8] mlxsw: minimal: Extend module to port mapping with slot index Petr Machata
2022-08-21 16:20 ` [PATCH net-next 8/8] mlxsw: minimal: Extend to support line card dynamic operations Petr Machata
2022-08-24  0:40 ` [PATCH net-next 0/8] mlxsw: Introduce modular system support by minimal driver 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=cover.1661093502.git.petrm@nvidia.com \
    --to=petrm@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.