All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] mlxsw: Expose number of physical ports
@ 2021-01-21 13:10 Ido Schimmel
  2021-01-21 13:10 ` [PATCH net-next v2 1/2] mlxsw: Register physical ports as a devlink resource Ido Schimmel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ido Schimmel @ 2021-01-21 13:10 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, jiri, danieller, mlxsw, Ido Schimmel

From: Ido Schimmel <idosch@nvidia.com>

The switch ASIC has a limited capacity of physical ports that it can
support. While each system is brought up with a different number of
ports, this number can be increased via splitting up to the ASIC's
limit.

Expose physical ports as a devlink resource so that user space will have
visibility into the maximum number of ports that can be supported and
the current occupancy. With this resource it is possible, for example,
to write generic (i.e., not platform dependent) tests for port
splitting.

Patch #1 adds the new resource and patch #2 adds a selftest.

v2:
* Add the physical ports resource as a generic devlink resource so that
  it could be re-used by other device drivers

Danielle Ratson (2):
  mlxsw: Register physical ports as a devlink resource
  selftests: mlxsw: Add a scale test for physical ports

 .../networking/devlink/devlink-resource.rst   | 14 ++++
 drivers/net/ethernet/mellanox/mlxsw/core.c    | 77 ++++++++++++++++---
 drivers/net/ethernet/mellanox/mlxsw/core.h    |  5 ++
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |  2 +-
 include/net/devlink.h                         |  2 +
 net/core/devlink.c                            |  4 +
 .../selftests/drivers/net/mlxsw/port_scale.sh | 64 +++++++++++++++
 .../net/mlxsw/spectrum-2/port_scale.sh        | 16 ++++
 .../net/mlxsw/spectrum-2/resource_scale.sh    |  2 +-
 .../drivers/net/mlxsw/spectrum/port_scale.sh  | 16 ++++
 .../net/mlxsw/spectrum/resource_scale.sh      |  2 +-
 11 files changed, 191 insertions(+), 13 deletions(-)
 create mode 100644 tools/testing/selftests/drivers/net/mlxsw/port_scale.sh
 create mode 100644 tools/testing/selftests/drivers/net/mlxsw/spectrum-2/port_scale.sh
 create mode 100644 tools/testing/selftests/drivers/net/mlxsw/spectrum/port_scale.sh

-- 
2.29.2


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

end of thread, other threads:[~2021-01-23  6:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-21 13:10 [PATCH net-next v2 0/2] mlxsw: Expose number of physical ports Ido Schimmel
2021-01-21 13:10 ` [PATCH net-next v2 1/2] mlxsw: Register physical ports as a devlink resource Ido Schimmel
2021-01-21 13:10 ` [PATCH net-next v2 2/2] selftests: mlxsw: Add a scale test for physical ports Ido Schimmel
2021-01-23  6:10 ` [PATCH net-next v2 0/2] mlxsw: Expose number of " patchwork-bot+netdevbpf

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.