Subject: [PATCH net-next 0/8] mlxsw: Add Spectrum-4 support

From: Ido Schimmel <[email-masked]>
Date: Thu, 6 Jan 2022 18:06:44 +0200

This patchset adds Spectrum-4 support in mlxsw. It builds on top of a
previous patchset merged in commit 10184da91666 ("Merge branch
'mlxsw-Spectrum-4-prep'") and makes two additional changes before adding
Spectrum-4 support.

Patchset overview:

Patches #1-#2 add a few Spectrum-4 specific variants of existing ACL
keys. The new variants are needed because the size of certain key
elements (e.g., local port) was increased in Spectrum-4.

Patches #3-#6 are preparations.

Patch #7 implements the Spectrum-4 variant of the Bloom filter hash
function. The Bloom filter is used to optimize ACL lookups by
potentially skipping certain lookups if they are guaranteed not to
match. See additional info in merge commit ae6750e0a5ef ("Merge branch
'mlxsw-spectrum_acl-Add-Bloom-filter-support'").

Patch #8 finally adds Spectrum-4 support.

Amit Cohen (8):
  mlxsw: Rename virtual router flex key element
  mlxsw: Introduce flex key elements for Spectrum-4
  mlxsw: spectrum_acl_bloom_filter: Reorder functions to make the code
    more aesthetic
  mlxsw: spectrum_acl_bloom_filter: Make mlxsw_sp_acl_bf_key_encode()
    more flexible
  mlxsw: spectrum_acl_bloom_filter: Rename Spectrum-2 specific objects
    for future use
  mlxsw: Add operations structure for bloom filter calculation
  mlxsw: spectrum_acl_bloom_filter: Add support for Spectrum-4
    calculation
  mlxsw: spectrum: Extend to support Spectrum-4 ASIC

 drivers/net/ethernet/mellanox/mlxsw/Kconfig   |   2 +-
 .../mellanox/mlxsw/core_acl_flex_keys.c       |   4 +-
 .../mellanox/mlxsw/core_acl_flex_keys.h       |   4 +-
 drivers/net/ethernet/mellanox/mlxsw/pci.h     |   1 +
 drivers/net/ethernet/mellanox/mlxsw/reg.h     |   1 +
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  97 +++++
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   6 +
 .../mellanox/mlxsw/spectrum2_mr_tcam.c        |  12 +-
 .../mlxsw/spectrum_acl_bloom_filter.c         | 351 +++++++++++++++---
 .../mellanox/mlxsw/spectrum_acl_flex_keys.c   |  46 ++-
 .../mellanox/mlxsw/spectrum_acl_tcam.h        |   6 +
 11 files changed, 468 insertions(+), 62 deletions(-)

-- 
2.33.1