mbox series

[net-next,0/9] mlxsw: Support multiple RIF MAC prefixes

Message ID 20211026094225.1265320-1-idosch@idosch.org (mailing list archive)
Headers show
Series mlxsw: Support multiple RIF MAC prefixes | expand

Message

Ido Schimmel Oct. 26, 2021, 9:42 a.m. UTC
From: Ido Schimmel <idosch@nvidia.com>

Currently, mlxsw enforces that all the netdevs used as router interfaces
(RIFs) have the same MAC prefix (e.g., same 38 MSBs in Spectrum-1).
Otherwise, an error is returned to user space with extack. This patchset
relaxes the limitation through the use of RIF MAC profiles.

A RIF MAC profile is a hardware entity that represents a particular MAC
prefix which multiple RIFs can reference. Therefore, the number of
possible MAC prefixes is no longer one, but the number of profiles
supported by the device.

The ability to change the MAC of a particular netdev is useful, for
example, for users who use the netdev to connect to an upstream provider
that performs MAC filtering. Currently, such users are either forced to
negotiate with the provider or change the MAC address of all other
netdevs so that they share the same prefix.

Patchset overview:

Patches #1-#3 are preparations.

Patch #4 adds actual support for RIF MAC profiles.

Patch #5 exposes RIF MAC profiles as a devlink resource, so that user
space has visibility into the maximum number of profiles and current
occupancy. Useful for debugging and testing (next 3 patches).

Patches #6-#8 add both scale and functional tests.

Patch #9 removes tests that validated the previous limitation. It is now
covered by patch #6 for devices that support a single profile.

Danielle Ratson (9):
  mlxsw: reg: Add MAC profile ID field to RITR register
  mlxsw: resources: Add resource identifier for RIF MAC profiles
  mlxsw: spectrum_router: Propagate extack further
  mlxsw: spectrum_router: Add RIF MAC profiles support
  mlxsw: spectrum_router: Expose RIF MAC profiles to devlink resource
  selftests: mlxsw: Add a scale test for RIF MAC profiles
  selftests: mlxsw: Add forwarding test for RIF MAC profiles
  selftests: Add an occupancy test for RIF MAC profiles
  selftests: mlxsw: Remove deprecated test cases

 drivers/net/ethernet/mellanox/mlxsw/reg.h     |   6 +
 .../net/ethernet/mellanox/mlxsw/resources.h   |   2 +
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  40 +-
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   1 +
 .../ethernet/mellanox/mlxsw/spectrum_router.c | 347 +++++++++++++++---
 .../ethernet/mellanox/mlxsw/spectrum_router.h |   3 +
 .../net/mlxsw/rif_mac_profile_scale.sh        |  72 ++++
 .../drivers/net/mlxsw/rif_mac_profiles.sh     | 213 +++++++++++
 .../drivers/net/mlxsw/rif_mac_profiles_occ.sh | 117 ++++++
 .../selftests/drivers/net/mlxsw/rtnetlink.sh  |  90 -----
 .../net/mlxsw/spectrum-2/resource_scale.sh    |   2 +-
 .../mlxsw/spectrum-2/rif_mac_profile_scale.sh |  16 +
 .../net/mlxsw/spectrum/resource_scale.sh      |   2 +-
 .../mlxsw/spectrum/rif_mac_profile_scale.sh   |  16 +
 14 files changed, 778 insertions(+), 149 deletions(-)
 create mode 100644 tools/testing/selftests/drivers/net/mlxsw/rif_mac_profile_scale.sh
 create mode 100755 tools/testing/selftests/drivers/net/mlxsw/rif_mac_profiles.sh
 create mode 100755 tools/testing/selftests/drivers/net/mlxsw/rif_mac_profiles_occ.sh
 create mode 100644 tools/testing/selftests/drivers/net/mlxsw/spectrum-2/rif_mac_profile_scale.sh
 create mode 100644 tools/testing/selftests/drivers/net/mlxsw/spectrum/rif_mac_profile_scale.sh

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 26, 2021, 12:40 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue, 26 Oct 2021 12:42:16 +0300 you wrote:
> From: Ido Schimmel <idosch@nvidia.com>
> 
> Currently, mlxsw enforces that all the netdevs used as router interfaces
> (RIFs) have the same MAC prefix (e.g., same 38 MSBs in Spectrum-1).
> Otherwise, an error is returned to user space with extack. This patchset
> relaxes the limitation through the use of RIF MAC profiles.
> 
> [...]

Here is the summary with links:
  - [net-next,1/9] mlxsw: reg: Add MAC profile ID field to RITR register
    https://git.kernel.org/netdev/net-next/c/d25d7fc31ed2
  - [net-next,2/9] mlxsw: resources: Add resource identifier for RIF MAC profiles
    https://git.kernel.org/netdev/net-next/c/a8428e5045d7
  - [net-next,3/9] mlxsw: spectrum_router: Propagate extack further
    https://git.kernel.org/netdev/net-next/c/26029225d992
  - [net-next,4/9] mlxsw: spectrum_router: Add RIF MAC profiles support
    https://git.kernel.org/netdev/net-next/c/605d25cd782a
  - [net-next,5/9] mlxsw: spectrum_router: Expose RIF MAC profiles to devlink resource
    https://git.kernel.org/netdev/net-next/c/1c375ffb2efa
  - [net-next,6/9] selftests: mlxsw: Add a scale test for RIF MAC profiles
    https://git.kernel.org/netdev/net-next/c/152f98e7c5cb
  - [net-next,7/9] selftests: mlxsw: Add forwarding test for RIF MAC profiles
    https://git.kernel.org/netdev/net-next/c/a10b7bacde60
  - [net-next,8/9] selftests: Add an occupancy test for RIF MAC profiles
    https://git.kernel.org/netdev/net-next/c/20d446db6144
  - [net-next,9/9] selftests: mlxsw: Remove deprecated test cases
    https://git.kernel.org/netdev/net-next/c/c24dbf3d4f88

You are awesome, thank you!