lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211026094225.1265320-1-idosch@idosch.org>
Date:   Tue, 26 Oct 2021 12:42:16 +0300
From:   Ido Schimmel <idosch@...sch.org>
To:     netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuba@...nel.org, jiri@...dia.com,
        petrm@...dia.com, danieller@...dia.com, mlxsw@...dia.com,
        Ido Schimmel <idosch@...dia.com>
Subject: [PATCH net-next 0/9] mlxsw: Support multiple RIF MAC prefixes

From: Ido Schimmel <idosch@...dia.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

-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ