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: <20220616104245.2254936-1-idosch@nvidia.com>
Date:   Thu, 16 Jun 2022 13:42:34 +0300
From:   Ido Schimmel <idosch@...dia.com>
To:     netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        edumazet@...gle.com, petrm@...dia.com, amcohen@...dia.com,
        mlxsw@...dia.com, Ido Schimmel <idosch@...dia.com>
Subject: [PATCH net-next 00/11] mlxsw: L3 HW stats improvements

While testing L3 HW stats [1] on top of mlxsw, two issues were found:

1. Stats cannot be enabled for more than 205 netdevs. This was fixed in
commit 4b7a632ac4e7 ("mlxsw: spectrum_cnt: Reorder counter pools").

2. ARP packets are counted as errors. Patch #1 takes care of that. See
the commit message for details.

The goal of the majority of the rest of the patches is to add selftests
that would have discovered that only about 205 netdevs can have L3 HW
stats supported, despite the HW supporting much more. The obvious place
to plug this in is the scale test framework.

The scale tests are currently testing two things: that some number of
instances of a given resource can actually be created; and that when an
attempt is made to create more than the supported amount, the failures
are noted and handled gracefully.

However the ability to allocate the resource does not mean that the
resource actually works when passing traffic. For that, make it possible
for a given scale to also test traffic.

To that end, this patchset adds traffic tests. The goal of these is to
run traffic and observe whether a sample of the allocated resource
instances actually perform their task. Traffic tests are only run on the
positive leg of the scale test (no point trying to pass traffic when the
expected outcome is that the resource will not be allocated). They are
opt-in, if a given test does not expose it, it is not run.

The patchset proceeds as follows:

- Patches #2 and #3 add to "devlink resource" support for number of
  allocated RIFs, and the capacity. This is necessary, because when
  evaluating how many L3 HW stats instances it should be possible to
  allocate, the limiting resource on Spectrum-2 and above currently is
  not the counters themselves, but actually the RIFs.

- Patch #6 adds support for invocation of a traffic test, if a given scale
  tests exposes it.

- Patch #7 adds support for skipping a given scale test. Because on
  Spectrum-2 and above, the limiting factor to L3 HW stats instances is
  actually the number of RIFs, there is no point in running the failing leg
  of a scale tests, because it would test exhaustion of RIFs, not of RIF
  counters.

- With patch #8, the scale tests drivers pass the target number to the
  cleanup function of a scale test.

- In patch #9, add a traffic test to the tc_flower selftests. This makes
  sure that the flow counters installed with the ACLs actually do count as
  they are supposed to.

- In patch #10, add a new scale selftest for RIF counter scale, including a
  traffic test.

- In patch #11, the scale target for the tc_flower selftest is
  dynamically set instead of being hard coded.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca0a53dcec9495d1dc5bbc369c810c520d728373

Amit Cohen (2):
  mlxsw: Trap ARP packets at layer 3 instead of layer 2
  selftests: mirror_gre_bridge_1q_lag: Enslave port to bridge before
    other configurations

Ido Schimmel (2):
  selftests: mlxsw: resource_scale: Update scale target after test setup
  selftests: spectrum-2: tc_flower_scale: Dynamically set scale target

Petr Machata (7):
  mlxsw: Keep track of number of allocated RIFs
  mlxsw: Add a resource describing number of RIFs
  selftests: mlxsw: resource_scale: Introduce traffic tests
  selftests: mlxsw: resource_scale: Allow skipping a test
  selftests: mlxsw: resource_scale: Pass target count to cleanup
  selftests: mlxsw: tc_flower_scale: Add a traffic test
  selftests: mlxsw: Add a RIF counter scale test

 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  29 +++++
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   1 +
 .../ethernet/mellanox/mlxsw/spectrum_router.c |  18 +++
 .../ethernet/mellanox/mlxsw/spectrum_router.h |   1 +
 .../ethernet/mellanox/mlxsw/spectrum_trap.c   |   8 +-
 drivers/net/ethernet/mellanox/mlxsw/trap.h    |   4 +-
 .../drivers/net/mlxsw/rif_counter_scale.sh    | 107 ++++++++++++++++++
 .../net/mlxsw/spectrum-2/resource_scale.sh    |  31 ++++-
 .../net/mlxsw/spectrum-2/rif_counter_scale.sh |   1 +
 .../net/mlxsw/spectrum-2/tc_flower_scale.sh   |  15 ++-
 .../net/mlxsw/spectrum/resource_scale.sh      |  29 ++++-
 .../net/mlxsw/spectrum/rif_counter_scale.sh   |  34 ++++++
 .../drivers/net/mlxsw/tc_flower_scale.sh      |  17 +++
 .../forwarding/mirror_gre_bridge_1q_lag.sh    |   7 +-
 14 files changed, 283 insertions(+), 19 deletions(-)
 create mode 100644 tools/testing/selftests/drivers/net/mlxsw/rif_counter_scale.sh
 create mode 120000 tools/testing/selftests/drivers/net/mlxsw/spectrum-2/rif_counter_scale.sh
 create mode 100644 tools/testing/selftests/drivers/net/mlxsw/spectrum/rif_counter_scale.sh

-- 
2.36.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ